equal
deleted
inserted
replaced
9 #include "window.h" |
9 #include "window.h" |
10 #include "table/strings.h" |
10 #include "table/strings.h" |
11 #include "table/sprites.h" |
11 #include "table/sprites.h" |
12 #include "newgrf.h" |
12 #include "newgrf.h" |
13 #include "newgrf_config.h" |
13 #include "newgrf_config.h" |
|
14 #include "helpers.hpp" |
14 |
15 |
15 |
16 |
16 /** Parse an integerlist string and set each found value |
17 /** Parse an integerlist string and set each found value |
17 * @param p the string to be parsed. Each element in the list is seperated by a |
18 * @param p the string to be parsed. Each element in the list is seperated by a |
18 * comma or a space character |
19 * comma or a space character |
162 return; |
163 return; |
163 } |
164 } |
164 } |
165 } |
165 |
166 |
166 /* Copy GRF details from scanned list */ |
167 /* Copy GRF details from scanned list */ |
167 c = calloc(1, sizeof(*c)); |
168 CallocT(&c, 1); |
168 *c = *src; |
169 *c = *src; |
169 c->filename = strdup(src->filename); |
170 c->filename = strdup(src->filename); |
170 if (src->name != NULL) c->name = strdup(src->name); |
171 if (src->name != NULL) c->name = strdup(src->name); |
171 if (src->info != NULL) c->info = strdup(src->info); |
172 if (src->info != NULL) c->info = strdup(src->info); |
172 c->next = NULL; |
173 c->next = NULL; |