Changeset cc6452 in git for Singular/find_exec.c


Ignore:
Timestamp:
May 19, 1998, 4:51:20 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f8f3ec7570a94db80bffc21cc74df93fb3375101
Parents:
a311d9e7b4f9bdb04b262dac8da170e5c31e4956
Message:
1998-05-19  Olaf Bachmann  <obachman@mathematik.uni-kl.de>

	* find_exec.c (find_executable): add "." top path, if under WINNT
	and MSDOS display


git-svn-id: file:///usr/local/Singular/svn/trunk@1876 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/find_exec.c

    ra311d9e rcc6452  
    5656  char *search;
    5757  char *p;
     58  char *extra = NULL;
    5859  char tbuf[MAXPATHLEN];
    5960
     
    9192    }
    9293
    93     search = getenv ("PATH");
     94
     95    search = getenv("PATH");
     96/* for winnt under msdos, cwd is implicetyly in the path */
     97#ifdef WINNT
     98    if (strlen(getenv("SHELL")) < 1)
     99    {
     100      /* we are under msdos */
     101      extra = (char*) AllocL(strlen(search) + 3);
     102      sprintf(extra, ".:");
     103      strcat(extra, search);
     104      search = extra;
     105    }
     106#endif
    94107    p = search;
    95108
     
    169182          continue;
    170183#endif
     184#ifdef WINNT
     185        if (extra != NULL)
     186          FreeL(extra);
     187#endif
    171188        return copy_of (tbuf);
    172189      }
Note: See TracChangeset for help on using the changeset viewer.