Difference for server/c_new.c from version 1.8 to 1.9


version 1.8 version 1.9
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_new_c =   * static char *rcsid_c_new_c =
  *   "$Id: c_new.c,v 1.8 2005/01/16 11:31:38 tchize Exp $";   *   "$Id: c_new.c,v 1.9 2006/03/18 15:05:37 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 40
 
Line 40
   
 static int compare_A(const void *a, const void *b)  static int compare_A(const void *a, const void *b)
 {  {
   return strcmp(((CommArray_s *)a)->name, ((CommArray_s *)b)->name);      return strcmp(((command_array_struct *)a)->name, ((command_array_struct *)b)->name);
 }  }
   
 static CommArray_s *find_command_element(char *cmd, CommArray_s *commarray,  static command_array_struct *find_command_element(char *cmd, command_array_struct *commarray,
     int commsize)      int commsize)
 {  {
   CommArray_s *asp, dummy;    command_array_struct *asp, dummy;
   char *cp;    char *cp;
   
   for (cp=cmd; *cp; cp++)    for (cp=cmd; *cp; cp++)
     *cp =tolower(*cp);      *cp =tolower(*cp);
   
   dummy.name =cmd;    dummy.name =cmd;
   asp =(CommArray_s *)bsearch((void *)&dummy,    asp =(command_array_struct *)bsearch((void *)&dummy,
        (void *)commarray, commsize,         (void *)commarray, commsize,
        sizeof(CommArray_s), compare_A);         sizeof(command_array_struct), compare_A);
   return asp;    return asp;
 }  }
   
 /* This function is called from the new client/server code.  /**
    * This function is called from the new client/server code.
  * pl is the player who is issuing the command, command is the   * pl is the player who is issuing the command, command is the
  * command.   * command.
  */   */
 int execute_newserver_command(object *pl, char *command)  int execute_newserver_command(object *pl, char *command)
 {  {
     CommArray_s *csp;      command_array_struct *csp;
     char *cp;      char *cp;
   
     pl->contr->has_hit=0;      pl->contr->has_hit=0;


Legend:
line(s) removed in v.1.8 
line(s) changed
 line(s) added in v.1.9

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