- * loc_last_ptr = try_malloc(sizeof(struct KeyBinding), f_name);
- struct KeyBinding * kb_p = * loc_last_ptr;
- kb_p->next = 0;
- kb_p->key = atoi(line);
- cmdptr = strchr(line, ' ') + 1;
- cmdptr[strlen(cmdptr) - 1] = '\0';
- kb_p->command = get_command(cmdptr);
- loc_last_ptr = & kb_p->next;
- }
- kbd->edit = 0;
- kbd->select = 0;
-}
-
-
+ err_line(' ' == line[strlen(line) - 2], line, context, err_space);
+ char * ptr_space;
+ err_line(!(ptr_space = strchr(line, ' ')), line, context, err_nospace);
+ uint8_t i = 0;
+ err_line(0 == (ptr_space - line), line, context, err_int);
+ for (; i < (ptr_space - line); i++)
+ {
+ err_line(line[i] < '0' || '9' < line[i], line, context, err_int);
+ }
+ err_line(i > 3, line, context, err_toolarge);