Browse Source

drop 'depreciated_skip..()'

pre-master-46
rlar 10 years ago
parent
commit
bd50814677
  1. 7
      src/frontend/inpcom.c
  2. 2
      src/include/ngspice/stringskip.h

7
src/frontend/inpcom.c

@ -6166,14 +6166,15 @@ inp_quote_params(struct line *c, struct line *end_c, struct dependency *deps, in
char *rest = s + strlen(deps[i].param_name);
if ((isspace_c(s[-1]) || s[-1] == '=') &&
if (s > curr_line &&
(isspace_c(s[-1]) || s[-1] == '=') &&
(isspace_c(*rest) || *rest == '\0' || *rest == ')'))
{
int prefix_len;
if (isspace_c(s[-1])) {
s = depreciated_skip_back_ws(s);
if (s[-1] == '{')
s = skip_back_ws(s, curr_line);
if (s > curr_line && s[-1] == '{')
s--;
}

2
src/include/ngspice/stringskip.h

@ -4,8 +4,6 @@
static inline char *skip_non_ws(const char *s) { while (*s && !isspace_c(*s)) s++; return (char *) s; }
static inline char *skip_ws(const char *s) { while ( isspace_c(*s)) s++; return (char *) s; }
static inline char *depreciated_skip_back_non_ws(char *s) { while (s[-1] && !isspace_c(s[-1])) s--; return s; }
static inline char *depreciated_skip_back_ws(char *s) { while (isspace_c(s[-1])) s--; return s; }
static inline char *skip_back_non_ws(const char *s, const char *start) { while (s > start && !isspace_c(s[-1])) s--; return (char *) s; }
static inline char *skip_back_ws(const char *s, const char *start) { while (s > start && isspace_c(s[-1])) s--; return (char *) s; }

Loading…
Cancel
Save