/[emacs]/emacs/nt/cmdproxy.c
ViewVC logotype

Diff of /emacs/nt/cmdproxy.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by andrewi, Sun Mar 18 16:54:35 2001 UTC revision 1.11.16.1 by miles, Fri Apr 4 06:20:49 2003 UTC
# Line 230  search_dir (char *dir, char *exec, int b Line 230  search_dir (char *dir, char *exec, int b
230    int i, rc;    int i, rc;
231    
232    /* Search the directory for the program.  */    /* Search the directory for the program.  */
233    for (i = 0; i < n_exts; i++)    for (i = 0; i < n_exts; i++)
234      {      {
235        rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy);        rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy);
236        if (rc > 0)        if (rc > 0)
# Line 240  search_dir (char *dir, char *exec, int b Line 240  search_dir (char *dir, char *exec, int b
240    return 0;    return 0;
241  }  }
242    
243  /* Return the absolute name of executable file PROG, including  /* Return the absolute name of executable file PROG, including
244     any file extensions.  If an absolute name for PROG cannot be found,     any file extensions.  If an absolute name for PROG cannot be found,
245     return NULL.  */     return NULL.  */
246  char *  char *
# Line 272  make_absolute (char *prog) Line 272  make_absolute (char *prog)
272          return NULL;          return NULL;
273      }      }
274    
275    if (GetCurrentDirectory (MAX_PATH, curdir) <= 0)    if (GetCurrentDirectory (MAX_PATH, curdir) <= 0)
276      return NULL;      return NULL;
277    
278    /* Relative path; search in current dir. */    /* Relative path; search in current dir. */
279    if (strpbrk (prog, "\\"))    if (strpbrk (prog, "\\"))
280      {      {
281        if (search_dir (curdir, prog, MAX_PATH, absname) > 0)        if (search_dir (curdir, prog, MAX_PATH, absname) > 0)
282          return strdup (absname);          return strdup (absname);
283        else        else
284          return NULL;          return NULL;
285      }      }
286      
287    /* Just filename; search current directory then PATH.  */    /* Just filename; search current directory then PATH.  */
288    path = alloca (strlen (getenv ("PATH")) + strlen (curdir) + 2);    path = alloca (strlen (getenv ("PATH")) + strlen (curdir) + 2);
289    strcpy (path, curdir);    strcpy (path, curdir);
# Line 304  make_absolute (char *prog) Line 304  make_absolute (char *prog)
304    
305        /* Move to the next directory.  */        /* Move to the next directory.  */
306        path = p + 1;        path = p + 1;
307      }      }
308    
309    return NULL;    return NULL;
310  }  }
# Line 322  setup_argv (void) Line 322  setup_argv (void)
322    char * cmdline = GetCommandLine ();    char * cmdline = GetCommandLine ();
323    int arg_bytes = 0;    int arg_bytes = 0;
324    
325      
326  }  }
327  #endif  #endif
328    
# Line 384  spawn (char * progname, char * cmdline, Line 384  spawn (char * progname, char * cmdline,
384    sec_attrs.nLength = sizeof (sec_attrs);    sec_attrs.nLength = sizeof (sec_attrs);
385    sec_attrs.lpSecurityDescriptor = NULL;    sec_attrs.lpSecurityDescriptor = NULL;
386    sec_attrs.bInheritHandle = FALSE;    sec_attrs.bInheritHandle = FALSE;
387      
388    memset (&start, 0, sizeof (start));    memset (&start, 0, sizeof (start));
389    start.cb = sizeof (start);    start.cb = sizeof (start);
390    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.11.16.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26