Lines Matching defs:pi
198 struct cmd_parse_input *pi = ps->input;
200 struct client *c = pi->c;
205 if (cmd_find_valid_state(&pi->fs))
206 fsp = &pi->fs;
211 ft = format_create(NULL, pi->item, FORMAT_NONE, flags);
603 cmd_parse_print_commands(struct cmd_parse_input *pi, struct cmd_list *cmdlist)
607 if (pi->item == NULL || (~pi->flags & CMD_PARSE_VERBOSE))
610 if (pi->file != NULL)
611 cmdq_print(pi->item, "%s:%u: %s", pi->file, pi->line, s);
613 cmdq_print(pi->item, "%u: %s", pi->line, s);
700 cmd_parse_do_file(FILE *f, struct cmd_parse_input *pi, char **cause)
705 ps->input = pi;
711 cmd_parse_do_buffer(const char *buf, size_t len, struct cmd_parse_input *pi,
717 ps->input = pi;
759 struct cmd_parse_input *pi, struct cmd_parse_result *pr)
766 if (pi->flags & CMD_PARSE_NOALIAS)
781 log_debug("%s: %u alias %s = %s", __func__, pi->line, name, alias);
783 cmds = cmd_parse_do_buffer(alias, strlen(alias), pi, &cause);
807 pi->flags |= CMD_PARSE_NOALIAS;
808 cmd_parse_build_commands(cmds, pi, pr);
809 pi->flags &= ~CMD_PARSE_NOALIAS;
815 struct cmd_parse_input *pi, struct cmd_parse_result *pr)
825 if (cmd_parse_expand_alias(cmd, pi, pr))
837 cmd_parse_build_commands(arg->commands, pi, pr);
852 add = cmd_parse(values, count, pi->file, pi->line, &cause);
855 pr->error = cmd_parse_get_error(pi->file, pi->line, cause);
871 struct cmd_parse_input *pi, struct cmd_parse_result *pr)
896 if (((~pi->flags & CMD_PARSE_ONEGROUP) && cmd->line != line)) {
898 cmd_parse_print_commands(pi, current);
906 line = pi->line = cmd->line;
908 cmd_parse_build_command(cmd, pi, pr);
918 cmd_parse_print_commands(pi, current);
932 cmd_parse_from_file(FILE *f, struct cmd_parse_input *pi)
939 if (pi == NULL) {
941 pi = &input;
945 cmds = cmd_parse_do_file(f, pi, &cause);
951 cmd_parse_build_commands(cmds, pi, &pr);
958 cmd_parse_from_string(const char *s, struct cmd_parse_input *pi)
962 if (pi == NULL) {
964 pi = &input;
972 pi->flags |= CMD_PARSE_ONEGROUP;
973 return (cmd_parse_from_buffer(s, strlen(s), pi));
977 cmd_parse_and_insert(const char *s, struct cmd_parse_input *pi,
983 pr = cmd_parse_from_string(s, pi);
1001 cmd_parse_and_append(const char *s, struct cmd_parse_input *pi,
1007 pr = cmd_parse_from_string(s, pi);
1025 cmd_parse_from_buffer(const void *buf, size_t len, struct cmd_parse_input *pi)
1032 if (pi == NULL) {
1034 pi = &input;
1044 cmds = cmd_parse_do_buffer(buf, len, pi, &cause);
1050 cmd_parse_build_commands(cmds, pi, &pr);
1057 struct cmd_parse_input *pi)
1074 if (pi == NULL) {
1076 pi = &input;
1083 cmd->line = pi->line;
1116 cmd->line = pi->line;
1125 cmd_parse_build_commands(cmds, pi, &pr);
1134 struct cmd_parse_input *pi = ps->input;
1145 ps->error = cmd_parse_get_error(pi->file, pi->line, error);