Changeset 5283 for trunk/src/win32k/clfix.c
- Timestamp:
- Mar 2, 2001, 1:48:41 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/clfix.c
r4580 r5283 1 /* $Id: clfix.c,v 1. 2 2000-11-09 20:42:43bird Exp $1 /* $Id: clfix.c,v 1.3 2001-03-02 12:48:41 bird Exp $ 2 2 * 3 3 * A wrapper program for cl.exe fix will try fix some of the problems … … 28 28 { 29 29 static char szArgBuffer[32768]; 30 static char szzEnv[4096]; 31 char * pszEnv = &szzEnv[0]; 30 32 RESULTCODES resc; 31 33 int argi; … … 34 36 APIRET rc; 35 37 36 38 37 39 /* 38 40 * Check that we have cl.exe at least passed in. … … 50 52 } 51 53 54 /* 55 * Blow away extra libpaths. 56 */ 57 DosSetExtLIBPATH("", BEGIN_LIBPATH); 58 DosSetExtLIBPATH("", END_LIBPATH); 59 52 60 53 61 /* … … 59 67 60 68 61 /* The other arguments. */ 69 /* 70 * The other arguments. 71 * The -I arguments are put into the environment variable INCLUDE. 72 */ 73 strcpy(pszEnv, "INCLUDE="); 74 pszEnv += strlen(pszEnv); 62 75 if (argc > 2) 63 76 { … … 65 78 while (argi < argc) 66 79 { 67 strcpy(psz, argv[argi]); 68 psz += strlen(psz); 69 *psz++ = ' '; 70 argi++; 80 if ( (argv[argi][0] == '-' || argv[argi][0] == '/') 81 && (argv[argi][1] == 'I' || argv[argi][1] == 'i')) 82 { 83 strcpy(pszEnv, &argv[argi][2]); 84 pszEnv += strlen(pszEnv); 85 *pszEnv++ = ';'; 86 argi++; 87 } 88 else 89 { 90 strcpy(psz, argv[argi]); 91 psz += strlen(psz); 92 *psz++ = ' '; 93 argi++; 94 } 71 95 } 72 96 psz[-1] = '\0'; … … 74 98 *psz = '\0'; 75 99 100 printf("exe: %s\n", szArgBuffer); 101 printf("arg: %s\n", szArgBuffer + strlen(szArgBuffer)+1); 102 printf("env: %s\n", szzEnv); 76 103 77 104 /* … … 91 118 if (rc) 92 119 printf("clfix: DosDupHandle failed with rc=%d\n\n", rc); 93 120 94 121 95 122 /* … … 99 126 * this will solve the problems. 100 127 */ 101 if (DosExecPgm(NULL, 0, EXEC_SYNC, szArgBuffer, "\0\0", &resc, szArgBuffer) != NO_ERROR)128 if (DosExecPgm(NULL, 0, EXEC_SYNC, szArgBuffer, &szzEnv[0], &resc, szArgBuffer) != NO_ERROR) 102 129 { 103 130 /*complain*/
Note:
See TracChangeset
for help on using the changeset viewer.