Lines Matching defs:string

106  *	Recursively expands all macros in the string value.
129 * Make sure to get a string allocated even if it
157 sourceb.string.text.p = sourceb.string.buffer.start = wcsdup(vals.get_string());
158 sourceb.string.free_after_use = true;
159 sourceb.string.text.end =
160 sourceb.string.buffer.end =
161 sourceb.string.text.p + value->hash.length;
170 /* We parse the string in segments */
185 /* Save the plain string we found since */
186 /* start of string or previous $ */
197 source->string.text.p = ++source_p;
200 expand_macro(source, destination, sourceb.string.buffer.start, cmd);
205 /* The string ran out. Get some more */
224 retmem(sourceb.string.buffer.start);
230 * Should be called with source->string.text.p pointing to
232 * source->string.text.p is returned pointing to the first char after
243 * source The source block that references the string
246 * current_string The string we are expanding, for error msg
264 String_rec string;
266 register wchar_t *source_p = source->string.text.p;
267 register wchar_t *source_end = source->string.text.end;
310 /* First copy the (macro-expanded) macro name into string. */
311 INIT_STRING_FROM_STACK(string, buffer);
319 fatal_reader_mksh(gettext("'$' at end of string `%s'"),
338 append_char(*source_p, &string);
339 source->string.text.p = source_p + 1;
350 &string,
356 fatal_reader_mksh(gettext("Unmatched `%c' in string `%s'"),
387 * macro name string.
391 &string,
397 &string,
399 source->string.text.p = ++source_p;
401 expand_macro(source, &string, current_string, cmd);
421 * End of the name. Save the string in the macro
422 * name string.
425 source->string.text.p = source_p + 1;
427 &string,
442 if ((get_char_semantics_value(string.buffer.start[0]) &
444 (string.text.p - string.buffer.start >= 2) &&
445 ((string.buffer.start[1] == 'D') ||
446 (string.buffer.start[1] == 'F'))) {
447 switch (string.buffer.start[1]) {
455 WCSTOMBS(mbs_buffer, string.buffer.start);
460 name = GETNAME(string.buffer.start, 1);
461 (void) wcscpy(string.buffer.start, string.buffer.start + 2);
464 if ((colon = (wchar_t *) wcschr(string.buffer.start,
471 name = GETNAME(string.buffer.start,
472 colon - string.buffer.start);
599 * Use the whole string as the macro name.
601 name = GETNAME(string.buffer.start,
602 string.text.p - string.buffer.start);
604 if (string.free_after_use) {
605 retmem(string.buffer.start);
648 INIT_STRING_FROM_STACK(string, buffer);
649 /* Expand the value into a local string buffer and run cmd. */
650 expand_value_with_daemon(name, macro, &string, cmd);
651 sh_command2string(&string, destination);
657 INIT_STRING_FROM_STACK(string, buffer);
658 /* Expand the value into a local string buffer. */
659 expand_value_with_daemon(name, macro, &string, cmd);
660 /* Scan the expanded string. */
661 p = string.buffer.start;
667 * that to the destination string.
806 if (string.free_after_use) {
807 retmem(string.buffer.start);
1029 /* list of names to a string */
1065 * strip_trailing_spaces from the end of value->string