Difference for server/shop.c from version 1.10 to 1.11


version 1.10 version 1.11
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_shop_c =   * static char *rcsid_shop_c =
  *   "$Id: shop.c,v 1.10 2001/06/04 06:41:02 mwedel Exp $";   *   "$Id: shop.c,v 1.11 2001/06/07 06:08:23 mwedel Exp $";
  */   */
   
 /*  /*
Line 599
 
Line 599
 {  {
     char buf[MAX_BUF];      char buf[MAX_BUF];
   
     if (*numitems==*numallocated) {  
  items=realloc(items, sizeof(shopinv)*(*numallocated+10));  
  *numallocated+=10;  
     }  
     /* clear unpaid flag so that doesn't come up in query      /* clear unpaid flag so that doesn't come up in query
      * string.  We clear nrof so that we can better sort       * string.  We clear nrof so that we can better sort
      * the object names.       * the object names.
Line 622
 
Line 618
      sprintf(buf,"%s %s",query_base_name(tmp,0),describe_item(tmp));       sprintf(buf,"%s %s",query_base_name(tmp,0),describe_item(tmp));
      items[*numitems].item_sort = strdup_local(buf);       items[*numitems].item_sort = strdup_local(buf);
      sprintf(buf,"%s %s",query_name(tmp),describe_item(tmp));       sprintf(buf,"%s %s",query_name(tmp),describe_item(tmp));
      items[*numitems++].item_real = strdup_local(buf);       items[*numitems].item_real = strdup_local(buf);
        (*numitems)++;
      break;       break;
   
  default:   default:
      items[*numitems].item_sort = strdup_local(query_base_name(tmp, 0));       items[*numitems].item_sort = strdup_local(query_base_name(tmp, 0));
      items[*numitems++].item_real = strdup_local(query_name(tmp));       items[*numitems].item_real = strdup_local(query_name(tmp));
        (*numitems)++;
      break;       break;
     }      }
       SET_FLAG(tmp, FLAG_UNPAID);
 }  }
   
 void shop_listing(object *op)  void shop_listing(object *op)
Line 657
 
Line 656
   
  while (stack) {   while (stack) {
      if (QUERY_FLAG(stack, FLAG_UNPAID)) {       if (QUERY_FLAG(stack, FLAG_UNPAID)) {
    if (numitems==numallocated) {
        items=realloc(items, sizeof(shopinv)*(numallocated+10));
        numallocated+=10;
    }
  add_shop_item(stack, items, &numitems, &numallocated);   add_shop_item(stack, items, &numitems, &numallocated);
      }       }
      stack = stack->above;       stack = stack->above;


Legend:
line(s) removed in v.1.10 
line(s) changed
 line(s) added in v.1.11

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