Branch: Tag:

2008-05-15

2008-05-15 15:13:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added flags parameter to o_sscanf().
langauge.yacc now knows how to pass flags along to o_sscanf().
Updated F_SSCANF opcode to allow for passing of flags to o_sscanf().

Rev: src/docode.c:1.200
Rev: src/interpret_functions.h:1.203
Rev: src/language.yacc:1.422
Rev: src/las.c:1.408
Rev: src/sscanf.c:1.177
Rev: src/sscanf.h:1.3
Rev: src/treeopt.in:1.96

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: las.c,v 1.407 2008/05/01 20:41:43 mast Exp $ + || $Id: las.c,v 1.408 2008/05/15 15:13:04 grubba Exp $   */      #include "global.h"
4103:    break;       case F_SSCANF: -  if (!CAR(n) || (CAR(n)->token != F_ARG_LIST) || -  !CAAR(n) || !CDAR(n)) { +  if (!CAR(n) || (CAR(n)->token != ':') || +  !CDAR(n) || (CDAR(n)->token != F_ARG_LIST) || +  !CADAR(n) || !CDDAR(n)) {    yyerror("Too few arguments to sscanf().");    } else {    check_node_type(CAAR(n), string_type_string,
4263: Inside #if defined(SHARED_NODES)
   usage[i] |= catch_u[i];    }    /* Only the first two arguments are evaluated. */ -  if (CAR(n)) { -  find_usage(CDAR(n), usage, switch_u, cont_u, break_u, catch_u); -  find_usage(CAAR(n), usage, switch_u, cont_u, break_u, catch_u); +  if (CAR(n) && CDAR(n)) { +  find_usage(CDDAR(n), usage, switch_u, cont_u, break_u, catch_u); +  find_usage(CADAR(n), usage, switch_u, cont_u, break_u, catch_u);    }    return;    }
4549: Inside #if defined(SHARED_NODES)
   usage[i] |= catch_u[i];    }    /* Only the first two arguments are evaluated. */ -  if (CAR(n)) { -  cdr = low_localopt(CDAR(n), usage, switch_u, cont_u, break_u, catch_u); -  car = low_localopt(CAAR(n), usage, switch_u, cont_u, break_u, catch_u); +  if (CAR(n) && CDAR(n)) { +  cdr = low_localopt(CDDAR(n), usage, switch_u, cont_u, break_u, catch_u); +  car = low_localopt(CADAR(n), usage, switch_u, cont_u, break_u, catch_u);       if (CDR(n)) {    ADD_NODE_REF(CDR(n));    } -  return mknode(F_SSCANF, mknode(F_ARG_LIST, car, cdr), CDR(n)); +  return mknode(F_SSCANF, mknode(':', CAAR(n), +  mknode(F_ARG_LIST, car, cdr)), CDR(n));    }    ADD_NODE_REF(n);    return n;