Lines Matching defs:list

57  *          fc -l[nr] [BEG] [END]: list range of commands in history
65 * process substitution: <(list) and >(list)
588 * Since we now can, we incorporate linked list of all opened HFILEs
589 * into the struct (used to be a separate mini-list).
679 /* if non-NULL, this "command" is { list }, ( list ), or a compound statement */
753 /* linked list of pipes */
760 /* last redirect in command->redirects list */
783 * (parsing of { list } and ( list ) doesn't use this method)
932 * Exit if pipe, list, or compound command exits with a non-zero status.
934 * if/while, part of && or || list except the last command, any command
1803 return 0; /* "not in the list" */
2503 * Remove it from global variable list:
2507 /* Save in "shadowed" list */
2708 * If VAR is readonly, leaving it in the list
2720 * global linked list.
3456 * It contains char* list[] at the beginning, which is grown in 16 element
3458 * list[i] contains an INDEX (int!) into this string data.
3459 * It means that if list[] needs to grow, data needs to be moved higher up
3460 * but list[i]'s need not be modified.
3461 * NB: remembering how many list[i]'s you have there is crucial.
3463 * and stores actual char* ptrs in list[]. Oh, it NULL terminates it as well.
3468 char **list = (char**)o->data;
3469 int string_start = ((n + 0xf) & ~0xf) * sizeof(list[0]);
3473 fdprintf(2, "%s: list:%p n:%d string_start:%d length:%d maxlen:%d glob:%d quoted:%d escape:%d\n",
3474 prefix, list, n, string_start, o->length, o->maxlen,
3480 fdprintf(2, " list[%d]=%d '%s' %p\n", i, (int)(uintptr_t)list[i],
3481 o->data + (int)(uintptr_t)list[i] + string_start,
3482 o->data + (int)(uintptr_t)list[i] + string_start);
3486 const char *p = o->data + (int)(uintptr_t)list[n - 1] + string_start;
3500 * in list[n] so that it points past last stored byte so far.
3504 char **list = (char**)o->data;
3509 string_start = ((n + 0xf) & ~0xf) * sizeof(list[0]);
3512 debug_printf_list("list[%d]=%d string_start=%d (growing)\n", n, string_len, string_start);
3513 /* list[n] points to string_start, make space for 16 more pointers */
3514 o->maxlen += 0x10 * sizeof(list[0]);
3516 list = (char**)o->data;
3517 memmove(list + n + 0x10, list + n, string_len);
3524 list[n + 0x10 - 1] = 0;
3525 o->length += 0x10 * sizeof(list[0]);
3527 debug_printf_list("list[%d]=%d string_start=%d\n",
3531 /* We have empty slot at list[n], reuse without growth */
3532 string_start = ((n+1 + 0xf) & ~0xf) * sizeof(list[0]); /* NB: n+1! */
3534 debug_printf_list("list[%d]=%d string_start=%d (empty slot)\n",
3539 list[n] = (char*)(uintptr_t)string_len;
3546 char **list = (char**)o->data;
3547 int string_start = ((n + 0xf) & ~0xf) * sizeof(list[0]);
3549 return ((int)(uintptr_t)list[n-1]) + string_start;
3754 /* Performs globbing on last list[],
3755 * saving each result as a new list[].
3801 /* Performs globbing on last list[],
3802 * saving each result as a new list[].
3876 * Otherwise, just finish current list[] and start new */
3880 /* If o->has_empty_slot, list[n] was already globbed
3889 /* "Please convert list[n] to real char* ptrs, and NULL terminate it." */
3892 char **list;
3898 list = (char**)o->data;
3899 string_start = ((n + 0xf) & ~0xf) * sizeof(list[0]);
3900 list[--n] = NULL;
3903 list[n] = o->data + (int)(uintptr_t)list[n] + string_start;
3905 return list;
3910 /* Returns pi->next - next pipe in the list */
4315 /* Mostly a list of accepted follow-up reserved words.
4317 * to turn the compound list into a command.
4318 * FLAG_START means the word must start a new compound list.
4738 /* Create a new redir_struct and append it to the linked list */
5803 * Return a list of pipes to execute, or NULL on EOF
6455 debug_printf_clean("freeing list %p from ctx %p\n",
6459 debug_printf_clean("freed list %p\n", pctx->list_head);
6494 /* expand_strvec_to_strvec() takes a list of strings, expands
6496 * a list of expanded strings, possibly with larger number
6498 * This new list is allocated as a single malloc block.
6499 * NULL-terminated list of char* pointers is at the beginning of it,
6501 * Caller can deallocate entire list by single free(list). */
7453 /* Expand all variable references in given string, adding words to list[]
7454 * at n, n+1,... positions. Return updated n (so that list[n] is next one
7641 /* allow to reuse list[n] later without re-growth */
7651 char **list;
7658 /* go to next list[n] */
7672 /* output.data (malloced in one block) gets returned in "list" */
7673 list = o_finalize_list(&output, n);
7674 debug_print_strings("expand_variables[1]", list);
7675 return list;
7702 char *argv[2], **list;
7706 * handles "", which otherwise trips over !list[0] check below.
7717 list = expand_variables(argv, EXP_flags | EXP_FLAG_SINGLEWORD);
7718 if (!list[0]) {
7722 ((char*)list)[0] = '\0';
7725 if (list[1])
7728 overlapping_strcpy((char*)list, list[0]);
7730 unbackslash((char*)list);
7732 debug_printf_expand("string_to_string=>'%s'\n", (char*)list);
7733 return (char*)list;
7739 char **list;
7741 list = expand_variables(argv, EXP_FLAG_SINGLEWORD);
7743 if (list[0]) {
7745 while (list[n]) {
7747 if (list[n-1] + strlen(list[n-1]) + 1 != list[n])
7750 list[n][-1] = ' ';
7754 overlapping_strcpy((char*)list, list[0] ? list[0] : "");
7755 debug_printf_expand("strvec_to_string='%s'\n", (char*)list);
7756 return (char*)list;
7961 * of the form ( list ), but with any forked children shells.
8790 /* Remove from global list */
9351 * ( list )
9352 * { list } &
9353 * ... | ( list ) | ...
9354 * ... | { list } | ...
9447 /* Find the end of the list, and find next job ID to use */
9590 debug_printf("checkjobs: pid %d was not in our list!\n", childpid);
9619 * We only retain one "dead" job, if it's the single job on the list.
9771 * cmd ; ... { list } ; ...
9772 * cmd && ... { list } && ...
9773 * cmd || ... { list } || ...
9775 * or (if SH_STANDALONE) an applet, and we can run the { list }
9780 * backgrounded: cmd & { list } &
9781 * subshell: ( list ) [&]
9888 /* "executing" func () { list } */
9909 /* { list } */
10062 * into old_vars list:
10068 /* Do not collect *to old_vars list* vars shadowed
10070 * in the previously nested list instead):
10088 * But do collect *to old_vars list* vars shadowed
10103 /* Collect all variables "shadowed" by helper into old_vars list */
10272 /* Stores to nommu_save list of env vars putenv'ed
10432 /* Go through list of pipes, (maybe) executing them. */
10516 }; /* argv list with one element: "$@" */
10528 } /* else: "for var; do..." -> assume "$@" list */
10529 /* create list of variable values */
10561 continue; /* "for v IN list;..." - "in" has no cmds anyway */
10634 * even if list execution is to be stopped. */
10703 } /* else: "while... do... { we are here (innermost list is not a loop!) };...done" */
11513 IF_HUSH_HELP("Enter 'help' for a list of built-in commands.\n")
12052 /* bash: readonly [-p]: list all readonly VARs