mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-16 12:22:01 +02:00
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
73 lines
2.1 KiB
C
73 lines
2.1 KiB
C
/* expand-common - common functionality for expand/unexpand
|
|
|
|
Copyright (C) 1989-2025 Free Software Foundation, Inc.
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|
|
|
/* Column numbers are nonnegative, with the leftmost column being zero.
|
|
Use a signed type, as that allows for better checking. */
|
|
typedef intmax_t colno;
|
|
|
|
/* If true, convert blanks even after nonblank characters have been
|
|
read on the line. */
|
|
extern bool convert_entire_line;
|
|
|
|
/* The maximum distance between tab stops. */
|
|
extern idx_t max_column_width;
|
|
|
|
/* The desired exit status. */
|
|
extern int exit_status;
|
|
|
|
/* Add tab stop TABVAL to the end of 'tab_list'. */
|
|
extern void
|
|
add_tab_stop (colno tabval);
|
|
|
|
/* Add the comma or blank separated list of tab stops STOPS
|
|
to the list of tab stops. */
|
|
extern void
|
|
parse_tab_stops (char const *stops) _GL_ATTRIBUTE_NONNULL ();
|
|
|
|
/* TODO: Document */
|
|
extern colno
|
|
get_next_tab_column (const colno column, idx_t *tab_index,
|
|
bool *last_tab)
|
|
_GL_ATTRIBUTE_NONNULL ((3));
|
|
|
|
/* Called after all command-line options have been parsed,
|
|
sets the final tab-stops values */
|
|
extern void
|
|
finalize_tab_stops (void);
|
|
|
|
|
|
|
|
|
|
/* Sets new file-list */
|
|
extern void
|
|
set_file_list (char **file_list);
|
|
|
|
/* Close the old stream pointer FP if it is non-null,
|
|
and return a new one opened to read the next input file.
|
|
Open a filename of '-' as the standard input.
|
|
Return nullptr if there are no more input files. */
|
|
extern FILE *
|
|
next_file (FILE *fp);
|
|
|
|
/* */
|
|
extern void
|
|
cleanup_file_list_stdin (void);
|
|
|
|
|
|
extern void
|
|
emit_tab_list_info (void);
|