1 | /* |
1 | /* |
2 | * static char *rcsid_map_c = |
2 | * static char *rcsid_map_c = |
3 | * "$Id: map.c,v 1.10 2006/04/01 15:39:58 root Exp $"; |
3 | * "$Id: map.c,v 1.11 2006/05/12 23:42:59 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
703 | int i=0, number_of_entries=0; |
703 | int i=0, number_of_entries=0; |
704 | const typedata *current_type; |
704 | const typedata *current_type; |
705 | |
705 | |
706 | shop_string=strdup_local(input_string); |
706 | shop_string=strdup_local(input_string); |
707 | p=shop_string; |
707 | p=shop_string; |
708 | LOG(llevDebug, "parsing %s\n", input_string); |
|
|
709 | /* first we'll count the entries, we'll need that for allocating the array shortly */ |
708 | /* first we'll count the entries, we'll need that for allocating the array shortly */ |
710 | while (p) { |
709 | while (p) { |
711 | p=strchr(p, ';'); |
710 | p=strchr(p, ';'); |
712 | number_of_entries++; |
711 | number_of_entries++; |
713 | if (p) p++; |
712 | if (p) p++; |