Lines Matching defs:wp
435 free_word (struct word *wp)
437 if (wp->type == t_string)
439 free_token (wp->token);
440 free (wp->token);
446 string_of_word (const struct word *wp)
451 if (!(wp->type == t_string))
453 n = wp->token->charcount;
455 memcpy (str, wp->token->chars, n);
581 accumulate_word (struct word *wp, enum terminator looking_for,
615 wp->type = t_other;
655 wp->type = t_other;
663 wp->type = t_other;
668 if (wp->type == t_string)
670 grow_token (wp->token);
671 wp->token->chars[wp->token->charcount++] = '$';
680 wp->type = t_other;
693 if (wp->type == t_string)
696 grow_token (wp->token);
697 wp->token->chars[wp->token->charcount++] = utf8buf[i];
702 if (wp->type == t_string)
704 grow_token (wp->token);
705 wp->token->chars[wp->token->charcount++] = (unsigned char) c;
715 read_word (struct word *wp, int looking_for, flag_context_ty context)
726 wp->type = t_eof;
732 wp->type = t_brace;
743 wp->type = t_separator;
749 wp->type = t_separator;
756 wp->type = t_bracket;
776 wp->type = t_other;
781 wp->type = t_string;
782 wp->token = XMALLOC (struct token);
783 init_token (wp->token);
784 wp->line_number_at_start = line_number;
788 c = accumulate_word (wp, te_quote, context);
795 c = accumulate_word (wp,
804 if (wp->type != t_string)
806 free_token (wp->token);
807 free (wp->token);