English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Diff of /branches/common-nfo/tools/nfotiser/pfile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3471 by tg, Thu Aug 9 16:28:02 2007 UTC revision 3472 by tg, Thu Aug 9 16:38:17 2007 UTC
# Line 188  do_varexpand(struct parser_result *head) Line 188  do_varexpand(struct parser_result *head)
188                  /* cp points past a dollar sign, copy head */                  /* cp points past a dollar sign, copy head */
189                  dp = str_nsave(entry->value, cp - entry->value - 1);                  dp = str_nsave(entry->value, cp - entry->value - 1);
190                  /* read variable name */                  /* read variable name */
191                  if (*++cp != '{' /*}*/)                  if (*cp != '{' /*}*/)
192                          goto copy_rest;                          goto copy_rest;
193                  tp = ++cp;                  tp = ++cp;
194                  while (*tp && (*tp != /*{*/ '}'))                  while (*tp && (*tp != /*{*/ '}'))
# Line 198  do_varexpand(struct parser_result *head) Line 198  do_varexpand(struct parser_result *head)
198                  *tp++ = '\0';                  *tp++ = '\0';
199                  /* variable name in cp, rest of string in tp */                  /* variable name in cp, rest of string in tp */
200                  evar = parse_lookupbyname(head, cp);                  evar = parse_lookupbyname(head, cp);
201                    tp[-1] = /*{*/ '}';
202                  cp = tp;                  cp = tp;
203                  /* variable content in evar, rest of string in cp */                  /* variable content in evar, rest of string in cp */
204                  if (evar && evar->value)                  if (evar && evar->value)
# Line 308  parse_lookupbyname(struct parser_result Line 309  parse_lookupbyname(struct parser_result
309    
310          iname = varnameck(__func__, name);          iname = varnameck(__func__, name);
311    
312            D(2, "parse_lookupbyname: try '%s' (orig '%s')\n", iname, name);
313    
314          CIRCLEQ_FOREACH(entry, head, e) {          CIRCLEQ_FOREACH(entry, head, e) {
315                  if ((kw = parser_getkwbynum(entry->keyword, kwords)) == NULL)                  if ((kw = parser_getkwbynum(entry->keyword, kwords)) == NULL)
316                          continue;                          continue;
# Line 330  parse_lookupbyname(struct parser_result Line 333  parse_lookupbyname(struct parser_result
333                  free(cp);                  free(cp);
334                  if (!strcmp(iname, ename))                  if (!strcmp(iname, ename))
335                          found = true;                          found = true;
336                    D(2, "parse_lookupbyname: cmp '%s', %smatch\n", ename,
337                        found ? "" : "no ");
338                  free(ename);                  free(ename);
339                  if (found)                  if (found)
340                          break;                          break;

Legend:
Removed from v.3471  
changed lines
  Added in v.3472

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20