| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Program entry point, command line parsing | 2 * Program entry point, command line parsing |
| 3 * | 3 * |
| 4 * Copyright (C) 2001-2008 Peter Johnson | 4 * Copyright (C) 2001-2008 Peter Johnson |
| 5 * Copyright (C) 2007-2008 Samuel Thibault | 5 * Copyright (C) 2007-2008 Samuel Thibault |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 N_("Display source line with error message (ignored)"), NULL }, | 219 N_("Display source line with error message (ignored)"), NULL }, |
| 220 | 220 |
| 221 { "b", 0, opt_exe_handler, 0, | 221 { "b", 0, opt_exe_handler, 0, |
| 222 N_("Build a (very) basic .exe file"), NULL }, | 222 N_("Build a (very) basic .exe file"), NULL }, |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 /* version message */ | 225 /* version message */ |
| 226 /*@observer@*/ static const char *version_msg[] = { | 226 /*@observer@*/ static const char *version_msg[] = { |
| 227 PACKAGE_NAME " " PACKAGE_INTVER "." PACKAGE_BUILD, | 227 PACKAGE_NAME " " PACKAGE_INTVER "." PACKAGE_BUILD, |
| 228 "Compiled on " __DATE__ ".", | 228 "Compiled on " __DATE__ ".", |
| 229 "Copyright (c) 2001-2008 Peter Johnson and other Yasm developers.", | 229 "Copyright (c) 2001-2010 Peter Johnson and other Yasm developers.", |
| 230 "Run yasm --license for licensing overview and summary." | 230 "Run yasm --license for licensing overview and summary." |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 /* help messages */ | 233 /* help messages */ |
| 234 /*@observer@*/ static const char *help_head = N_( | 234 /*@observer@*/ static const char *help_head = N_( |
| 235 "usage: tasm [option]* source [,object] [,listing] [,xref] \n" | 235 "usage: tasm [option]* source [,object] [,listing] [,xref] \n" |
| 236 "Options:\n"); | 236 "Options:\n"); |
| 237 /*@observer@*/ static const char *help_tail = N_( | 237 /*@observer@*/ static const char *help_tail = N_( |
| 238 "\n" | 238 "\n" |
| 239 "source is asm source to be assembled.\n" | 239 "source is asm source to be assembled.\n" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 260 yasm_object *object; | 260 yasm_object *object; |
| 261 const char *base_filename; | 261 const char *base_filename; |
| 262 /*@null@*/ FILE *obj = NULL; | 262 /*@null@*/ FILE *obj = NULL; |
| 263 yasm_arch_create_error arch_error; | 263 yasm_arch_create_error arch_error; |
| 264 yasm_linemap *linemap; | 264 yasm_linemap *linemap; |
| 265 yasm_errwarns *errwarns = yasm_errwarns_create(); | 265 yasm_errwarns *errwarns = yasm_errwarns_create(); |
| 266 int i, matched; | 266 int i, matched; |
| 267 | 267 |
| 268 /* Initialize line map */ | 268 /* Initialize line map */ |
| 269 linemap = yasm_linemap_create(); | 269 linemap = yasm_linemap_create(); |
| 270 yasm_linemap_set(linemap, in_filename, 1, 1); | 270 yasm_linemap_set(linemap, in_filename, 0, 1, 1); |
| 271 | 271 |
| 272 /* determine the object filename if not specified */ | 272 /* determine the object filename if not specified */ |
| 273 if (!obj_filename) { | 273 if (!obj_filename) { |
| 274 if (in_filename == NULL) | 274 if (in_filename == NULL) |
| 275 /* Default to yasm.out if no obj filename specified */ | 275 /* Default to yasm.out if no obj filename specified */ |
| 276 obj_filename = yasm__xstrdup("yasm.out"); | 276 obj_filename = yasm__xstrdup("yasm.out"); |
| 277 else { | 277 else { |
| 278 /* replace (or add) extension to base filename */ | 278 /* replace (or add) extension to base filename */ |
| 279 yasm__splitpath(in_filename, &base_filename); | 279 yasm__splitpath(in_filename, &base_filename); |
| 280 if (base_filename[0] == '\0') | 280 if (base_filename[0] == '\0') |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 } | 993 } |
| 994 | 994 |
| 995 static void | 995 static void |
| 996 print_yasm_warning(const char *filename, unsigned long line, const char *msg) | 996 print_yasm_warning(const char *filename, unsigned long line, const char *msg) |
| 997 { | 997 { |
| 998 if (line) | 998 if (line) |
| 999 fprintf(errfile, "*%s* %s(%lu) %s\n", _("Warning"), filename, line, msg)
; | 999 fprintf(errfile, "*%s* %s(%lu) %s\n", _("Warning"), filename, line, msg)
; |
| 1000 else | 1000 else |
| 1001 fprintf(errfile, "*%s* %s %s\n", _("Warning"), filename, msg); | 1001 fprintf(errfile, "*%s* %s %s\n", _("Warning"), filename, msg); |
| 1002 } | 1002 } |
| OLD | NEW |