Changeset 131 for trunk/src/helpers/apps.c
- Timestamp:
- Jan 9, 2002, 10:17:41 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/apps.c
r129 r131 62 62 * 63 63 ********************************************************************/ 64 65 /* 66 *@@ appQueryEnvironmentLen: 67 * returns the total length of the passed in environment 68 * string buffer, including the terminating two null bytes. 69 * 70 *@@added V0.9.16 (2002-01-09) [umoeller] 71 */ 72 73 ULONG appQueryEnvironmentLen(PCSZ pcszEnvironment) 74 { 75 ULONG cbEnvironment = 0; 76 if (pcszEnvironment) 77 { 78 PCSZ pVarThis = pcszEnvironment; 79 // go thru the environment strings; last one has two null bytes 80 while (*pVarThis) 81 { 82 ULONG ulLenThis = strlen(pVarThis) + 1; 83 cbEnvironment += ulLenThis; 84 pVarThis += ulLenThis; 85 } 86 87 cbEnvironment++; // last null byte 88 } 89 90 return (cbEnvironment); 91 } 64 92 65 93 /*
Note:
See TracChangeset
for help on using the changeset viewer.