diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-07-23 22:25:46 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-07-23 22:25:46 +0000 |
commit | 58d9823409c590fe0e4cf3220d38dcad1d6dd68d (patch) | |
tree | fcf62865bef797f16e7e83392923fcfbc80e861b /src/misc2.c | |
parent | b01585904a5e4a6dc8bc8cc2aaaf7fbca260e344 (diff) | |
download | vim-git-58d9823409c590fe0e4cf3220d38dcad1d6dd68d.tar.gz |
updated for version 7.0114v7.0114
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/src/misc2.c b/src/misc2.c index 8434ec611..db6642ee9 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -5557,80 +5557,6 @@ pathcmp(p, q, maxlen) } #endif -#if defined(FEAT_PRINTER) || defined(PROTO) -/* - * Parse a list of options in the form - * option:value,option:value,option:value - * - * "value" can start with a number which is parsed out, e.g. - * margin:12mm - * - * Returns error message for an illegal option, NULL otherwise. - * Only used for the printer at the moment... - */ - char_u * -parse_list_options(option_str, table, table_size) - char_u *option_str; - option_table_T *table; - int table_size; -{ - char_u *stringp; - char_u *colonp; - char_u *commap; - char_u *p; - int idx = 0; /* init for GCC */ - int len; - - for (idx = 0; idx < table_size; ++idx) - table[idx].present = FALSE; - - /* - * Repeat for all comma separated parts. - */ - stringp = option_str; - while (*stringp) - { - colonp = vim_strchr(stringp, ':'); - if (colonp == NULL) - return (char_u *)N_("E550: Missing colon"); - commap = vim_strchr(stringp, ','); - if (commap == NULL) - commap = option_str + STRLEN(option_str); - - len = (int)(colonp - stringp); - - for (idx = 0; idx < table_size; ++idx) - if (STRNICMP(stringp, table[idx].name, len) == 0) - break; - - if (idx == table_size) - return (char_u *)N_("E551: Illegal component"); - - p = colonp + 1; - table[idx].present = TRUE; - - if (table[idx].hasnum) - { - if (!VIM_ISDIGIT(*p)) - return (char_u *)N_("E552: digit expected"); - - table[idx].number = getdigits(&p); /*advances p*/ - } - - table[idx].string = p; - table[idx].strlen = (int)(commap - p); - - stringp = commap; - if (*stringp == ',') - ++stringp; - } - - return NULL; -} - - -#endif /*FEAT_PRINTER*/ - /* * The putenv() implementation below comes from the "screen" program. * Included with permission from Juergen Weigert. |