version 1.45 | | version 1.46 |
---|
| | |
| | |
/* | | /* |
* static char *rcs_treasure_c = | | * static char *rcs_treasure_c = |
* "$Id: treasure.c,v 1.45 2004/02/09 08:04:24 mwedel Exp $"; | | * "$Id: treasure.c,v 1.46 2004/03/03 01:17:09 temitchell Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void init_artifacts() { | | void init_artifacts() { |
static int has_been_inited=0; | | static int has_been_inited=0; |
FILE *fp; | | FILE *fp; |
char filename[MAX_BUF], buf[MAX_BUF], *cp, *next; | | char filename[MAX_BUF], buf[HUGE_BUF], *cp, *next; |
artifact *art=NULL; | | artifact *art=NULL; |
linked_char *tmp; | | linked_char *tmp; |
int value, comp; | | int value, comp; |
| | |
return; | | return; |
} | | } |
| | |
while (fgets(buf, MAX_BUF, fp)!=NULL) { | | while (fgets(buf, HUGE_BUF, fp)!=NULL) { |
if (*buf=='#') continue; | | if (*buf=='#') continue; |
if((cp=strchr(buf,'\n'))!=NULL) | | if((cp=strchr(buf,'\n'))!=NULL) |
*cp='\0'; | | *cp='\0'; |
| | |
} | | } |
free_artifactlist(first_artifactlist); | | free_artifactlist(first_artifactlist); |
} | | } |
| | |