Difference for x11/xutil.c from version 1.16 to 1.17


version 1.16 version 1.17
Line 1
 
Line 1
 char *rcsid_x11_xutil_c =  char *rcsid_x11_xutil_c =
     "$Id: xutil.c,v 1.16 2004/01/31 20:13:11 tchize Exp $";      "$Id: xutil.c,v 1.17 2005/02/10 07:03:56 mwedel Exp $";
 /*  /*
     Crossfire client, a client program for the crossfire program.      Crossfire client, a client program for the crossfire program.
   
Line 30
 
Line 30
 #include <client.h>  #include <client.h>
 #include <item.h>  #include <item.h>
 #include <config.h>  #include <config.h>
   #include <p_cmd.h>
   
 #ifdef HAVE_LIBXPM  #ifdef HAVE_LIBXPM
 #include <X11/xpm.h>  #include <X11/xpm.h>
Line 244
 
Line 245
     Key_Entry *newkey;      Key_Entry *newkey;
     int i, direction=-1;      int i, direction=-1;
   
   #if 0
       /* This is at least a meaningless check on my system that results in
        * a compile warning (always false result), so may was well comment it
        * out - MSW 2005-02-09
        */
     if (keycode>MAX_KEYCODE) {      if (keycode>MAX_KEYCODE) {
  LOG(LOG_WARNING,"x11::insert_key", "keycode that is passed is greater than 255.");   LOG(LOG_WARNING,"x11::insert_key", "keycode that is passed is greater than 255.");
  keycode=0; /* hopefully the rest of the data is OK */   keycode=0; /* hopefully the rest of the data is OK */
     }      }
   #endif
     if (keys[keycode]==NULL) {      if (keys[keycode]==NULL) {
  keys[keycode]=malloc(sizeof(Key_Entry));   keys[keycode]=malloc(sizeof(Key_Entry));
  keys[keycode]->command=NULL;   keys[keycode]->command=NULL;
Line 809
 
Line 816
   
   
   
 void bind_key(char *params)  void bind_key(const char *params)
 {  {
   char buf[MAX_BUF];    char buf[MAX_BUF];
   
Line 922
 
Line 929
     return;      return;
   }    }
   
     strncpy(bind_buf, params, sizeof(bind_buf)-1);
     bind_buf[sizeof(bind_buf)-1]=0;
     if (strlen(params) >= sizeof(bind_buf)) {      if (strlen(params) >= sizeof(bind_buf)) {
  params[sizeof(bind_buf) - 1] = '\0';  
     draw_info("Keybinding too long! Truncated:",NDI_RED);      draw_info("Keybinding too long! Truncated:",NDI_RED);
     draw_info(params,NDI_RED);      draw_info(bind_buf,NDI_RED);
     }      }
   sprintf(buf, "Push key to bind '%s'.", params);  
     sprintf(buf, "Push key to bind '%s'.", bind_buf);
   draw_info(buf,NDI_BLACK);    draw_info(buf,NDI_BLACK);
   strcpy(bind_buf, params);  
   bind_keycode=NULL;    bind_keycode=NULL;
   cpl.input_state = Configure_Keys;    cpl.input_state = Configure_Keys;
   return;    return;
Line 1067
 
Line 1075
     draw_info("    -g unbinds a global binding", NDI_BLACK);      draw_info("    -g unbinds a global binding", NDI_BLACK);
 }  }
   
 void unbind_key(char *params)  void unbind_key(const char *params)
 {  {
     int count=0, keyentry, onkey,global=0;      int count=0, keyentry, onkey,global=0;
     Key_Entry *key, *tmp;      Key_Entry *key, *tmp;


Legend:
line(s) removed in v.1.16 
line(s) changed
 line(s) added in v.1.17

File made using version 1.96 of cvs2html by leaf at 2006-02-16 21:08