Difference for common/loader.c from version 1.68 to 1.69


version 1.68 version 1.69
Line 1
 
Line 1
 /* A lexical scanner generated by flex */  /* A lexical scanner generated by flex */
   
 /* Scanner skeleton version:  /* Scanner skeleton version:
  * $Header: /cvsroot/crossfire/crossfire/common/loader.c,v 1.68 2005/08/23 05:42:57 mwedel Exp $   * $Header: /cvsroot/crossfire/crossfire/common/loader.c,v 1.69 2005/08/29 20:18:06 akirschbaum Exp $
  */   */
   
 #define FLEX_SCANNER  #define FLEX_SCANNER
Line 1844
 
Line 1844
 #line 2 "loader.l"  #line 2 "loader.l"
 /*  /*
  * static char *rcsid_object_c =   * static char *rcsid_object_c =
  *   "$Id: loader.c,v 1.68 2005/08/23 05:42:57 mwedel Exp $";   *   "$Id: loader.c,v 1.69 2005/08/29 20:18:06 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 2174
 
Line 2174
  */   */
 static void check_loaded_object(object *op) {  static void check_loaded_object(object *op) {
     int ip;      int ip;
     char buf[MAX_BUF], *p;  
     materialtype_t *mt;  
   
     /* We do some specialized handling to handle legacy cases of name_pl.      /* We do some specialized handling to handle legacy cases of name_pl.
      * If the object doesn't have a name_pl, we just use the object name -       * If the object doesn't have a name_pl, we just use the object name -
Line 2199
 
Line 2197
         else          else
             set_materialname(op, 5, NULL);              set_materialname(op, 5, NULL);
     }      }
     /* back out the materialname from op->name very limited subset of obs */  
     if ((IS_WEAPON(op) || IS_ARMOR(op)) && op->name && op->materialname) {  
         mt = name_to_material(op->materialname);  
         if (mt && strstr(op->name, mt->description) &&  
      strstr(op->name, mt->description) == op->name) {  
      sprintf(buf, "%s", op->name);  
      p = buf + strlen(mt->description) + 1;  
      free_string(op->name);  
      op->name = add_string(p);  
      sprintf(buf, "%s", op->name_pl);  
      p = buf + strlen(mt->description) + 1;  
      free_string(op->name_pl);  
      op->name_pl = add_string(p);  
  }  
     }  
     /* only do these when program is first run - a bit      /* only do these when program is first run - a bit
      * excessive to do this at every run - most of this is       * excessive to do this at every run - most of this is
      * really just to catch any errors - program will still run, but       * really just to catch any errors - program will still run, but


Legend:
line(s) removed in v.1.68 
line(s) changed
 line(s) added in v.1.69

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