summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/mingw32.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-02-08 09:23:49 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-02-08 09:23:49 +0000
commit3a3852f142d4db474cff63d9e02ed4af85e9cbce (patch)
treeef187cc302105d6c198651c2bcb29a6bcdef2273 /Build/source/texk/kpathsea/mingw32.c
parentafadeafcb2f6981fbf18c94b93354bd5d9e1afb4 (diff)
mingw32.c more cleanup
git-svn-id: svn://tug.org/texlive/trunk@16943 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/mingw32.c')
-rw-r--r--Build/source/texk/kpathsea/mingw32.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/Build/source/texk/kpathsea/mingw32.c b/Build/source/texk/kpathsea/mingw32.c
index 1180c46de62..9523383e2ec 100644
--- a/Build/source/texk/kpathsea/mingw32.c
+++ b/Build/source/texk/kpathsea/mingw32.c
@@ -403,16 +403,16 @@ BOOL
look_for_cmd(const char *cmd, char **app)
{
char *env_path;
- char *p, *q;
+ const char *p, *q;
char pname[MAXPATHLEN], *fp;
char *suffixes[] = { ".bat", ".cmd", ".com", ".exe", NULL };
char **s;
- char *app_name, *new_cmd;
+ char *app_name;
BOOL go_on;
*app = NULL;
- new_cmd = app_name = NULL;
+ app_name = NULL;
/* We should look for the application name along the PATH,
and decide to prepend "%COMSPEC% /c " or not to the command line.
@@ -424,7 +424,7 @@ look_for_cmd(const char *cmd, char **app)
*/
/* Look for the application name */
- for (p = (char *)cmd; *p && isspace(*p); p++);
+ for (p = cmd; *p && isspace(*p); p++);
if (*p == '"') {
q = ++p;
while(*p && *p != '"') p++;
@@ -466,7 +466,6 @@ look_for_cmd(const char *cmd, char **app)
#ifdef TRACE
fprintf(stderr, "%s found with suffix %s\nin %s\n", app_name, *s, pname);
#endif
- new_cmd = xstrdup(cmd);
free(app_name);
app_name = xstrdup(pname);
break;
@@ -478,12 +477,9 @@ look_for_cmd(const char *cmd, char **app)
#ifdef TRACE
fprintf(stderr, "%s not found, concatenating comspec\n", app_name);
#endif
- new_cmd = concatn(getenv("COMSPEC"), " /c ", cmd, NULL);
free(app_name);
app_name = NULL;
}
- else {
- }
if (env_path) free(env_path);
*app = app_name;