comparison lwasm/lwasm.c @ 351:4dba8c7e242c

conditional pseudo ops added
author lost@starbug
date Sat, 27 Mar 2010 23:37:30 -0600
parents 11a95c6414b4
children 60568b123281
comparison
equal deleted inserted replaced
350:f5666775d76f 351:4dba8c7e242c
62 } 62 }
63 return NULL; 63 return NULL;
64 } 64 }
65 65
66 void lwasm_register_error(asmstate_t *as, line_t *l, const char *msg, ...) 66 void lwasm_register_error(asmstate_t *as, line_t *l, const char *msg, ...)
67 {
68 lwasm_error_t *e;
69 va_list args;
70 char errbuff[1024];
71 int r;
72
73 if (!l)
74 return;
75
76 va_start(args, msg);
77
78 e = lw_alloc(sizeof(lwasm_error_t));
79
80 e -> next = l -> err;
81 l -> err = e;
82
83 as -> errorcount++;
84
85 r = vsnprintf(errbuff, 1024, msg, args);
86 e -> mess = lw_strdup(errbuff);
87
88 va_end(args);
89 }
90
91 void lwasm_register_warning(asmstate_t *as, line_t *l, const char *msg, ...)
67 { 92 {
68 lwasm_error_t *e; 93 lwasm_error_t *e;
69 va_list args; 94 va_list args;
70 char errbuff[1024]; 95 char errbuff[1024];
71 int r; 96 int r;