comparison winmain.c @ 2164:05dd5189099f

Win: Fix some warnings reported with -W3 in Visual C. Can compile with -W3 by issuing: "set DEBUG=Y" before building.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 30 Sep 2020 22:56:59 +0000
parents aedf5903db0a
children
comparison
equal deleted inserted replaced
2163:98db0e81a514 2164:05dd5189099f
72 inquotes = 1; 72 inquotes = 1;
73 } 73 }
74 else if(*tmp == ' ' && !inquotes) 74 else if(*tmp == ' ' && !inquotes)
75 { 75 {
76 *tmp = 0; 76 *tmp = 0;
77 argv[loc] = strdup(argstart); 77 argv[loc] = _strdup(argstart);
78 78
79 /* Push past any white space */ 79 /* Push past any white space */
80 while(*(tmp+1) == ' ') 80 while(*(tmp+1) == ' ')
81 tmp++; 81 tmp++;
82 82
90 loc++; 90 loc++;
91 } 91 }
92 tmp++; 92 tmp++;
93 } 93 }
94 if(*argstart) 94 if(*argstart)
95 argv[loc] = strdup(argstart); 95 argv[loc] = _strdup(argstart);
96 } 96 }
97 argv[loc+1] = NULL; 97 argv[loc+1] = NULL;
98 return argv; 98 return argv;
99 } 99 }
100
101 /* Protoype for the application entrypoint */
102 int main(int argc, char **argv);
100 103
101 /* Ok this is a really big hack but what the hell ;) */ 104 /* Ok this is a really big hack but what the hell ;) */
102 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 105 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
103 { 106 {
104 char **argv; 107 char **argv;