search for: skip_spac

Displaying 4 results from an estimated 4 matches for "skip_spac".

Did you mean: skip_spaces
2010 Apr 09
2
[PATCH] gfxboot: support MENU LABEL statement
...enu_t *menu_ptr, char *arg); @@ -234,7 +234,7 @@ int main(int argc, char **argv) } // does not return if it succeeds - boot(); + boot(menu_index); } if(argc > 2) show_message(argv[2]); @@ -321,19 +321,19 @@ int read_config_file(void) if(*t) *t++ = 0; t = skip_spaces(t); - if(!strcmp(s, "timeout")) { + if(!strcasecmp(s, "timeout")) { timeout = atoi(t); continue; } - if(!strcmp(s, "default")) { + if(!strcasecmp(s, "default")) { menu_default->label = strdup(t); u = st...
2010 Jul 14
1
[PATCH] gfxboot: allow boot entry to start with label instead of menu_label
...nt index) { char *arg, *alt_kernel; menu_t *menu_ptr; - int i, label_len; + int i, label_len, menu_label_len; unsigned ipapp; const struct syslinux_ipappend_strings *ipappend; @@ -802,18 +802,22 @@ void boot(int index) if(!menu_ptr || !menu_ptr->menu_label) return; arg = skip_spaces(cmdline); - label_len = strlen(menu_ptr->menu_label); + label_len = strlen(menu_ptr->label); + menu_label_len = strlen(menu_ptr->menu_label); // if it does not start with label string, assume first word is kernel name - if(strncmp(arg, menu_ptr->menu_label, label_len)) { + i...
2010 Jul 14
2
[PATCH] gfxboot: add include and menu include support
...641..3b09e74 100644 --- a/com32/gfxboot/gfxboot.c +++ b/com32/gfxboot/gfxboot.c @@ -134,6 +134,7 @@ gfx_menu_t gfx_menu; menu_t *menu; menu_t *menu_default; +static menu_t *menu_ptr, **menu_next; struct { uint32_t jmp_table[12]; @@ -161,7 +162,7 @@ char *get_config_file_name(void); char *skip_spaces(char *s); char *skip_nonspaces(char *s); void chop_line(char *s); -int read_config_file(void); +int read_config_file(const char *filename); unsigned magic_ok(unsigned char *buf, unsigned *code_size); unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, unsigned *file...
2010 Apr 23
1
Path simple menu integrated progress indicator
...lse; + +static const char *refdup_word(char **p) +{ + char *sp = *p; + char *ep = sp; + + while (*ep && !my_isspace(*ep)) + ep++; + + *p = ep; + return refstrndup(sp, ep - sp); +} + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +char *skip_spaces(char *s) +{ + while(*s && (*s == ' ' || *s == '\t')) s++; + + return s; +} + + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +char *skip_nonspaces(char *s) +{ + while(*s && *s != ' ' && *s != '\t') s++; +...