comparison src/msdos.c @ 12614:1415c961bea6

(init_environment): Move alloca call out of function arg.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Jul 1995 18:30:49 +0000
parents f8193b0f95ed
children a3620c5ffad7
comparison
equal deleted inserted replaced
12613:1243b1f01079 12614:1415c961bea6
691 char *s, *t, *root; 691 char *s, *t, *root;
692 int len; 692 int len;
693 693
694 /* Find our root from argv[0]. Assuming argv[0] is, say, 694 /* Find our root from argv[0]. Assuming argv[0] is, say,
695 "c:/emacs/bin/emacs.exe" our root will be "c:/emacs". */ 695 "c:/emacs/bin/emacs.exe" our root will be "c:/emacs". */
696 _fixpath (argv[0], root = alloca (MAXPATHLEN + 20)); 696 root = alloca (MAXPATHLEN + 20);
697 _fixpath (argv[0], root);
697 strlwr (root); 698 strlwr (root);
698 len = strlen (root); 699 len = strlen (root);
699 while (len > 0 && root[len] != '/' && root[len] != ':') 700 while (len > 0 && root[len] != '/' && root[len] != ':')
700 len--; 701 len--;
701 root[len] = '\0'; 702 root[len] = '\0';