From c4ce79084f4a09fc8ee78df409a863257c7d53ea Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 12 Nov 2004 06:15:40 +0000 Subject: * eval.c (ruby_options): now we cannot call rb_glob() before ruby_init(), so call rb_w32_cmdvector() at ruby_options(). * win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and export it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 15 ++------------- win32/win32.h | 1 + 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'win32') diff --git a/win32/win32.c b/win32/win32.c index b2f4695a96..b212d3874c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -85,7 +85,6 @@ #define TO_SOCKET(x) _get_osfhandle(x) static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE); -static int make_cmdvector(const char *, char ***); static int has_redirection(const char *); static void StartSockets(void); static DWORD wait_events(HANDLE event, DWORD timeout); @@ -422,11 +421,6 @@ NtInitialize(int *argc, char ***argv) _controlfp(0x5, 0x5); #endif - // - // subvert cmd.exe's feeble attempt at command line parsing - // - *argc = make_cmdvector(GetCommandLine(), argv); - // // Now set up the correct time stuff // @@ -437,11 +431,6 @@ NtInitialize(int *argc, char ***argv) // Initialize Winsock StartSockets(); - -#ifdef _WIN32_WCE - // free commandline buffer - wce_FreeCommandLine(); -#endif } char * @@ -1141,8 +1130,8 @@ skipspace(char *ptr) return ptr; } -static int -make_cmdvector(const char *cmd, char ***vec) +int +rb_w32_cmdvector(const char *cmd, char ***vec) { int cmdlen, globbing, len, i; int elements, strsz, done; diff --git a/win32/win32.h b/win32/win32.h index 0a8f6d5257..e811a8bdd2 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -134,6 +134,7 @@ struct timezone { }; #endif extern void NtInitialize(int *, char ***); +extern int rb_w32_cmdvector(const char *, char ***); extern pid_t rb_w32_pipe_exec(const char *, const char *, int, FILE **, FILE **); extern int flock(int fd, int oper); extern int rb_w32_accept(int, struct sockaddr *, int *); -- cgit v1.2.3