Mercurial > hg > index.cgi
comparison lwasm/main.c @ 106:43a3f1068027
Adjustments for list code
author | lost@l-w.ca |
---|---|
date | Sat, 06 Aug 2011 23:20:45 -0600 |
parents | ed7f970f3688 |
children | 1824cabf25ce |
comparison
equal
deleted
inserted
replaced
105:3e9057059a43 | 106:43a3f1068027 |
---|---|
60 | 60 |
61 | 61 |
62 static int parse_opts(int key, char *arg, void *state) | 62 static int parse_opts(int key, char *arg, void *state) |
63 { | 63 { |
64 asmstate_t *as = state; | 64 asmstate_t *as = state; |
65 | 65 |
66 switch (key) | 66 switch (key) |
67 { | 67 { |
68 case 'I': | 68 case 'I': |
69 lw_stringlist_addstring(as -> include_list, arg); | 69 lw_stringlist_addstring(as -> include_list, arg); |
70 break; | 70 break; |
105 | 105 |
106 case 'l': | 106 case 'l': |
107 if (as -> list_file) | 107 if (as -> list_file) |
108 lw_free(as -> list_file); | 108 lw_free(as -> list_file); |
109 if (!arg) | 109 if (!arg) |
110 as -> list_file = NULL; | 110 as -> list_file = lw_strdup("-"); |
111 else | 111 else |
112 as -> list_file = lw_strdup(arg); | 112 as -> list_file = lw_strdup(arg); |
113 as -> flags |= FLAG_LIST; | 113 as -> flags |= FLAG_LIST; |
114 break; | 114 break; |
115 | 115 |