some fixes from jdahlin

Original commit message from CVS:
some fixes from jdahlin
This commit is contained in:
Thomas Vander Stichele 2004-02-19 10:36:06 +00:00
parent 97cded9425
commit 3ce34049eb
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2004-02-19 Thomas Vander Stichele <thomas at apestaart dot org>
* tools/gst-run.c: (get_candidates), (main): some fixes from jdahlin
2004-02-18 kost@imn.htwk-leipzig.de
reviewed by: David Schleef <ds@schleef.org>

View file

@ -237,7 +237,7 @@ get_candidates (const gchar * dir, const gchar * base)
/* get all dirs from the path and prepend with given dir */
path = g_strdup_printf ("%s%c%s",
dir, G_SEARCHPATH_SEPARATOR, getenv ("PATH"));
dir, G_SEARCHPATH_SEPARATOR, g_getenv ("PATH"));
dirs = g_strsplit (path, G_SEARCHPATH_SEPARATOR_S, 0);
g_free (path);
@ -311,7 +311,7 @@ int main
ctx = poptGetContext ("gst-run", argc, (const char **) argv, options, 0);
poptReadDefaultConfig (ctx, TRUE);
while ((nextopt = poptGetNextOpt (ctx)) > 0)
;
/* keep looping to parse */;
argc = poptStrippedArgv (ctx, argc, argv);
argv[argc] = NULL;
@ -353,6 +353,8 @@ int main
binary = g_strdup_printf ("%s-%s", base, highest);
}
g_free (base);
path = g_build_filename (dir, binary, NULL);
g_free (binary);
@ -361,6 +363,7 @@ int main
if (_arg_list_mm)
{
g_hash_table_foreach (candidates, (GHFunc) hash_print_key, NULL);
g_hash_table_destroy (candidates);
return 0;
}