Home | History | Annotate | Download | only in sed

Lines Matching refs:to

16     along with this program; if not, write to the Free Software
89 char *text; /* Pointer to line allocated by malloc. */
90 char *active; /* Pointer to non-consumed part of text. */
105 /* A queue of text to write out at the end of a cycle
117 /* The list of yet-to-be-opened files. It is invalid for file_list
118 to be NULL. When *file_list is NULL we are currently processing
123 /* Count of files we failed to open. */
130 starting to process the next (possibly the first) file. */
133 /* Function to read one line. If FP is NULL, read_fn better not
142 /* Owner and mode to be set just before closing the file. */
161 /* An input line used to accumulate the result of the s and e commands. */
181 enough to run the configure script, which is all that matters.
215 /* If the inactive part has got to more than two thirds of the buffer,
238 /* Append `length' bytes from `string' to the line `to'. */
241 str_append(to, string, length)
242 struct line *to;
246 size_t new_length = to->length + length;
248 if (to->alloc < new_length)
249 resize_line(to, new_length);
250 MEMCPY(to->active + to->length, string, length);
251 to->length = new_length;
257 size_t n = MBRLEN (string, length, &to->mbstate);
262 memset (&to->mbstate, 0, sizeof (to->mbstate));
280 str_append_modified(to, string, length, type)
281 struct line *to;
291 str_append(to, string, length);
295 if (to->alloc - to->length < length * mb_cur_max)
296 resize_line(to, to->length + length * mb_cur_max);
298 MEMCPY (&from_stat, &to->mbstate, sizeof(mbstate_t));
307 memset (&to->mbstate, 0, sizeof (from_stat));
316 str_append(to, string, length);
331 n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
332 to->length += n;
333 str_append(to, string, length);
343 /* Copy the new wide character to the end of the string. */
344 n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
345 to->length += n;
353 size_t old_length = to->length;
356 str_append(to, string, length);
357 start = to->active + old_length;
410 /* Reset a "struct line" buffer to length zero. Copy multibyte state from
431 /* Copy the contents of the line `from' into the line `to'.
432 This destroys the old contents of `to'.
434 static void line_copy P_((struct line *from, struct line *to, int state));
436 line_copy(from, to, state)
438 struct line *to;
442 to->alloc += to->active - to->text;
444 if (to->alloc < from->length)
446 to->alloc *= 2;
447 if (to->alloc < from->length)
448 to->alloc = from->length;
449 if (to->alloc < INITIAL_BUFFER_SIZE)
450 to->alloc = INITIAL_BUFFER_SIZE;
451 /* Use FREE()+MALLOC() instead of REALLOC() to
453 FREE(to->text);
454 to->text = MALLOC(to->alloc, char);
457 to->active = to->text;
458 to->length = from->length;
459 to->chomped = from->chomped;
460 MEMCPY(to->active, from->active, from->length);
464 MEMCPY(&to->mbstate, &from->mbstate, sizeof (from->mbstate));
468 /* Append the contents of the line `from' to the line `to'.
470 static void line_append P_((struct line *from, struct line *to, int state));
472 line_append(from, to, state)
474 struct line *to;
477 str_append(to, "\n", 1);
478 str_append(to, from->active, from->length);
479 to->chomped = from->chomped;
483 MEMCPY (&to->mbstate, &from->mbstate, sizeof (from->mbstate));
514 /* dummy function to simplify read_pattern_space() */
681 /* Each iteration gobbles up to an asterisk */
762 fprintf (stderr, _("%s: warning: failed to set default file creation context to %s: %s"),
769 fprintf (stderr, _("%s: warning: failed to get security context of %s: %s"),
858 Return zero if there is nothing left to input. */
866 if (append_head) /* redundant test to optimize for common case */
888 new-line to this file; but if the output goes to stdout,
889 we might still have to output the missing new-line. */
950 pointed to by `addr'. */
972 /* a2->addr_number needs to be recomputed each time a1 address
1000 /* Find if we are going to activate a range. Handle ADDR_IS_NUM
1051 that line, fail to match (it can happen when you jump
1146 have not had yet the occasion to apply. But don't do it
1165 the \u modifier is applied to \2, not \1 */
1183 size_t start = 0; /* where to start scan for (next) match in LINE */
1227 /* Copy stuff to the left of this match into the output string. */
1231 /* If we're counting up to the Nth match, are we there yet?
1232 And even if we are there, there is another case we have to
1254 add that character to the output. */
1277 /* Copy stuff to the right of the last match into the output string. */
1317 for 'g' as to while the third argument is incorrect anyway. */
1337 /* Used to attempt a simple-minded optimization. */
1433 but it seems to be expected (and make sense). */
1449 /* reset to start next cycle without reading a new line: */
1496 to while the third argument is incorrect anyway. */
1532 /* Here, it is ok to have true. */
1772 line we should be able to quit if no_default_output is true,
1773 or otherwise quickly copy input to output. Now whether this
1829 /* Apply the compiled script to all the named files. */
1872 /* We're about to exit, so these free()s are redundant.
1874 implementation of malloc(), we want to explicitly
1875 deallocate in order to avoid extraneous noise from