Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0ac7bf6c
Commit
0ac7bf6c
authored
Jun 20, 2001
by
Jason Rumney
Browse files
(WinMain): Add quotes around executable name.
parent
513e7954
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
nt/ChangeLog
nt/ChangeLog
+4
-0
nt/runemacs.c
nt/runemacs.c
+6
-4
No files found.
nt/ChangeLog
View file @
0ac7bf6c
2001-06-20 Jason Rumney <jasonr@gnu.org>
* runemacs.c (WinMain): Add quotes around command in case of spaces.
2001-06-01 Andrew Innes <andrewi@gnu.org>
* gmake.defs (sh_output): Don't use $(warning ...) to output
...
...
nt/runemacs.c
View file @
0ac7bf6c
...
...
@@ -44,8 +44,10 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow)
goto
error
;
*
p
=
0
;
new_cmdline
=
alloca
(
MAX_PATH
+
strlen
(
cmdline
)
+
1
);
strcpy
(
new_cmdline
,
modname
);
new_cmdline
=
alloca
(
MAX_PATH
+
strlen
(
cmdline
)
+
3
);
/* Quote executable name in case of spaces in the path. */
*
new_cmdline
=
'"'
;
strcpy
(
new_cmdline
+
1
,
modname
);
#ifdef CHOOSE_NEWEST_EXE
{
...
...
@@ -57,7 +59,7 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow)
WIN32_FIND_DATA
wfd
;
HANDLE
fh
;
p
=
new_cmdline
+
strlen
(
new_cmdline
);
strcpy
(
p
,
"
\\
emacs*.exe "
);
strcpy
(
p
,
"
\\
emacs*.exe
\"
"
);
fh
=
FindFirstFile
(
new_cmdline
,
&
wfd
);
if
(
fh
==
INVALID_HANDLE_VALUE
)
goto
error
;
...
...
@@ -78,7 +80,7 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow)
strcat
(
p
,
" "
);
}
#else
strcat
(
new_cmdline
,
"
\\
emacs.exe "
);
strcat
(
new_cmdline
,
"
\\
emacs.exe
\"
"
);
#endif
/* Append original arguments if any; first look for arguments we
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment