Difference for common/arch.c from version 1.34 to 1.35


version 1.34 version 1.35
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_arch_c =   * static char *rcsid_arch_c =
  *   "$Id: arch.c,v 1.34 2005/10/28 19:08:53 akirschbaum Exp $";   *   "$Id: arch.c,v 1.35 2005/12/05 23:34:03 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 264
 
Line 264
  * Then the blocksview[] array is initialised.   * Then the blocksview[] array is initialised.
  */   */
   
 void init_archetypes() { /* called from add_player() and edit() */  void init_archetypes(void) { /* called from add_player() and edit() */
   if(first_archetype!=NULL) /* Only do this once */    if(first_archetype!=NULL) /* Only do this once */
     return;      return;
   arch_init = 1;    arch_init = 1;
Line 288
 
Line 288
  * Initialise the hashtable used by the archetypes.   * Initialise the hashtable used by the archetypes.
  */   */
   
 void clear_archetable() {  void clear_archetable(void) {
   memset((void *) arch_table,0,ARCHTABLE*sizeof(archetype *));    memset((void *) arch_table,0,ARCHTABLE*sizeof(archetype *));
 }  }
   
Line 296
 
Line 296
  * An alternative way to init the hashtable which is slower, but _works_...   * An alternative way to init the hashtable which is slower, but _works_...
  */   */
   
 void init_archetable() {  void init_archetable(void) {
   archetype *at;    archetype *at;
   LOG(llevDebug," Setting up archetable...");    LOG(llevDebug," Setting up archetable...");
   for(at=first_archetype;at!=NULL;at=(at->more==NULL)?at->next:at->more)    for(at=first_archetype;at!=NULL;at=(at->more==NULL)?at->next:at->more)
Line 318
 
Line 318
  * this with the O key.   * this with the O key.
  */   */
   
 void dump_all_archetypes() {  void dump_all_archetypes(void) {
   archetype *at;    archetype *at;
   for(at=first_archetype;at!=NULL;at=(at->more==NULL)?at->next:at->more) {    for(at=first_archetype;at!=NULL;at=(at->more==NULL)?at->next:at->more) {
     dump_arch(at);      dump_arch(at);
Line 326
 
Line 326
   }    }
 }  }
   
 void free_all_archs()  void free_all_archs(void)
 {  {
     archetype *at, *next;      archetype *at, *next;
     int i=0,f=0;      int i=0,f=0;
Line 351
 
Line 351
  * Allocates, initialises and returns the pointer to an archetype structure.   * Allocates, initialises and returns the pointer to an archetype structure.
  */   */
   
 archetype *get_archetype_struct() {  archetype *get_archetype_struct(void) {
   archetype *new;    archetype *new;
   
   new=(archetype *)CALLOC(1,sizeof(archetype));    new=(archetype *)CALLOC(1,sizeof(archetype));
Line 490
 
Line 490
 }  }
   
 #ifdef DEBUG  #ifdef DEBUG
 void check_generators() {  void check_generators(void) {
   archetype *at;    archetype *at;
   for(at=first_archetype;at!=NULL;at=at->next)    for(at=first_archetype;at!=NULL;at=at->next)
     if(QUERY_FLAG(&at->clone,FLAG_GENERATOR)&&at->clone.other_arch==NULL)      if(QUERY_FLAG(&at->clone,FLAG_GENERATOR)&&at->clone.other_arch==NULL)
Line 506
 
Line 506
  * Then initialises treasures by calling load_treasures().   * Then initialises treasures by calling load_treasures().
  */   */
   
 void load_archetypes() {  void load_archetypes(void) {
     FILE *fp;      FILE *fp;
     char filename[MAX_BUF];      char filename[MAX_BUF];
     int comp;      int comp;


Legend:
line(s) removed in v.1.34 
line(s) changed
 line(s) added in v.1.35

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