… | |
… | |
81 | if (entries == entry_size) |
81 | if (entries == entry_size) |
82 | { |
82 | { |
83 | entry_size += 10; |
83 | entry_size += 10; |
84 | rn = (char **) realloc (rn, sizeof (char *) * entry_size); |
84 | rn = (char **) realloc (rn, sizeof (char *) * entry_size); |
85 | } |
85 | } |
86 | rn[entries] = strdup_local (d->d_name); |
86 | rn[entries] = strdup (d->d_name); |
87 | entries++; |
87 | entries++; |
88 | |
88 | |
89 | } |
89 | } |
90 | (void) closedir (dp); |
90 | (void) closedir (dp); |
91 | |
91 | |
… | |
… | |
265 | * any difference, but this seems clearer to me. |
265 | * any difference, but this seems clearer to me. |
266 | */ |
266 | */ |
267 | do |
267 | do |
268 | { |
268 | { |
269 | limit++; |
269 | limit++; |
270 | x = RANDOM () % MAP_WIDTH (style); |
270 | x = RANDOM () % style->width; |
271 | y = RANDOM () % MAP_HEIGHT (style); |
271 | y = RANDOM () % style->height; |
272 | new_obj = get_map_ob (style, x, y); |
272 | new_obj = GET_MAP_OB (style, x, y); |
273 | } |
273 | } |
274 | while (new_obj == NULL && limit < 1000); |
274 | while (new_obj == NULL && limit < 1000); |
275 | if (new_obj->head) |
275 | if (new_obj->head) |
276 | return new_obj->head; |
276 | return new_obj->head; |
277 | else |
277 | else |