Mercurial > hg > index.cgi
comparison lwasm/input.c @ 74:e95eaf2f7fe0
Added missing newlines to error messages related to opening files
author | lost@l-w.ca |
---|---|
date | Tue, 12 Apr 2011 17:58:13 -0600 |
parents | 1f77ae5c3590 |
children | 5bf9edabd661 |
comparison
equal
deleted
inserted
replaced
73:1f77ae5c3590 | 74:e95eaf2f7fe0 |
---|---|
181 /* absolute path */ | 181 /* absolute path */ |
182 IS -> data = fopen(s, "rb"); | 182 IS -> data = fopen(s, "rb"); |
183 debug_message(as, 1, "Opening (abs) %s", s); | 183 debug_message(as, 1, "Opening (abs) %s", s); |
184 if (!IS -> data && !IGNOREERROR) | 184 if (!IS -> data && !IGNOREERROR) |
185 { | 185 { |
186 lw_error("Cannot open file '%s': %s", s, strerror(errno)); | 186 lw_error("Cannot open file '%s': %s\n", s, strerror(errno)); |
187 } | 187 } |
188 input_pushpath(as, s); | 188 input_pushpath(as, s); |
189 return; | 189 return; |
190 } | 190 } |
191 | 191 |
223 if (IGNOREERROR) | 223 if (IGNOREERROR) |
224 { | 224 { |
225 input_pushpath(as, s); | 225 input_pushpath(as, s); |
226 return; | 226 return; |
227 } | 227 } |
228 lw_error("Cannot open include file '%s': %s", s, strerror(errno)); | 228 lw_error("Cannot open include file '%s': %s\n", s, strerror(errno)); |
229 break; | 229 break; |
230 | 230 |
231 case input_type_file: | 231 case input_type_file: |
232 debug_message(as, 1, "Opening (reg): %s\n", s); | 232 debug_message(as, 1, "Opening (reg): %s\n", s); |
233 IS -> data = fopen(s, "rb"); | 233 IS -> data = fopen(s, "rb"); |
234 | 234 |
235 if (!IS -> data) | 235 if (!IS -> data) |
236 { | 236 { |
237 lw_error("Cannot open file '%s': %s", s, strerror(errno)); | 237 lw_error("Cannot open file '%s': %s\n", s, strerror(errno)); |
238 } | 238 } |
239 input_pushpath(as, s); | 239 input_pushpath(as, s); |
240 return; | 240 return; |
241 } | 241 } |
242 | 242 |
243 lw_error("Cannot figure out how to open '%s'.", t -> filespec); | 243 lw_error("Cannot figure out how to open '%s'.\n", t -> filespec); |
244 } | 244 } |
245 | 245 |
246 FILE *input_open_standalone(asmstate_t *as, char *s) | 246 FILE *input_open_standalone(asmstate_t *as, char *s) |
247 { | 247 { |
248 // char *s2; | 248 // char *s2; |
421 return s; | 421 return s; |
422 } | 422 } |
423 } | 423 } |
424 | 424 |
425 default: | 425 default: |
426 lw_error("Problem reading from unknown input type"); | 426 lw_error("Problem reading from unknown input type\n"); |
427 return NULL; | 427 return NULL; |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 char *input_curspec(asmstate_t *as) | 431 char *input_curspec(asmstate_t *as) |