| version 1.15 | | version 1.16 |
|---|
| | |
| char *rcsid_x11_xutil_c = | | char *rcsid_x11_xutil_c = |
| "$Id: xutil.c,v 1.15 2004/01/31 16:19:38 tchize Exp $"; | | "$Id: xutil.c,v 1.16 2004/01/31 20:13:11 tchize Exp $"; |
| /* | | /* |
| Crossfire client, a client program for the crossfire program. | | Crossfire client, a client program for the crossfire program. |
| | | |
| | |
| } | | } |
| /* Rest of the line is the actual command. Lets kill the newline */ | | /* Rest of the line is the actual command. Lets kill the newline */ |
| cpnext[strlen(cpnext)-1]='\0'; | | cpnext[strlen(cpnext)-1]='\0'; |
| | | if (strlen(cpnext)>(sizeof(bind_buf)-1)){ |
| | | cpnext[sizeof(bind_buf)-1]='\0'; |
| | | LOG(LOG_WARNING,"gtk::parse_keybind_line","Had to truncate a too long command"); |
| | | } |
| insert_key(keysym, keycode, flags | standard, cpnext); | | insert_key(keysym, keycode, flags | standard, cpnext); |
| } | | } |
| | | |
| | |
| */ | | */ |
| static char * get_key_info(Key_Entry *key, KeyCode kc, int save_mode) | | static char * get_key_info(Key_Entry *key, KeyCode kc, int save_mode) |
| { | | { |
| static char buf[MAX_BUF]; | | /* bind buf is the maximum space allowed for a |
| | | * binded command. We will add additional datas to |
| | | * it so we increase by MAX_BUF*/ |
| | | static char buf[MAX_BUF+sizeof(bind_buf)]; |
| char buff[MAX_BUF]; | | char buff[MAX_BUF]; |
| int bi=0; | | int bi=0; |
| | | |