pike.git / src / modules / Parser / html.c

version» Context lines:

pike.git/src/modules/Parser/html.c:84:      struct piece   {    struct pike_string *s;    struct piece *next;   };      static struct block_allocator piece_allocator    = BA_INIT_PAGES(sizeof(struct piece), 2);    - static INLINE struct piece * alloc_piece() { + static inline struct piece * alloc_piece(void) {    struct piece * p = ba_alloc(&piece_allocator);    p->next = NULL;    return p;   }    - static INLINE void really_free_piece(struct piece * p) { + static inline void really_free_piece(struct piece * p) {    free_string(p->s);    ba_free(&piece_allocator, p);   }      struct out_piece   {    struct svalue v;    struct out_piece *next;   };      static struct block_allocator out_piece_allocator    = BA_INIT_PAGES(sizeof(struct out_piece), 2);    - static INLINE struct out_piece * alloc_out_piece() { + static inline struct out_piece * alloc_out_piece(void) {    struct out_piece * p = ba_alloc(&out_piece_allocator);    p->next = NULL;    return p;   } - static INLINE void really_free_out_piece(struct out_piece * p) { + static inline void really_free_out_piece(struct out_piece * p) {    free_svalue(&p->v);    ba_free(&out_piece_allocator, p);   }      struct feed_stack   {    int ignore_data, parse_tags;       struct feed_stack *prev;   
pike.git/src/modules/Parser/html.c:136:       /* current position; if not local feed, use global feed */    struct piece *local_feed;    ptrdiff_t c;       struct location pos;   };      static struct block_allocator feed_stack_allocator    = BA_INIT_PAGES(sizeof(struct feed_stack), 1); - static INLINE struct feed_stack * alloc_feed_stack() { + static inline struct feed_stack * alloc_feed_stack(void) {    struct feed_stack * p = ba_alloc(&feed_stack_allocator);    p->local_feed = NULL;    return p;   } - static INLINE void really_free_feed_stack(struct feed_stack * p) { + static inline void really_free_feed_stack(struct feed_stack * p) {    while (p->local_feed) {    struct piece *f=p->local_feed;    p->local_feed=f->next;    really_free_piece (f);    }    ba_free(&feed_stack_allocator, p);   }      enum types {    TYPE_TAG, /* empty tag callback */
pike.git/src/modules/Parser/html.c:207:   /* flag: understand nestled entities (send it all to entity callback) */   /* disabled by FLAG_LAZY_ENTITY_END */   #define FLAG_NESTLING_ENTITY_END 0x00000800      /* flag: ignore --...-- in tag parsing (as in <!--...-->) */   #define FLAG_IGNORE_COMMENTS 0x00001000      /* flag: reparse plain strings used as tag/container/entity callbacks */   #define FLAG_REPARSE_STRINGS 0x00002000    + /* flag: attribute quote stapling. (q=f"o'o"'b"a'r == q="fo'ob&quot;ar") */ + #define FLAG_QUOTE_STAPLING 0x00004000 +    /* default characters */   #define DEF_WS ' ', '\n', '\r', '\t', '\v'   #define DEF_TAG_START '<'   #define DEF_TAG_END '>'   #define DEF_TAG_FIN '/'   #define DEF_ENT_START '&'   #define DEF_ENT_END ';'   #define DEF_ARGQ_STARTS '\"', '\''   #define DEF_ARGQ_STOPS '\"', '\''   #define DEF_EQ '='
pike.git/src/modules/Parser/html.c:431:    struct piece *feed, ptrdiff_t c,struct svalue *def,    int skip_name, int to_tag_end);      static int quote_tag_lookup (struct parser_html_storage *this,    struct piece *feed, ptrdiff_t c,    struct piece **destp, ptrdiff_t *d_p,    int finished, struct svalue **mapqentry);      /****** debug helper ********************************/    - /* Avoid loss of precision warnings. */ - #ifdef __ECL - static inline long TO_LONG(ptrdiff_t x) - { -  return DO_NOT_WARN((long)x); - } - #else /* !__ECL */ - #define TO_LONG(x) ((long)(x)) - #endif /* __ECL */ -  +    #ifdef HTML_DEBUG   static void debug_mark_spot(char *desc,struct piece *feed,int c)   {    ptrdiff_t l, i, i0, m;    char buf[40];       if (!(THIS->flags & FLAG_DEBUG_MODE)) return;       l=strlen(desc)+1;    if (l<40) l=40;    m=75-l; if (m<10) m=10; -  fprintf(stderr,"%-*s `",DO_NOT_WARN((int)l),desc); +  fprintf(stderr,"%-*s `",(int)l,desc);    i=c-m/2;    if (i+m>=feed->s->len) i=feed->s->len-m;    if (i<0) i=0;    for (i0=i;i<feed->s->len && i-i0<m;i++)    {    p_wchar2 ch=index_shared_string(feed->s,i);    /* if (i==c) { fprintf(stderr,"^"); continue; }*/    if (ch<32 || (ch>126 && ch<160) || ch>255)    fprintf(stderr,".");    else    fprintf(stderr,"%c",ch);    }       sprintf(buf,"(%ld) %p:%d/%ld ^", -  DO_NOT_WARN((long)i0), -  (void *)feed, c, -  DO_NOT_WARN((long)feed->s->len)); -  fprintf(stderr,"`\n%*s\n", -  DO_NOT_WARN((int)(l+c-i0+3)), -  buf); +  (long)i0, (void *)feed, c, (long)feed->s->len); +  fprintf(stderr,"`\n%*s\n", (int)(l+c-i0+3), buf);   }      static void debug_print_chars (const p_wchar2 *chars, size_t numchars)   {    size_t i;    for (i=0; i<numchars; i++)    if (i > 30) {    fprintf (stderr, "... (number of chars suspiciously large: "    "%"PRINTSIZET"u)", numchars);    break;
pike.git/src/modules/Parser/html.c:508: Inside #if defined(HTML_DEBUG)
   debug_print_chars (LOOK_FOR_START (this), NUM_LOOK_FOR_START (this));    for (i = 0; i < NARGQ (this); i++) {    fprintf (stderr, " look_for_end[%"PRINTSIZET"u]: ", i);    debug_print_chars (LOOK_FOR_END (this)[i], NUM_LOOK_FOR_END (this)[i]);    }   }   #endif      /****** init & exit *********************************/    - static INLINE void reset_stack_head (struct parser_html_storage *this) + static inline void reset_stack_head (struct parser_html_storage *this)   {    this->top.ignore_data=0;    this->top.parse_tags=this->flags & FLAG_PARSE_TAGS;    this->top.pos=init_pos;    this->top.c=0;   }      static void reset_feed(struct parser_html_storage *this)   {    struct feed_stack *st;
pike.git/src/modules/Parser/html.c:643: Inside #if defined(PIKE_DEBUG)
   if (k > NELEM (CC->look_for_end))    Pike_fatal ("Static size of calc_chars.look_for_end is "    "%"PRINTSIZET"d but %"PRINTSIZET"d required.\n",    NELEM (CC->look_for_end), k);   #endif       n = check_fin ? 4 : 3;    n_ws_or_endarg = (ptrdiff_t)(N_WS(this) + n);    ws_or_endarg=alloca(sizeof(p_wchar2)*n_ws_or_endarg);    if (!ws_or_endarg) Pike_error ("Out of stack.\n"); -  MEMCPY(ws_or_endarg+n, WS (this), N_WS (this) * sizeof(p_wchar2)); +  memcpy(ws_or_endarg+n, WS (this), N_WS (this) * sizeof(p_wchar2));    ws_or_endarg[0] = ARG_EQ (this);    ws_or_endarg[1] = TAG_END (this);    ws_or_endarg[2] = TAG_START (this);    if (check_fin) ws_or_endarg[3] = TAG_FIN (this);       CC->n_arg_break_chars=    n_ws_or_endarg + NARGQ (this) + 1 +    ((FLAGS & FLAG_IGNORE_COMMENTS)?1:0);      #ifdef CONFIGURABLE_MARKUP
pike.git/src/modules/Parser/html.c:670:    (p_wchar2*)xalloc(sizeof(p_wchar2)*(CC->n_arg_break_chars));   #else   #ifdef PIKE_DEBUG    if (CC->n_arg_break_chars > NELEM (CC->arg_break_chars))    Pike_fatal ("Static size of calc_chars.arg_break_chars is "    "%"PRINTSIZET"d but %"PRINTSIZET"d required.\n",    NELEM (CC->arg_break_chars), CC->n_arg_break_chars);   #endif   #endif    -  MEMCPY(CC->arg_break_chars, ws_or_endarg, +  memcpy(CC->arg_break_chars, ws_or_endarg,    n_ws_or_endarg*sizeof(p_wchar2));    -  MEMCPY(CC->arg_break_chars+n_ws_or_endarg, +  memcpy(CC->arg_break_chars+n_ws_or_endarg,    ARGQ_START (this), NARGQ (this) * sizeof(p_wchar2));       CC->arg_break_chars[CC->n_arg_break_chars-1] = ENTITY_START (this);    if ((FLAGS & FLAG_IGNORE_COMMENTS))    CC->arg_break_chars[CC->n_arg_break_chars-2] = TAG_COMMENT (this);   }   #undef CC   #undef FLAGS      #ifdef CONFIGURABLE_MARKUP
pike.git/src/modules/Parser/html.c:696:   #define recalculate_argq(this) \    calculate_chars (this); \    DEBUG ((stderr, "Recalculated search chars:\n"); \    debug_print_search_chars (this))   #else   #define recalculate_argq(this) \    this->cc = select_variant (this->flags); \    DEBUG ((stderr, "Using precalculated search chars:\n"); \    debug_print_search_chars (this))    - static INLINE void init_calc_chars(void) + static inline void init_calc_chars(void)   {    int i;    for (i = 0; i < 1 << 3; i++)    calculate_chars (char_variants + i,    ((i & 1) ? FLAG_STRICT_TAGS : 0) |    ((i & 2) ? FLAG_LAZY_END_ARG_QUOTE : 0) |    ((i & 4) ? FLAG_IGNORE_COMMENTS : 0));       tag_end_string = make_shared_binary_string2 (&TAG_END (0), 1);    tag_fin_string = make_shared_binary_string2 (&TAG_FIN (0), 1);   }    - static INLINE void exit_calc_chars(void) + static inline void exit_calc_chars(void)   {    free_string (tag_end_string);    free_string (tag_fin_string);   }    - static INLINE struct calc_chars *select_variant (int flags) + static inline struct calc_chars *select_variant (int flags)   {    return char_variants +    (((flags & (FLAG_STRICT_TAGS|FLAG_XML_TAGS)) == FLAG_STRICT_TAGS ? 1 : 0) |    (flags & FLAG_LAZY_END_ARG_QUOTE ? 2 : 0) |    (flags & FLAG_IGNORE_COMMENTS ? 4 : 0));   }   #endif      static void init_html_struct(struct object *UNUSED(o))   {
pike.git/src/modules/Parser/html.c:742:    THIS->start=NULL;      #ifdef CONFIGURABLE_MARKUP    /* default set */    THIS->tag_start=DEF_TAG_START;    THIS->tag_end=DEF_TAG_END;    THIS->tag_fin=DEF_TAG_FIN;    THIS->entity_start=DEF_ENT_START;    THIS->entity_end=DEF_ENT_END;    THIS->nargq=NELEM(argq_start); -  MEMCPY(THIS->argq_start,argq_start,sizeof(argq_start)); -  MEMCPY(THIS->argq_stop,argq_stop,sizeof(argq_stop)); +  memcpy(THIS->argq_start,argq_start,sizeof(argq_start)); +  memcpy(THIS->argq_stop,argq_stop,sizeof(argq_stop));    THIS->arg_eq=DEF_EQ;       /* allocated stuff */    THIS->lazy_entity_ends=NULL;    THIS->ws=NULL;    THIS->cc.arg_break_chars=NULL;   #endif       THIS->flags=FLAG_MATCH_TAG|FLAG_PARSE_TAGS;   
pike.git/src/modules/Parser/html.c:770:    THIS->top.local_feed = NULL;    reset_feed(THIS);       /* settings */    THIS->max_stack_depth=MAX_FEED_STACK_DEPTH;       /* this may now throw */      #ifdef CONFIGURABLE_MARKUP    THIS->lazy_entity_ends=(p_wchar2*)xalloc(sizeof(lazy_entity_ends)); -  MEMCPY(THIS->lazy_entity_ends,lazy_entity_ends,sizeof(lazy_entity_ends)); +  memcpy(THIS->lazy_entity_ends,lazy_entity_ends,sizeof(lazy_entity_ends));    THIS->n_lazy_entity_ends=NELEM(lazy_entity_ends);       THIS->ws=(p_wchar2*)xalloc(sizeof(whitespace)); -  MEMCPY(THIS->ws,whitespace,sizeof(whitespace)); +  memcpy(THIS->ws,whitespace,sizeof(whitespace));    THIS->n_ws=NELEM(whitespace);   #endif       THIS->maptag=allocate_mapping(32);    THIS->mapcont=allocate_mapping(32);    THIS->mapentity=allocate_mapping(32);    THIS->mapqtag=allocate_mapping(8);       recalculate_argq(THIS);   }
pike.git/src/modules/Parser/html.c:946:    *! @returns    *! Returns the object being called.    *!    *! @seealso    *! @[tags], @[containers], @[entities]    *!    */      static void html_add_tag(INT32 args)   { -  check_all_args("add_tag",args,BIT_STRING, +  check_all_args(NULL,args,BIT_STRING,    BIT_INT|BIT_STRING|BIT_ARRAY|BIT_FUNCTION|BIT_OBJECT|BIT_PROGRAM,0);    if (TYPEOF(sp[1-args]) == T_ARRAY) {    struct array *a = sp[1-args].u.array;    if (!a->size ||    (TYPEOF(a->item[0]) != T_FUNCTION && TYPEOF(a->item[0]) != T_OBJECT &&    TYPEOF(a->item[0]) != T_PROGRAM)) -  SIMPLE_BAD_ARG_ERROR("add_tag", 1, "array with function as first element"); +  SIMPLE_ARG_TYPE_ERROR("add_tag", 1, "array with function as first element");    }    else if (TYPEOF(sp[1-args]) == T_INT && sp[1-args].u.integer) -  SIMPLE_BAD_ARG_ERROR("add_tag", 1, "zero, string, array or function"); +  SIMPLE_ARG_TYPE_ERROR("add_tag", 1, "zero, string, array or function");       if (THIS->maptag->refs>1)    {    push_mapping(THIS->maptag);    THIS->maptag=copy_mapping(THIS->maptag);    pop_stack();    }       if (THIS->flags & FLAG_CASE_INSENSITIVE_TAG) {    stack_swap();
pike.git/src/modules/Parser/html.c:981:    if (UNSAFE_IS_ZERO(sp-1))    map_delete(THIS->maptag,sp-2);    else    mapping_insert(THIS->maptag,sp-2,sp-1);    pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void html_add_container(INT32 args)   { -  check_all_args("add_container",args,BIT_STRING, +  check_all_args(NULL,args,BIT_STRING,    BIT_INT|BIT_STRING|BIT_ARRAY|BIT_FUNCTION|BIT_OBJECT|BIT_PROGRAM,0);    if (TYPEOF(sp[1-args]) == T_ARRAY) {    struct array *a = sp[1-args].u.array;    if (!a->size ||    (TYPEOF(a->item[0]) != T_FUNCTION && TYPEOF(a->item[0]) != T_OBJECT &&    TYPEOF(a->item[0]) != T_PROGRAM)) -  SIMPLE_BAD_ARG_ERROR("add_container", 1, "array with function as first element"); +  SIMPLE_ARG_TYPE_ERROR("add_container", 1, "array with function as first element");    }    else if (TYPEOF(sp[1-args]) == T_INT && sp[1-args].u.integer) -  SIMPLE_BAD_ARG_ERROR("add_tag", 1, "zero, string, array or function"); +  SIMPLE_ARG_TYPE_ERROR("add_tag", 1, "zero, string, array or function");       if (args > 2) {    pop_n_elems(args-2);    args = 2;    }       if (THIS->mapcont->refs>1)    {    push_mapping(THIS->mapcont);    THIS->mapcont=copy_mapping(THIS->mapcont);
pike.git/src/modules/Parser/html.c:1021:    if (UNSAFE_IS_ZERO(sp-1))    map_delete(THIS->mapcont,sp-2);    else    mapping_insert(THIS->mapcont,sp-2,sp-1);    pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void html_add_entity(INT32 args)   { -  check_all_args("add_entity",args,BIT_STRING, +  check_all_args(NULL,args,BIT_STRING,    BIT_INT|BIT_STRING|BIT_ARRAY|BIT_FUNCTION|BIT_OBJECT|BIT_PROGRAM,0);    if (TYPEOF(sp[1-args]) == T_ARRAY) {    struct array *a = sp[1-args].u.array;    if (!a->size ||    (TYPEOF(a->item[0]) != T_FUNCTION && TYPEOF(a->item[0]) != T_OBJECT &&    TYPEOF(a->item[0]) != T_PROGRAM)) -  SIMPLE_BAD_ARG_ERROR("add_entity", 1, "array with function as first element"); +  SIMPLE_ARG_TYPE_ERROR("add_entity", 1, "array with function as first element");    }    else if (TYPEOF(sp[1-args]) == T_INT && sp[1-args].u.integer) -  SIMPLE_BAD_ARG_ERROR("add_tag", 1, "zero, string, array or function"); +  SIMPLE_ARG_TYPE_ERROR("add_tag", 1, "zero, string, array or function");       if (THIS->mapentity->refs>1)    {    push_mapping(THIS->mapentity);    THIS->mapentity=copy_mapping(THIS->mapentity);    pop_stack();    }       if (UNSAFE_IS_ZERO(sp-1))    map_delete(THIS->mapentity,sp-2);
pike.git/src/modules/Parser/html.c:1057:      static void html_add_quote_tag(INT32 args)   {    int remove;    struct mapping *map;    struct pike_string *name;    struct pike_string *prefix;    struct svalue *val;    ONERROR uwp;    -  check_all_args("add_quote_tag",args,BIT_STRING, +  check_all_args(NULL,args,BIT_STRING,    BIT_INT|BIT_STRING|BIT_ARRAY|BIT_FUNCTION|BIT_OBJECT|BIT_PROGRAM,    BIT_STRING|BIT_VOID,0);    if (TYPEOF(sp[1-args]) == T_ARRAY) {    struct array *a = sp[1-args].u.array;    if (!a->size ||    (TYPEOF(a->item[0]) != T_FUNCTION && TYPEOF(a->item[0]) != T_OBJECT &&    TYPEOF(a->item[0]) != T_PROGRAM)) -  SIMPLE_BAD_ARG_ERROR("add_quote_tag", 1, "array with function as first element"); +  SIMPLE_ARG_TYPE_ERROR("add_quote_tag", 1, "array with function as first element");    }    else if (TYPEOF(sp[1-args]) == T_INT && sp[1-args].u.integer) -  SIMPLE_BAD_ARG_ERROR("add_tag", 1, "zero, string, array or function"); +  SIMPLE_ARG_TYPE_ERROR("add_tag", 1, "zero, string, array or function");       remove = UNSAFE_IS_ZERO (sp+1-args);    if (!remove && args < 3) -  SIMPLE_TOO_FEW_ARGS_ERROR ("add_quote_tag", 3); +  SIMPLE_WRONG_NUM_ARGS_ERROR ("add_quote_tag", 3);       if (THIS->mapqtag->refs>1)    {    push_mapping(THIS->mapqtag);    /* Note: Deferred copy; the arrays might still have only one ref. */    THIS->mapqtag=copy_mapping(THIS->mapqtag);    pop_stack();    }    map = THIS->mapqtag;   
pike.git/src/modules/Parser/html.c:1130:    SET_SVAL(tmp, T_STRING, 0, string, prefix);    map_delete (map, &tmp);    }    else {    if (arr->refs > 1 || mapping_data_is_shared (map)) {    push_array (arr = copy_array (arr));    mapping_string_insert (map, prefix, sp - 1);    pop_stack();    }    free_svalues (arr->item+i, 3, BIT_MIXED); -  MEMCPY (arr->item+i, arr->item+i+3, (arr->size-i-3) * sizeof(struct svalue)); +  memmove (arr->item+i, arr->item+i+3, (arr->size-i-3) * sizeof(struct svalue));    arr->size -= 3;    }    else {    if (arr->refs > 1 || mapping_data_is_shared (map)) {    push_array (arr = copy_array (arr));    mapping_string_insert (map, prefix, sp - 1);    pop_stack();    }    assign_svalue (arr->item+i+1, sp-2);    assign_svalue (arr->item+i+2, sp-1);
pike.git/src/modules/Parser/html.c:1158:    if (cmp == curname) { /* Found a shorter prefix to name; insert before. */    free_string (cmp);    if (arr->refs > 1 || mapping_data_is_shared (map)) {    arr = copy_array (arr);    push_array (arr = resize_array (arr, arr->size+3));    mapping_string_insert (map, prefix, sp - 1);    pop_stack();    }    else    arr = val->u.array = resize_array (arr, arr->size+3); -  MEMCPY (arr->item+i+3, arr->item+i, +  memmove (arr->item+i+3, arr->item+i,    (arr->size-i-3) * sizeof(struct svalue)); -  MEMCPY (arr->item+i, sp-=3, 3 * sizeof(struct svalue)); +  memcpy (arr->item+i, sp-=3, 3 * sizeof(struct svalue));    goto done;    }    else free_string (cmp);    }    }       if (!remove) {    if (arr->refs > 1 || mapping_data_is_shared (map)) {    arr = copy_array (arr);    push_array (arr = resize_array (arr, arr->size+3));    mapping_string_insert (map, prefix, sp - 1);    pop_stack();    }    else    arr = val->u.array = resize_array (arr, arr->size+3); -  MEMCPY (arr->item+arr->size-3, sp-=3, 3 * sizeof(struct svalue)); +  memcpy (arr->item+arr->size-3, sp-=3, 3 * sizeof(struct svalue));    }       done: ;    }       else if (!remove) {    f_aggregate (3);    mapping_string_insert (map, prefix, sp-1);    pop_stack();    }
pike.git/src/modules/Parser/html.c:1199:    UNSET_ONERROR (uwp);       ref_push_object(THISOBJ);   }      static void html_add_tags(INT32 args)   {    INT32 e;    struct keypair *k;    struct mapping_data *md; -  check_all_args("add_tags",args,BIT_MAPPING,0); +  check_all_args(NULL,args,BIT_MAPPING,0);       md = sp[-1].u.mapping->data;       NEW_MAPPING_LOOP(md)    {    push_svalue(&k->ind);    push_svalue(&k->val);    html_add_tag(2);    pop_stack();    }       pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void html_add_containers(INT32 args)   {    INT32 e;    struct keypair *k;    struct mapping_data *md; -  check_all_args("add_containers",args,BIT_MAPPING,0); +  check_all_args(NULL,args,BIT_MAPPING,0);       md = sp[-1].u.mapping->data;       NEW_MAPPING_LOOP(md)    {    push_svalue(&k->ind);    push_svalue(&k->val);    html_add_container(2);    pop_stack();    }       pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void html_add_entities(INT32 args)   {    INT32 e;    struct keypair *k;    struct mapping_data *md; -  check_all_args("add_entities",args,BIT_MAPPING,0); +  check_all_args(NULL,args,BIT_MAPPING,0);       md = sp[-1].u.mapping->data;       NEW_MAPPING_LOOP(md)    {    push_svalue(&k->ind);    push_svalue(&k->val);    html_add_entity(2);    pop_stack();    }
pike.git/src/modules/Parser/html.c:1380:    mapping_insert (res, arr->item+i, sp-1);    pop_stack();    }    }    push_mapping (res);   }      /* ---------------------------------------- */   /* helper function to figure out what to do */    - static INLINE void recheck_scan(struct parser_html_storage *this, + static inline void recheck_scan(struct parser_html_storage *this,    int *scan_entity)   {    if (TYPEOF(this->callback__entity) != T_INT ||    m_sizeof(this->mapentity))    *scan_entity=1;    else    *scan_entity=0;   }      /* -------------- */
pike.git/src/modules/Parser/html.c:1471: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if (!head)    Pike_fatal("internal error: tail not found in feed (put_out_feed_range)\n");   #endif    /* Should never have empty strings in the feed. */    ref_push_string(head->s);    put_out_feed(this,sp-1);    pop_stack();    head=head->next;    } -  /* NOT_REACHED */ +  UNREACHABLE();   }      /* ------------------------ */   /* push feed range on stack */    - static INLINE void push_feed_range(struct piece *head, + static inline int low_push_feed_range(struct piece *head,    ptrdiff_t c_head,    struct piece *tail,    ptrdiff_t c_tail)   {    int n=0;    /* fit it in range (this allows other code to ignore eof stuff) */    if (c_tail>tail->s->len) c_tail=tail->s->len;       if (head != tail && c_head) {    if (head->s->len - c_head) {
pike.git/src/modules/Parser/html.c:1519:    ref_push_string(head->s);    n++;    if (n==32)    {    f_add(32);    n=1;    }    head=head->next;    }    -  if (!n) -  ref_push_string(empty_pike_string); -  else if (n>1) +  if (!n) { +  DEBUG((stderr,"push empty\n")); +  return 0; +  } else if (n>1)    f_add(n);    DEBUG((stderr,"push len=%"PRINTPTRDIFFT"d\n",sp[-1].u.string->len)); -  +  return 1;   }    -  + static inline void push_feed_range(struct piece *head, +  ptrdiff_t c_head, +  struct piece *tail, +  ptrdiff_t c_tail) + { +  if (!low_push_feed_range(head, c_head, tail, c_tail)) +  ref_push_string(empty_pike_string); + } +    /* -------------------------------------------------------- */   /* go forward by adjusting for a positive displacement in c */      #define FORWARD_CHAR(feed, c, dest, dp) do { \    (dest) = (struct piece *) (feed); \    (dp) = (ptrdiff_t) (c) + 1; \    while ((dp) == (dest)->s->len && (dest)->next) { \    (dp) = 0; \    (dest) = (dest)->next; \    } \   } while (0)    - static INLINE int n_pos_forward (struct piece *feed, ptrdiff_t c, + static inline int n_pos_forward (struct piece *feed, ptrdiff_t c,    struct piece **dest, ptrdiff_t *dp)   {    while (feed->s->len <= c) {    if (!feed->next) {    *dest = feed;    *dp = feed->s->len;    return 0;    }    c -= feed->s->len;    feed = feed->next;    }    *dest = feed;    *dp = c;    return 1;   }      /* ------------------------- */   /* compare positions in feed */    - static INLINE int cmp_feed_pos(struct piece *piece_a, ptrdiff_t pos_a, + static inline int cmp_feed_pos(struct piece *piece_a, ptrdiff_t pos_a,    struct piece *piece_b, ptrdiff_t pos_b)   {    struct piece *a_save = piece_a;       if (piece_a == piece_b)    return pos_a < pos_b ? -1 : (pos_a > pos_b ? 1 : 0);       while (piece_a && piece_a != piece_b)    piece_a = piece_a->next;    if (piece_a) return -1;
pike.git/src/modules/Parser/html.c:1581:    piece_b = piece_b->next;    if (piece_b) return 1;       return 17; /* Not in the same feed! */   }      /* ------------------------------------ */   /* skip feed range and count lines, etc */      /* count lines, etc */ - static INLINE void skip_piece_range(struct location *loc, + static inline void skip_piece_range(struct location *loc,    struct piece *p,    ptrdiff_t start,    ptrdiff_t stop)   {    int b=loc->byteno;    switch (p->s->size_shift)    {   #define LOOP(TYPE) \    { \    TYPE *s=(TYPE *)p->s->str + start; \
pike.git/src/modules/Parser/html.c:1606:    loc->linestart=b; \    loc->lineno++; \    } \    b++; \    } \    }    case 0: LOOP (p_wchar0); break;    case 1: LOOP (p_wchar1); break;    case 2: LOOP (p_wchar2); break;   #undef LOOP - #ifdef PIKE_DEBUG -  default: Pike_fatal("unknown width of string\n"); - #endif +     }    loc->byteno=b;   }      static void skip_feed_range(struct feed_stack *st,    struct piece **headp,    ptrdiff_t *c_headp,    struct piece *tail,    ptrdiff_t c_tail)   {
pike.git/src/modules/Parser/html.c:1732:    if ((p_wchar2)*(s++)==f) \    { \    c=feed->s->len-ce; \    goto found; \    } \    }    case 0: LOOP (p_wchar0); break;    case 1: LOOP (p_wchar1); break;    case 2: LOOP (p_wchar2); break;   #undef LOOP - #ifdef PIKE_DEBUG -  default: -  Pike_fatal("unknown width of string\n"); - #endif +     }    if (!feed->next) break;    c=0;    feed=feed->next;    }    break;    } -  /* FALL THROUGH */ +  /* FALLTHRU */       default: /* num_look_for > 1 */    while (feed)    {    ptrdiff_t ce = feed->s->len - c;    SCAN_DEBUG_MARK_SPOT("scan_forward piece loop (>1)",feed,c);    switch (feed->s->size_shift)    {   #define LOOP(TYPE) \    { \
pike.git/src/modules/Parser/html.c:1772:    if (!rev) goto found; else break; \    } \    if (rev && n==num_look_for) goto found; \    s++; \    } \    }    case 0: LOOP (p_wchar0); break;    case 1: LOOP (p_wchar1); break;    case 2: LOOP (p_wchar2); break;   #undef LOOP - #ifdef PIKE_DEBUG -  default: -  Pike_fatal("unknown width of string\n"); - #endif +     }    if (!feed->next) break;    c=0;    feed=feed->next;    }    break;    }       SCAN_DEBUG_MARK_SPOT("scan_forward not found",feed,feed->s->len);    *destp=feed;
pike.git/src/modules/Parser/html.c:1814:    struct piece **destp,    ptrdiff_t *d_p,    struct pike_string *str)   {    if (!str->len) {    *destp = feed;    *d_p = c;    return 1;    }    - #define LOOP(TYPE) { \ -  p_wchar2 look_for = (p_wchar2) ((TYPE *) str->str)[0]; \ + #define LOOP(SHIFT) { \ +  p_wchar2 look_for = INDEX_CHARP(str->str, 0, SHIFT); \    for (;;) { \ -  TYPE *p, *e; \ +  PIKE_CONCAT(p_wchar, SHIFT) *p, *e; \    struct piece *dst; \    ptrdiff_t cdst; \    if (!scan_forward (feed, c, &feed, &c, &look_for, 1)) { \    *destp = feed; \    *d_p = c; \    return 0; \    } \    \ -  p = (TYPE *) str->str + 1; \ -  e = (TYPE *) str->str + str->len; \ +  p = ((PIKE_CONCAT(p_wchar, SHIFT) *) str->str) + 1; \ +  e = ((PIKE_CONCAT(p_wchar, SHIFT) *) str->str) + str->len; \    dst = feed; \    cdst = c + 1; \    for (; p < e; p++, cdst++) { \    while (cdst == dst->s->len) { \    if (dst->next) dst = dst->next; \    else { \    *destp = dst; \    *d_p = dst->s->len; \    return 0; \    } \    cdst = 0; \    } \    if ((p_wchar2) *p != \    INDEX_CHARP (dst->s->str, cdst, dst->s->size_shift)) \ -  goto PIKE_CONCAT (cont, TYPE); \ +  goto PIKE_CONCAT(cont, SHIFT); \    } \    \    *destp = feed; \    *d_p = c; \    return 1; \    \ -  PIKE_CONCAT (cont, TYPE): \ +  PIKE_CONCAT(cont, SHIFT): \    c++; \    } \    }       switch (str->size_shift) { -  case 0: LOOP (p_wchar0); break; -  case 1: LOOP (p_wchar1); break; -  case 2: LOOP (p_wchar2); break; - #ifdef PIKE_DEBUG -  default: Pike_fatal ("Unknown width of string.\n"); - #endif +  case 0: LOOP(0); break; +  case 1: LOOP(1); break; +  case 2: LOOP(2); break;    }      #undef LOOP       return 0;   }      enum scan_arg_do {SCAN_ARG_ONLY, SCAN_ARG_PUSH, SCAN_ARG_ENT_BREAK};      static int scan_forward_arg(struct parser_html_storage *this,
pike.git/src/modules/Parser/html.c:1924:    {    ch=index_shared_string(destp[0]->s,*d_p);    if ((this->flags & FLAG_IGNORE_COMMENTS) &&    ch=='-') /* possible --...-- to be ignored */    {    if (next_character(*destp,*d_p)=='-')    {    static const p_wchar2 minus='-';       if (what == SCAN_ARG_PUSH) -  push_feed_range(feed,c,*destp,*d_p),n++; +  n += low_push_feed_range(feed,c,*destp,*d_p);       /* skip to next -- */       DEBUG_MARK_SPOT("scan_forward_arg: "    "found --",*destp,*d_p);    FORWARD_CHAR (*destp, *d_p, *destp, *d_p);    for (;;)    {    res=scan_forward(*destp,d_p[0]+1,destp,d_p,&minus,1);    if (!res) {
pike.git/src/modules/Parser/html.c:1974:    "found -, not -",*destp,*d_p);       res=scan_forward(*destp,d_p[0]+1,destp,d_p,    ARG_BREAK_CHARS (this),    N_ARG_BREAK_CHARS (this));    goto retryloop;    }    }    }    -  if (what == SCAN_ARG_PUSH) push_feed_range(feed,c,*destp,*d_p),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(feed,c,*destp,*d_p);       if (!res) {    if (!finished)    {    DEBUG_MARK_SPOT("scan_forward_arg: wait",feed,c);    if (what == SCAN_ARG_PUSH) pop_n_elems(n);    return 0;    }    else    {
pike.git/src/modules/Parser/html.c:2000:    if (ch == ARG_EQ (this))    {    if (scan_name) {    DEBUG_MARK_SPOT("scan_forward_arg: end by arg_eq",    destp[0],*d_p);    break;    }    else {    DEBUG_MARK_SPOT("scan_forward_arg: = ignored in arg val",    destp[0],*d_p); -  if (what == SCAN_ARG_PUSH) push_feed_range(*destp,*d_p,*destp,*d_p+1),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(*destp,*d_p,*destp,*d_p+1);    goto next;    }    }       if (ch == TAG_END (this)) {    if ((this->flags & FLAG_MATCH_TAG) && q--)    {    DEBUG_MARK_SPOT("scan_forward_arg: inner tag end",    destp[0],*d_p); -  if (what == SCAN_ARG_PUSH) push_feed_range(*destp,*d_p,*destp,*d_p+1),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(*destp,*d_p,*destp,*d_p+1);    goto next;    }    else    {    DEBUG_MARK_SPOT("scan_forward_arg: end by tag end",    destp[0],*d_p);    break;    }    }       if ((this->flags & FLAG_MATCH_TAG) && ch == TAG_START (this))    {    DEBUG_MARK_SPOT("scan_forward_arg: inner tag start",    destp[0],*d_p);    q++; -  if (what == SCAN_ARG_PUSH) push_feed_range(*destp,*d_p,*destp,*d_p+1),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(*destp,*d_p,*destp,*d_p+1);    goto next;    }       if (ch == ENTITY_START (this)) {    DEBUG_MARK_SPOT("scan_forward_arg: entity start char",    destp[0],*d_p);    if (what == SCAN_ARG_ENT_BREAK) {    if (quote) *quote = -1;    return 2;    }    else { -  if (what == SCAN_ARG_PUSH) push_feed_range(*destp,*d_p,*destp,*d_p+1),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(*destp,*d_p,*destp,*d_p+1);    goto next;    }    }       /* scan for (possible) end(s) of this argument quote */       for (i=0; i < NARGQ (this); i++)    if (ch == ARGQ_START (this)[i]) break;    if (i == NARGQ (this))    {    if (ch == TAG_FIN (this)) {    FORWARD_CHAR (*destp, *d_p, feed, c);    if (((this->flags & FLAG_MATCH_TAG) && q) ||    index_shared_string (feed->s, c) != TAG_END (this)) {    DEBUG_MARK_SPOT("scan_forward_arg: tag fin char",    destp[0],*d_p); -  if (what == SCAN_ARG_PUSH) push_feed_range (*destp, *d_p, feed, c), n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range (*destp, *d_p, feed, c);    goto next;    }    else {    DEBUG_MARK_SPOT("scan_forward_arg: end by tag fin",    destp[0],*d_p);    break;    }    }    else {    DEBUG_MARK_SPOT("scan_forward_arg: end by ws",    destp[0],*d_p);    break;    }    }      in_quote_cont:    DEBUG_MARK_SPOT("scan_forward_arg: quoted",destp[0],*d_p);    while (1) {    res=scan_forward(feed=*destp,c=d_p[0]+1,destp,d_p,    LOOK_FOR_END (this)[i], NUM_LOOK_FOR_END (this)[i]); -  if (what == SCAN_ARG_PUSH) push_feed_range(feed,c,*destp,*d_p),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(feed,c,*destp,*d_p);       if (!res) {    if (!finished)    {    DEBUG_MARK_SPOT("scan_forward_arg: wait (quote)",feed,c);    if (what == SCAN_ARG_PUSH) pop_n_elems(n);    return 0;    }    else    { -  DEBUG_MARK_SPOT("scan_forward_arg: forced end (quote)",destp[0],*d_p); -  break; +  DEBUG_MARK_SPOT("scan_forward_arg: forced end (quote)", +  destp[0], *d_p); +  if (this->flags & FLAG_QUOTE_STAPLING) break; +  goto end;    }    }       if (index_shared_string(destp[0]->s,*d_p) == ENTITY_START (this)) {    DEBUG_MARK_SPOT("scan_forward_arg: entity start char",    destp[0],*d_p);    if (what == SCAN_ARG_ENT_BREAK) {    if (quote) *quote = i;    return 2;    }    else { -  if (what == SCAN_ARG_PUSH) push_feed_range(*destp,*d_p,*destp,*d_p+1),n++; +  if (what == SCAN_ARG_PUSH) n += low_push_feed_range(*destp,*d_p,*destp,*d_p+1);    continue;    }    } -  -  goto next; +  if (this->flags & FLAG_QUOTE_STAPLING) break; +  FORWARD_CHAR (*destp, *d_p, *destp, *d_p); +  DEBUG_MARK_SPOT("scan_forward_arg: End of quoted string", +  destp[0],*d_p); +  goto end;    }      next:    if (n > 20) { -  +  if (this->flags & FLAG_QUOTE_STAPLING) { +  fprintf(stderr, "Parser.HTML: Warning: Old-style attribute stapling.\n"); +  }    f_add(n);    n = 1;    }       feed=*destp;    c=d_p[0]+1;    } -  + end:    if (what == SCAN_ARG_PUSH)    { -  if (n>1) f_add(n); -  else if (!n) ref_push_string(empty_pike_string); +  if (n>1) { +  if (this->flags & FLAG_QUOTE_STAPLING) { +  fprintf(stderr, +  "Parser.HTML: Warning: Old-style attribute stapling.\n");    } -  +  f_add(n); +  } else if (!n) ref_push_string(empty_pike_string); +  }    return 1;   }      static int scan_for_end_of_tag(struct parser_html_storage *this,    struct piece *feed,    ptrdiff_t c,    struct piece **destp,    ptrdiff_t *d_p,    int finished,    int match_tag,
pike.git/src/modules/Parser/html.c:2371:    if ((p_wchar2) *p != \    INDEX_CHARP (dst->s->str, cdst, dst->s->size_shift)) \    goto cont; \    } \    }       switch (tag->size_shift) {    case 0: LOOP (p_wchar0); break;    case 1: LOOP (p_wchar1); break;    case 2: LOOP (p_wchar2); break; - #ifdef PIKE_DEBUG -  default: Pike_fatal ("Unknown width of string.\n"); - #endif +     }      #undef LOOP       DEBUG_MARK_SPOT ("quote tag lookup: matched quote tag", dst, cdst);    *mapqentry = arr->item+i;    *destp = dst;    *d_p = cdst;    return 1;   
pike.git/src/modules/Parser/html.c:2399: Inside #if defined(HTML_DEBUG)
   DEBUG ((stderr, "quote tag lookup: no entry %c%c at %"PRINTSIZET"u\n",    isprint (buf.str[0]) ? buf.str[0] : '.',    isprint (buf.str[1]) ? buf.str[1] : '.', checklen));   #endif    }       DEBUG ((stderr, "quote tag lookup: no quote tag\n"));    return 1; /* 1 => no go - *mapqentry still NULL */   }    - static INLINE void low_add_local_feed (struct parser_html_storage *this, + static inline void low_add_local_feed (struct parser_html_storage *this,    struct piece *feed)   {    /* Note: Calling code assumes that this alloc never fails with an    * exception or a zero value (i.e. it exits the process immediately    * instead). */    struct feed_stack *new = alloc_feed_stack();       new->local_feed=feed;    new->ignore_data=0;    new->parse_tags=this->stack->parse_tags && this->out_ctx == CTX_DATA;    new->pos=init_pos;    new->prev=this->stack;    new->c=0;    this->stack=new;    this->stack_count++;   }    - static INLINE void add_local_feed (struct parser_html_storage *this, + static inline void add_local_feed (struct parser_html_storage *this,    struct pike_string *str)   {    struct piece *feed = alloc_piece();    copy_shared_string(feed->s,str);    low_add_local_feed (this, feed);   }      /* ---------------------------------------------------------------- */   /* this is called to get data from callbacks and do the right thing */   
pike.git/src/modules/Parser/html.c:2489:    if (this->flags & FLAG_WS_BEFORE_TAG_NAME)    scan_forward (*head, *c_head + 1, &pos, &cpos,    WS(this),    -(ptrdiff_t)N_WS(this));    else pos = *head, cpos = *c_head + 1;    scan_forward_arg (this, pos, cpos, &pos, &cpos,    SCAN_ARG_ONLY, 1, 1, NULL);    put_out_feed_range(this,*head,*c_head,pos,cpos);    if (skip) skip_feed_range(st,head,c_head,pos,cpos);    this->out_ctx = CTX_TAG; +  pop_stack();    return STATE_REREAD;    }    else if (*head) {    /* just output the whole range */    put_out_feed_range(this,*head,*c_head,tail,c_tail);    if (skip) skip_feed_range(st,head,c_head,tail,c_tail);    }    pop_stack();    if (this->stack != st) /* got more feed recursively - reread */    return STATE_REREAD;
pike.git/src/modules/Parser/html.c:2531:    if (skip) skip_feed_range(st,head,c_head,tail,c_tail);    pop_stack();    if (this->stack != st) /* got more feed recursively - reread */    return STATE_REREAD;    return STATE_DONE; /* continue */       default:    Pike_error("Parser.HTML: illegal result from callback: "    "not 0, string or array\n");    } -  /* NOT_REACHED */ -  return STATE_DONE; +  UNREACHABLE(return STATE_DONE);   }      static void clear_start(struct parser_html_storage *this)   {    this->start=NULL;   }      static void do_callback(struct parser_html_storage *this,    struct object *thisobj,    struct svalue *callback_function,
pike.git/src/modules/Parser/html.c:2699:    case T_FUNCTION: \    case T_OBJECT: \    push_svalue(v); \    break; \    case T_ARRAY: \    if (v->u.array->size) \    { \    push_svalue(v->u.array->item); \    break; \    } \ +  /* FALLTHRU */ \    default: \    Pike_error("Parser.HTML: illegal type found " \    "when trying to call " TYPESTR " callback\n"); \    } \    \    this->start=*cutstart; \    this->cstart=*ccutstart; \    this->end=cutend; \    this->cend=ccutend; \    \
pike.git/src/modules/Parser/html.c:3034:       case CTX_DATA:    DEBUG((stderr,"%*d do_try_feed scan in data "    "scan_entity=%d ignore_data=%d\n",    this->stack_count,this->stack_count,    scan_entity,st->ignore_data));      #ifdef PIKE_DEBUG    if (*feed && feed[0]->s->len < st->c)    Pike_fatal("len (%ld) < st->c (%ld)\n", -  TO_LONG(feed[0]->s->len), TO_LONG(st->c)); +  (long)feed[0]->s->len, (long)st->c);    if (*feed && cmp_feed_pos (*feed, st->c, dst, cdst) > 0)    Pike_fatal ("Going backwards from %p:%ld to %p:%ld.\n", -  (void *)(*feed), TO_LONG(st->c), (void *)dst, TO_LONG(cdst)); +  (void *)(*feed), (long)st->c, +  (void *)dst, (long)cdst);   #endif       /* do we need to check data? */    if (!st->ignore_data && *feed)    {    DEBUG_MARK_SPOT("do_try_feed scan for data from", *feed, st->c);       /* we are to get data first */    /* look for tag or entity */    n=0;
pike.git/src/modules/Parser/html.c:3096:    if (!*feed || cdst == dst->s->len)    {    DEBUG((stderr,"%*d do_try_feed end\n",    this->stack_count,this->stack_count));    return STATE_DONE; /* done */    }      #ifdef PIKE_DEBUG    if (*feed != dst || st->c != cdst)    Pike_fatal ("Internal position confusion: feed: %p:%ld, dst: %p:%ld.\n", -  (void *)(*feed), TO_LONG(st->c), (void *)dst, TO_LONG(cdst)); +  (void *)(*feed), (long)st->c, +  (void *)dst, (long)cdst);   #endif       ch=index_shared_string(dst->s,cdst);    if (ch == TAG_START (this)) /* tag */    {    struct piece *tagend = NULL;    ptrdiff_t ctagend;       DEBUG((stderr,"%*d do_try_feed scan tag %p:%"PRINTPTRDIFFT"d\n",    this->stack_count,this->stack_count,
pike.git/src/modules/Parser/html.c:3604:    break;    }       /* entity in tag argument */    DEBUG_MARK_SPOT ("do_try_feed arg ent scan: at entity start", dst, cdst);    put_out_feed_range(this,*feed,st->c,dst,cdst);    skip_feed_range(st,feed,&(st->c),dst,cdst);    ctx = this->out_ctx = CTX_TAG_QUOTED_ARG + quote;    }    -  /* FALL THROUGH */ +  /* FALLTHRU */    parse_entity: {    p_wchar2 end_found;       DEBUG((stderr,"%*d do_try_feed scan entity %p:%"PRINTPTRDIFFT"d\n",    this->stack_count,this->stack_count, *feed,st->c));      #ifdef PIKE_DEBUG    if (!scan_entity) Pike_fatal ("Shouldn't parse entities now.\n");    if (*feed != dst || st->c != cdst)    Pike_fatal ("Internal position confusion: feed: %p:%ld, dst: %p:%ld\n", -  (void *)(*feed), TO_LONG(st->c), (void *)dst, TO_LONG(cdst)); +  (void *)(*feed), (long)st->c, +  (void *)dst, (long)cdst);   #endif    /* just search for end of entity */       if (flags & FLAG_LAZY_ENTITY_END)    end_found =    scan_forward(dst,cdst+1,&dst,&cdst,    LAZY_ENTITY_ENDS (this), N_LAZY_ENTITY_ENDS (this)) ?    index_shared_string(dst->s,cdst) : 0;    else if (flags & FLAG_NESTLING_ENTITY_END)    {
pike.git/src/modules/Parser/html.c:3821:    THIS->stack_count, THIS->stack_count));    for (end = *feed; end->next; end = end->next) {}    if (*feed != end || st->c != end->s->len) {    /* This is an incomplete tag or entity and not data.    * Hence it's output directly regardless of the data cb. */    put_out_feed_range (THIS, *feed, st->c, end, end->s->len);    skip_feed_range (st, feed, &(st->c), end, end->s->len);    }    }    -  /* FALL THROUGH */ +  /* FALLTHRU */    case STATE_DONE: /* done, pop stack */    if (!THIS->top.local_feed) THIS->feed_end=NULL;       st=THIS->stack->prev;    if (!st) {    if (TYPEOF(THIS->callback__data) != T_INT &&    THIS->data_cb_feed &&    (res = data_callback (THIS, THISOBJ, st)))    goto state_reread;    if (finished) reset_stack_head (THIS);
pike.git/src/modules/Parser/html.c:3847:    Pike_fatal("internal weirdness in Parser.HTML: feed left\n");   #endif       really_free_feed_stack (THIS->stack);    THIS->stack=st;    THIS->stack_count--;    break;       case STATE_REPARSE: /* user requested another go at the current data */    if (st == THIS->stack) ignore_tag_cb = 1; -  /* FALL THROUGH */ +  /* FALLTHRU */       state_reread:    case STATE_REREAD: /* reread stack head */    if (THIS->stack_count>THIS->max_stack_depth)    Pike_error("Parser.HTML: too deep recursion\n");    break;    }    } -  /* NOT_REACHED */ +  UNREACHABLE();   }      /****** feed ****************************************/         static void low_feed(struct pike_string *ps)   {    struct piece *f;       if (!ps->len) return;
pike.git/src/modules/Parser/html.c:3920:   {    DEBUG((stderr,"feed %"PRINTPTRDIFFT"d chars\n",    (args && TYPEOF(sp[-args]) == T_STRING)?    sp[-args].u.string->len:-1));       if (args)    {    if (TYPEOF(sp[-args]) == T_STRING)    low_feed(sp[-args].u.string);    else if (TYPEOF(sp[-args]) != T_INT || sp[-args].u.integer) -  SIMPLE_BAD_ARG_ERROR("feed",1,"string"); +  SIMPLE_ARG_TYPE_ERROR("feed",1,"string");    }       if (args<2 || TYPEOF(sp[1-args]) != T_INT || sp[1-args].u.integer)    {    pop_n_elems(args);    try_feed(0);    }    else    pop_n_elems(args);   
pike.git/src/modules/Parser/html.c:3947:    *! @returns    *! Returns the object being called.    *!    *! @note    *! Don't use!    */      static void html_feed_insert(INT32 args)   {    if (!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("feed_insert",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("feed_insert",1);       if (TYPEOF(sp[-args]) != T_STRING) -  SIMPLE_BAD_ARG_ERROR("feed_insert",1,"string"); +  SIMPLE_ARG_TYPE_ERROR("feed_insert",1,"string");       DEBUG((stderr,"html_feed_insert: "    "pushing string (len=%"PRINTPTRDIFFT"d) on feedstack\n",    sp[-args].u.string->len));       add_local_feed (THIS, sp[-args].u.string);       if (args<2 || TYPEOF(sp[1-args]) != T_INT || sp[1-args].u.integer)    {    pop_n_elems(args);
pike.git/src/modules/Parser/html.c:3984:    *! Returns the object being called.    */      static void html_finish(INT32 args)   {    if (args)    {    if (TYPEOF(sp[-args]) == T_STRING)    low_feed(sp[-args].u.string);    else if (TYPEOF(sp[-args]) != T_INT || sp[-args].u.integer) -  SIMPLE_BAD_ARG_ERROR("finish",1,"string"); +  SIMPLE_ARG_TYPE_ERROR("finish",1,"string");    }    try_feed(1);    ref_push_object(THISOBJ);   }      /*! @decl string|array(mixed) read()    *! @decl string|array(mixed) read(int max_elems)    *! Read parsed data from the parser object.    *!    *! @returns
pike.git/src/modules/Parser/html.c:4007:    */      static void html_read(INT32 args)   {    ptrdiff_t n = THIS->out_length;       if (args) {    if (TYPEOF(sp[-args]) == T_INT && sp[-args].u.integer >= 0)    n = MINIMUM (sp[-args].u.integer, n);    else -  SIMPLE_BAD_ARG_ERROR ("read", 1, "nonnegative integer"); +  SIMPLE_ARG_TYPE_ERROR ("read", 1, "nonnegative integer");    }       pop_n_elems(args);       if (THIS->out_max_shift < 0)    {    /* collect up to n items */    struct array *res;    ptrdiff_t i;    int type_field = 0;
pike.git/src/modules/Parser/html.c:4253:    scan_forward(feed,c,&s1,&c1, WS(this),    -(ptrdiff_t)N_WS(this));    else    s1 = feed, c1 = c;       /* scan as argument and push*/    scan_forward_arg(this,s1,c1,&s2,&c2,SCAN_ARG_PUSH,1,1,NULL);    if (pushed) f_add (2);   }    - static INLINE void tag_push_default_arg(struct svalue *def) + static inline void tag_push_default_arg(struct svalue *def)   {    if (def) push_svalue(def);    else stack_dup();   }      static void tag_args(struct parser_html_storage *this,struct piece *feed,ptrdiff_t c,    struct svalue *def, int skip_name, int to_tag_end)   {    struct piece *s1=NULL,*s2=NULL,*s3;    int flags = this->flags;
pike.git/src/modules/Parser/html.c:4298:    for (;;)    {    /* skip whitespace */    scan_forward(s2,c2,&s1,&c1,WS(this),    -(ptrdiff_t)N_WS(this));      new_arg:   #ifdef PIKE_DEBUG    if (prev_s && cmp_feed_pos (prev_s, prev_c, s1, c1) >= 0)    Pike_fatal ("Not going forward in tag args loop (from %p:%ld to %p:%ld).\n", -  (void *)prev_s, PTRDIFF_T_TO_LONG(prev_c), -  (void *)s1, PTRDIFF_T_TO_LONG(c1)); +  (void *)prev_s, (long)prev_c, +  (void *)s1, (long)c1);    prev_s = s1, prev_c = c1;   #endif       DEBUG_MARK_SPOT("html_tag_args arg start",s1,c1);       /* end of tag? */    if (c1==s1->s->len) { /* end<tm> */    DEBUG_MARK_SPOT("html_tag_args hard tag end (1)",s1,c1);    break;    }
pike.git/src/modules/Parser/html.c:4469:    break;    }    default:    push_int(0);    }   }      static void html_tag_args(INT32 args)   {    struct svalue def; -  check_all_args("tag_args",args,BIT_MIXED|BIT_VOID,0); +  check_all_args(NULL,args,BIT_MIXED|BIT_VOID,0);    if (args) assign_svalue_no_free(&def,sp-args);    pop_n_elems(args);       if (!THIS->start) Pike_error ("Parser.HTML: There's no current range.\n");       switch (THIS->type) {    case TYPE_TAG:    case TYPE_CONT:    if (args)    {
pike.git/src/modules/Parser/html.c:4547:    push_int(0);    break;    }    default:    push_int(0);    }   }      static void html_tag(INT32 args)   { -  check_all_args("tag",args,BIT_MIXED|BIT_VOID,0); +  check_all_args(NULL,args,BIT_MIXED|BIT_VOID,0);       html_tag_args(args);    html_tag_name(0);    stack_swap();    html_tag_content(0);    f_aggregate(3);   }      /*! @decl string context()    *! Returns the current output context as a string.
pike.git/src/modules/Parser/html.c:4607:    *! Parses the tag name from a tag string without the surrounding    *! brackets, i.e. a string on the form @expr{"tagname some='tag'    *! args"@}.    *! @returns    *! Returns the tag name or an empty string if none.    */      static void html_parse_tag_name(INT32 args)   {    struct piece feed; -  check_all_args("parse_tag_name",args,BIT_STRING,0); +  check_all_args(NULL,args,BIT_STRING,0);    feed.s=sp[-args].u.string;    feed.next=NULL;    tag_name(THIS,&feed,0,0);    stack_pop_n_elems_keep_top(args);   }      /*! @decl mapping parse_tag_args(string tag)    *!    *! Parses the tag arguments from a tag string without the name and    *! surrounding brackets, i.e. a string on the form @expr{"some='tag'
pike.git/src/modules/Parser/html.c:4630:    *! @returns    *! Returns a mapping containing the tag arguments.    *!    *! @seealso    *! @[tag_args]    */      static void html_parse_tag_args(INT32 args)   {    struct piece feed; -  check_all_args("parse_tag_args",args,BIT_STRING,0); +  check_all_args(NULL,args,BIT_STRING,0);    feed.s=sp[-args].u.string;    feed.next=NULL;    tag_args(THIS,&feed,0,NULL,0,0);    stack_pop_n_elems_keep_top(args);   }      /** debug *******************************************/      /*! @decl mapping _inspect()    *!
pike.git/src/modules/Parser/html.c:4657:      static void html__inspect(INT32 args)   {    int n=0,m,o,p;    struct piece *f;    struct out_piece *of;    struct feed_stack *st;       pop_n_elems(args);    -  push_text("feed"); +  push_static_text("feed");    m=0;       st=THIS->stack;    while (st)    {    o=0;    p=0;    -  push_text("feed"); +  push_static_text("feed");       f=st->local_feed;       while (f)    {    ref_push_string(f->s);    p++;    f=f->next;    }       f_aggregate(p);    o++;    -  push_text("position"); -  push_int(DO_NOT_WARN(st->c)); +  push_static_text("position"); +  push_int(st->c);    o++;    -  push_text("byteno"); +  push_static_text("byteno");    push_int(st->pos.byteno);    o++;    -  push_text("lineno"); +  push_static_text("lineno");    push_int(st->pos.lineno);    o++;    -  push_text("linestart"); +  push_static_text("linestart");    push_int(st->pos.linestart);    o++;       f_aggregate_mapping(o*2);    st=st->prev;       m++;    }       f_aggregate(m);    n++;    -  push_text("data_cb_feed"); +  push_static_text("data_cb_feed");    for (f = THIS->data_cb_feed, p = 0; f; f = f->next) {    ref_push_string (f->s);    p++;    }    f_aggregate(p);    n++;    -  push_text("outfeed"); +  push_static_text("outfeed");    p=0;    of=THIS->out;    while (of)    {    push_svalue(&of->v);    p++;    of=of->next;    }    f_aggregate(p);    n++;    -  push_text("tags"); +  push_static_text("tags");    ref_push_mapping(THIS->maptag);    n++;    -  push_text("containers"); +  push_static_text("containers");    ref_push_mapping(THIS->mapcont);    n++;    -  push_text("entities"); +  push_static_text("entities");    ref_push_mapping(THIS->mapentity);    n++;    -  push_text("quote_tags"); +  push_static_text("quote_tags");    ref_push_mapping(THIS->mapqtag);    n++;    -  push_text("splice_arg"); +  push_static_text("splice_arg");    if (THIS->splice_arg)    ref_push_string(THIS->splice_arg);    else    push_int(0);    n++;    -  push_text("callback__tag"); +  push_static_text("callback__tag");    push_svalue(&(THIS->callback__tag));    n++;    -  push_text("callback__entity"); +  push_static_text("callback__entity");    push_svalue(&(THIS->callback__entity));    n++;    -  push_text("callback__data"); +  push_static_text("callback__data");    push_svalue(&(THIS->callback__data));    n++;    -  push_text("flags"); +  push_static_text("flags");    push_int(THIS->flags);    n++;       f_aggregate_mapping(n*2);   }      /** create, clone ***********************************/      static void html_create(INT32 args)   {
pike.git/src/modules/Parser/html.c:4800:      static void html_clone(INT32 args)   {    struct object *o;    struct parser_html_storage *p;       DEBUG((stderr,"parse_html_clone object %p\n",THISOBJ));       push_object(o=clone_object_from_object(THISOBJ,args));    -  p=(struct parser_html_storage*)get_storage(o,parser_html_program); +  p=get_storage(o,parser_html_program);       if (p->maptag) free_mapping(p->maptag);    add_ref(p->maptag=THIS->maptag);    if (p->mapcont) free_mapping(p->mapcont);    add_ref(p->mapcont=THIS->mapcont);    if (p->mapentity) free_mapping(p->mapentity);    add_ref(p->mapentity=THIS->mapentity);    if (p->mapqtag) free_mapping(p->mapqtag);    add_ref(p->mapqtag=THIS->mapqtag);   
pike.git/src/modules/Parser/html.c:4854: Inside #if defined(CONFIGURABLE_MARKUP)
      p->nargq=THIS->nargq;    for (i=0; i<p->nargq; i++)    {    p->argq_start[i]=THIS->argq_start[i];    p->argq_stop[i]=THIS->argq_stop[i];    }       p->n_lazy_entity_ends=THIS->n_lazy_entity_ends;    newstr=(p_wchar2*)xalloc(sizeof(p_wchar2)*p->n_lazy_entity_ends); -  MEMCPY(newstr,THIS->lazy_entity_ends,sizeof(p_wchar2)*p->n_lazy_entity_ends); +  memcpy(newstr,THIS->lazy_entity_ends,sizeof(p_wchar2)*p->n_lazy_entity_ends);    if (p->lazy_entity_ends) free(p->lazy_entity_ends);    p->lazy_entity_ends=newstr;       p->n_ws=THIS->n_ws;    newstr=(p_wchar2*)xalloc(sizeof(p_wchar2)*p->n_ws); -  MEMCPY(newstr,THIS->ws,sizeof(p_wchar2)*p->n_ws); +  memcpy(newstr,THIS->ws,sizeof(p_wchar2)*p->n_ws);    if (p->ws) free(p->ws);    p->ws=newstr;   #endif       DEBUG((stderr,"done clone\n"));       /* all copied, object on stack */   }      /****** setup ***************************************/
pike.git/src/modules/Parser/html.c:4934:    *! becomes    *!    *! @pre{<foo arg1="val 1" arg2='val 2' arg3 arg4>@}    *!    *! if @expr{"splice"@} is set as the splice argument name.    */      static void html_splice_arg (INT32 args)   {    struct pike_string *old = THIS->splice_arg; -  check_all_args("splice_arg",args,BIT_VOID|BIT_STRING|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_STRING|BIT_INT,0);    if (args) {    if (TYPEOF(sp[-args]) == T_STRING)    add_ref (THIS->splice_arg = sp[-args].u.string);    else if (sp[-args].u.integer) -  SIMPLE_BAD_ARG_ERROR ("splice_arg", 1, "string or zero"); +  SIMPLE_ARG_TYPE_ERROR ("splice_arg", 1, "string or zero");    else    THIS->splice_arg = NULL;    }    pop_n_elems(args);    if (old) push_string (old);    else push_int (0);   }      /*! @decl int case_insensitive_tag(void|int value)    *!
pike.git/src/modules/Parser/html.c:5058:    *! If only a container callback exists, it gets the empty string    *! as content when there's none to be parsed. If only a    *! non-container callback exists, it will be called (without the    *! content argument) for both kinds of tags.    *! @endint    */      static void html_ignore_tags(INT32 args)   {    int o=!(THIS->flags & FLAG_PARSE_TAGS); -  check_all_args("ignore_tags",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags &= ~FLAG_PARSE_TAGS;    else THIS->flags |= FLAG_PARSE_TAGS;    THIS->top.parse_tags = THIS->flags & FLAG_PARSE_TAGS;    }    pop_n_elems(args);    push_int(o);   }      static void html_case_insensitive_tag(INT32 args)   {    int o=!!(THIS->flags & FLAG_CASE_INSENSITIVE_TAG); -  check_all_args("case_insensitive_tag",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_CASE_INSENSITIVE_TAG;    else THIS->flags &= ~FLAG_CASE_INSENSITIVE_TAG;    }    pop_n_elems(args);       if (args && (THIS->flags & FLAG_CASE_INSENSITIVE_TAG) && !o) {    INT32 e;    struct keypair *k;    struct mapping_data *md;
pike.git/src/modules/Parser/html.c:5110:    free_mapping(THIS->mapcont);    THIS->mapcont=(--sp)->u.mapping;    }       push_int(o);   }      static void html_lazy_argument_end(INT32 args)   {    int o=!!(THIS->flags & FLAG_LAZY_END_ARG_QUOTE); -  check_all_args("lazy_argument_end",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_LAZY_END_ARG_QUOTE;    else THIS->flags &= ~FLAG_LAZY_END_ARG_QUOTE;    recalculate_argq(THIS);    }    pop_n_elems(args);    push_int(o);   }      static void html_lazy_entity_end(INT32 args)   {    int o=!!(THIS->flags & FLAG_LAZY_ENTITY_END); -  check_all_args("lazy_entity_end",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_LAZY_ENTITY_END;    else THIS->flags &= ~FLAG_LAZY_ENTITY_END;    }    pop_n_elems(args);    push_int(o);   }      /*! @decl int nestling_entity_end(void|int value)    *!    */      static void html_nestling_entity_end(INT32 args)   {    int o=!!(THIS->flags & FLAG_NESTLING_ENTITY_END); -  check_all_args("nestling_entity_end",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_NESTLING_ENTITY_END;    else THIS->flags &= ~FLAG_NESTLING_ENTITY_END;    }    pop_n_elems(args);    push_int(o);   }      static void html_match_tag(INT32 args)   {    int o=!!(THIS->flags & FLAG_MATCH_TAG); -  check_all_args("match_tag",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_MATCH_TAG;    else THIS->flags &= ~FLAG_MATCH_TAG;    }    pop_n_elems(args);    push_int(o);   }      static void html_mixed_mode(INT32 args)   {    int o=THIS->out_max_shift < 0; -  check_all_args("mixed_mode",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) {    if (!o) {    struct out_piece *f;    size_t c;    THIS->out_max_shift = -1;    /* Got to count the entries in the output queue. */    for (f = THIS->out, c = 0; f; f = f->next) c++;    THIS->out_length = c;    }
pike.git/src/modules/Parser/html.c:5199:    THIS->out_length = length;    }    }    pop_n_elems(args);    push_int(o);   }      static void html_reparse_strings(INT32 args)   {    int o=!!(THIS->flags & FLAG_REPARSE_STRINGS); -  check_all_args("reparse_strings",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_REPARSE_STRINGS;    else THIS->flags &= ~FLAG_REPARSE_STRINGS;    }    pop_n_elems(args);    push_int(o);   }      static void html_ignore_unknown(INT32 args)   {    int o=!!(THIS->flags & FLAG_IGNORE_UNKNOWN); -  check_all_args("ignore_unknown",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_IGNORE_UNKNOWN;    else THIS->flags &= ~FLAG_IGNORE_UNKNOWN;    }    pop_n_elems(args);    push_int(o);   }      static void html_xml_tag_syntax(INT32 args)   {    int o=THIS->flags; -  check_all_args("xml_tag_syntax",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    THIS->flags &= ~(FLAG_XML_TAGS|FLAG_STRICT_TAGS);    switch (sp[-args].u.integer) {    case 0: THIS->flags |= FLAG_STRICT_TAGS; break;    case 1: break;    case 2: THIS->flags |= FLAG_XML_TAGS; break;    case 3: THIS->flags |= FLAG_XML_TAGS|FLAG_STRICT_TAGS; break;    default: -  SIMPLE_BAD_ARG_ERROR ("xml_tag_syntax", 1, "integer 0..3"); +  SIMPLE_ARG_TYPE_ERROR ("xml_tag_syntax", 1, "integer 0..3");    }    recalculate_argq(THIS);    }    pop_n_elems(args);    if (o & FLAG_XML_TAGS)    o = o & FLAG_STRICT_TAGS ? 3 : 2;    else    o = o & FLAG_STRICT_TAGS ? 0 : 1;    push_int(o);   }      static void html_ws_before_tag_name(INT32 args)   {    int o=!!(THIS->flags & FLAG_WS_BEFORE_TAG_NAME); -  check_all_args("ws_before_tag_name",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_WS_BEFORE_TAG_NAME;    else THIS->flags &= ~FLAG_WS_BEFORE_TAG_NAME;    }    pop_n_elems(args);    push_int(o);   }      static void html_max_stack_depth(INT32 args)   {    int o=THIS->max_stack_depth; -  check_all_args("max_stack_depth",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    THIS->max_stack_depth = sp[-args].u.integer;    }    pop_n_elems(args);    push_int(o);   }      #ifdef HTML_DEBUG   static void html_debug_mode(INT32 args)   {    int o=!!(THIS->flags & FLAG_DEBUG_MODE); -  check_all_args("debug_mode",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_DEBUG_MODE;    else THIS->flags &= ~FLAG_DEBUG_MODE;    }    pop_n_elems(args);    push_int(o);   }   #endif      /*! @decl int ignore_comments(void|int value)    *!    */      static void html_ignore_comments(INT32 args)   {    int o=!!(THIS->flags & FLAG_IGNORE_COMMENTS); -  check_all_args("debug_mode",args,BIT_VOID|BIT_INT,0); +  check_all_args(NULL,args,BIT_VOID|BIT_INT,0);    if (args) {    if (sp[-args].u.integer) THIS->flags |= FLAG_IGNORE_COMMENTS;    else THIS->flags &= ~FLAG_IGNORE_COMMENTS;    recalculate_argq(THIS);    }    pop_n_elems(args);    push_int(o);   }    -  + /*! @decl int quote_stapling(int|void enable) +  *! +  *! Enable old-style attribute quoting by stapling. +  *! +  *! @param enable +  *! Enable/disable the mode. Defaults to +  *! keeping the old setting. +  *! +  *! @returns +  *! Returns the prior setting. +  *! +  *! @note +  *! Any use of this mode is discouraged, and is +  *! only provided for compatibility with versions +  *! of Pike prior to 8.0. +  *! +  *! @note +  *! Note also that this mode will output runtime +  *! warnings whenever the mode has had an effect +  *! on the parsing. +  */ + static void html_quote_stapling(INT32 args) + { +  int of = !!(THIS->flags & FLAG_QUOTE_STAPLING); +  int f = of; +  get_all_args(NULL, args, ".%d", &f); +  if (f) { +  THIS->flags |= FLAG_QUOTE_STAPLING; +  } else { +  THIS->flags &= ~FLAG_QUOTE_STAPLING; +  } +  push_int(of); + } +    /*! @endclass    */      /*! @endmodule    */         /****** module init *********************************/      #define tCbret tOr4(tZero,tInt1,tStr,tArr(tMixed))
pike.git/src/modules/Parser/html.c:5466:    ADD_FUNCTION("xml_tag_syntax",html_xml_tag_syntax,    tFunc(tOr(tVoid,tInt),tInt03),0);    ADD_FUNCTION("ws_before_tag_name",html_ws_before_tag_name,    tFunc(tOr(tVoid,tInt),tInt),0);   #ifdef HTML_DEBUG    ADD_FUNCTION("debug_mode",html_debug_mode,    tFunc(tOr(tVoid,tInt),tInt),0);   #endif    ADD_FUNCTION("ignore_comments",html_ignore_comments,    tFunc(tOr(tVoid,tInt),tInt),0); +  ADD_FUNCTION("quote_stapling",html_quote_stapling, +  tFunc(tOr(tVoid,tInt),tInt),0);       /* special callbacks */       ADD_FUNCTION("_set_tag_callback",html__set_tag_callback,    tFunc(t_Todo,    tObjImpl_PARSER_HTML),0);    ADD_FUNCTION("_set_data_callback",html__set_data_callback,    tFunc(t_Todo,    tObjImpl_PARSER_HTML),0);    ADD_FUNCTION("_set_entity_callback",html__set_entity_callback,
pike.git/src/modules/Parser/html.c:5493:    /* just useful */       ADD_FUNCTION("parse_tag_name",html_parse_tag_name,    tFunc(tStr,tStr),0);    ADD_FUNCTION("parse_tag_args",html_parse_tag_args,    tFunc(tStr,tMap(tStr,tStr)),0);       init_calc_chars();   }    - void exit_parser_html() + void exit_parser_html(void)   {    ba_destroy(&piece_allocator);    ba_destroy(&out_piece_allocator);    ba_destroy(&feed_stack_allocator);    exit_calc_chars();   }      /*      class Parse_HTML