Difference for common/treasure.c from version 1.61 to 1.62


version 1.61 version 1.62
Line 1
 
Line 1
   
 /*  /*
  * static char *rcs_treasure_c =   * static char *rcs_treasure_c =
  *   "$Id: treasure.c,v 1.61 2005/11/16 08:16:00 mwedel Exp $";   *   "$Id: treasure.c,v 1.62 2005/12/05 23:34:03 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 70
 
Line 70
  * Allocate and return the pointer to an empty treasurelist structure.   * Allocate and return the pointer to an empty treasurelist structure.
  */   */
   
 static treasurelist *get_empty_treasurelist() {  static treasurelist *get_empty_treasurelist(void) {
   treasurelist *tl = (treasurelist *) malloc(sizeof(treasurelist));    treasurelist *tl = (treasurelist *) malloc(sizeof(treasurelist));
   if(tl==NULL)    if(tl==NULL)
     fatal(OUT_OF_MEMORY);      fatal(OUT_OF_MEMORY);
Line 82
 
Line 82
  * Allocate and return the pointer to an empty treasure structure.   * Allocate and return the pointer to an empty treasure structure.
  */   */
   
 static treasure *get_empty_treasure() {  static treasure *get_empty_treasure(void) {
   treasure *t = (treasure *) calloc(1,sizeof(treasure));    treasure *t = (treasure *) calloc(1,sizeof(treasure));
   if(t==NULL)    if(t==NULL)
     fatal(OUT_OF_MEMORY);      fatal(OUT_OF_MEMORY);
Line 178
 
Line 178
  * Each treasure is parsed with the help of load_treasure().   * Each treasure is parsed with the help of load_treasure().
  */   */
   
 void load_treasures() {  void load_treasures(void) {
     FILE *fp;      FILE *fp;
     char filename[MAX_BUF], buf[MAX_BUF], name[MAX_BUF];      char filename[MAX_BUF], buf[MAX_BUF], name[MAX_BUF];
     treasurelist *previous=NULL;      treasurelist *previous=NULL;
Line 1041
 
Line 1041
  * Allocate and return the pointer to an empty artifactlist structure.   * Allocate and return the pointer to an empty artifactlist structure.
  */   */
   
 static artifactlist *get_empty_artifactlist() {  static artifactlist *get_empty_artifactlist(void) {
   artifactlist *tl = (artifactlist *) malloc(sizeof(artifactlist));    artifactlist *tl = (artifactlist *) malloc(sizeof(artifactlist));
   if(tl==NULL)    if(tl==NULL)
     fatal(OUT_OF_MEMORY);      fatal(OUT_OF_MEMORY);
Line 1055
 
Line 1055
  * Allocate and return the pointer to an empty artifact structure.   * Allocate and return the pointer to an empty artifact structure.
  */   */
   
 static artifact *get_empty_artifact() {  static artifact *get_empty_artifact(void) {
   artifact *t = (artifact *) malloc(sizeof(artifact));    artifact *t = (artifact *) malloc(sizeof(artifact));
   if(t==NULL)    if(t==NULL)
     fatal(OUT_OF_MEMORY);      fatal(OUT_OF_MEMORY);
Line 1084
 
Line 1084
  * For debugging purposes.  Dumps all tables.   * For debugging purposes.  Dumps all tables.
  */   */
   
 void dump_artifacts() {  void dump_artifacts(void) {
   artifactlist *al;    artifactlist *al;
   artifact *art;    artifact *art;
   linked_char *next;    linked_char *next;
Line 1189
 
Line 1189
  * Builds up the lists of artifacts from the file in the libdir.   * Builds up the lists of artifacts from the file in the libdir.
  */   */
   
 void init_artifacts() {  void init_artifacts(void) {
     static int has_been_inited=0;      static int has_been_inited=0;
     FILE *fp;      FILE *fp;
     char filename[MAX_BUF], buf[HUGE_BUF], *cp, *next;      char filename[MAX_BUF], buf[HUGE_BUF], *cp, *next;
Line 1718
 
Line 1718
     }      }
 }  }
   
 void free_all_treasures() {  void free_all_treasures(void) {
 treasurelist *tl, *next;  treasurelist *tl, *next;
   
   


Legend:
line(s) removed in v.1.61 
line(s) changed
 line(s) added in v.1.62

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:18