Changeset 3755
- Timestamp:
- Dec 22, 2019, 1:11:47 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/gui/common/hilite.c ¶
r3754 r3755 210 210 } 211 211 212 return string; 213 } 214 215 // ---------------------------------------------------------------------- 216 217 // Copyright 1987-88, Robert B.Stout 218 // https://people.cs.umu.se/~isak/snippets/ 219 // Subset version released to the public domain, 1992 220 // Original name: lv1ws 221 // Altered for NEPMD. 222 // 223 // Makes all whitespace single spaces. Passed a string, lv1ws() 224 // converts all multiple whitespace characters to single spaces. 225 226 static PSZ _removemultispaces( PSZ string) 227 { 228 PSZ ibuf = string; 229 PSZ obuf = string; 230 INT i = 0; 231 BOOL fPrevSpace = FALSE; 232 233 // Check parameter 234 if (string) 235 { 236 // Collapse embedded spaces (from LV1WS.C) 237 while (*ibuf) 238 { 239 if (isspace( *ibuf) && fPrevSpace) 240 ibuf++; 241 else 242 { 243 if (!isspace( *ibuf)) 244 fPrevSpace = FALSE; 245 else 246 { 247 *ibuf = ' '; 248 fPrevSpace = TRUE; 249 } 250 obuf[i++] = *ibuf++; 251 } 252 } 253 obuf[i] = '\0'; 254 } 212 255 return string; 213 256 } … … 1039 1082 sprintf( szRegPath, pszRegPathTemplate, pszEpmMode, apszKeys[i+1]); 1040 1083 // DPRINTF(( "Regpath. Key '%s' Full path '%s'\n", apszKeys[i+1], szRegPath)); 1084 _removemultispaces( szFileBuffer); 1041 1085 rc = WriteConfigValue( hconfig, szRegPath, szFileBuffer); 1042 1086 // DPRINTF(( "Regupd rc %d Value '%s'\n", rc, szFileBuffer));
Note:
See TracChangeset
for help on using the changeset viewer.