Lines Matching refs:wp
447 free_word (struct word *wp)
449 if (wp->type == t_string)
451 free_token (wp->token);
452 free (wp->token);
458 string_of_word (const struct word *wp)
463 if (!(wp->type == t_string))
465 n = wp->token->charcount;
467 memcpy (str, wp->token->chars, n);
718 read_word (struct word *wp, int looking_for, flag_context_ty context)
749 wp->type = t_separator;
757 wp->type = t_eof;
779 wp->type = t_redirect;
789 wp->type = t_backquote;
796 wp->type = t_paren;
803 wp->type = (c == ';' ? t_separator : t_other);
807 wp->type = t_string;
808 wp->token = XMALLOC (struct token);
809 init_token (wp->token);
810 wp->line_number_at_start = line_number;
835 wp->type = t_redirect;
836 free_token (wp->token);
837 free (wp->token);
1036 if (wp->type == t_string)
1038 grow_token (wp->token);
1039 wp->token->chars[wp->token->charcount++] =
1043 /* The result is a literal string. Don't change wp->type. */
1080 change wp->type. */
1085 wp->type = t_other;
1131 wp->type = t_other;
1151 wp->type = t_other;
1162 if (wp->type == t_string)
1164 grow_token (wp->token);
1165 wp->token->chars[wp->token->charcount++] = (unsigned char) c;
1171 if (wp->type != t_string)
1173 free_token (wp->token);
1174 free (wp->token);