- Timestamp:
- Nov 1, 2008 10:18:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/append.c
r2015 r2016 50 50 " the first argument following the file name.\n" 51 51 " -c Output the command for specified target(s). [builtin only]\n" 52 " -n Insert a new 53 " -N Suppress the trailing new 52 " -n Insert a newline between the strings.\n" 53 " -N Suppress the trailing newline.\n" 54 54 " -t Truncate the file instead of appending\n" 55 55 " -v Output the value(s) for specified variable(s). [builtin only]\n" … … 69 69 int iFile; 70 70 FILE *pFile; 71 int fNew Line = 0;72 int fNoTrailingNew Line = 0;71 int fNewline = 0; 72 int fNoTrailingNewline = 0; 73 73 int fTruncate = 0; 74 74 int fDefine = 0; … … 117 117 break; 118 118 case 'n': 119 fNew Line = 1;119 fNewline = 1; 120 120 break; 121 121 case 'N': 122 fNoTrailingNew Line = 1;122 fNoTrailingNewline = 1; 123 123 break; 124 124 case 't': … … 191 191 size_t cch = strlen(psz); 192 192 if (!fFirst) 193 fputc(fNew Line ? '\n' : ' ', pFile);193 fputc(fNewline ? '\n' : ' ', pFile); 194 194 #ifndef kmk_builtin_append 195 195 if (fCommands) … … 241 241 * Add the final newline (unless supressed) and close the file. 242 242 */ 243 if ( ( !fNoTrailingNew Line243 if ( ( !fNoTrailingNewline 244 244 && fputc('\n', pFile) == EOF) 245 245 || ferror(pFile))
Note:
See TracChangeset
for help on using the changeset viewer.