From: Collin Funk Date: Fri, 12 Sep 2025 03:31:05 +0000 (-0700) Subject: maint: document some functions used by expand and unexpand X-Git-Tag: v9.8~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f585f3a3584ee3cde2437003321104606ed04064;p=thirdparty%2Fcoreutils.git maint: document some functions used by expand and unexpand * src/expand-common.h (get_next_tab_column, cleanup_file_list_stdin) (emit_tab_list_info): Document functions. * src/expand-common.c (cleanup_file_list_stdin, emit_tab_list_info): Likewise. --- diff --git a/src/expand-common.c b/src/expand-common.c index 732123f8d4..366c589cf6 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -380,7 +380,7 @@ next_file (FILE *fp) return nullptr; } -/* */ +/* Close standard input if we have read from it. */ extern void cleanup_file_list_stdin (void) { @@ -388,7 +388,8 @@ cleanup_file_list_stdin (void) error (EXIT_FAILURE, errno, "-"); } - +/* Emit the --help output for --tabs=LIST option accepted by expand and + unexpand. */ extern void emit_tab_list_info (void) { diff --git a/src/expand-common.h b/src/expand-common.h index fe6c8ed45d..46ef4e35b4 100644 --- a/src/expand-common.h +++ b/src/expand-common.h @@ -38,7 +38,10 @@ add_tab_stop (colno tabval); extern void parse_tab_stops (char const *stops) _GL_ATTRIBUTE_NONNULL (); -/* TODO: Document */ +/* Return number of first tab stop after COLUMN. TAB_INDEX specifies + many multiple tab-sizes. Set *LAST_TAB depending on whether we are + returning COLUMN + 1 merely because we're past the last tab. + If the number would overflow, diagnose this and exit. */ extern colno get_next_tab_column (const colno column, idx_t *tab_index, bool *last_tab) @@ -63,10 +66,11 @@ set_file_list (char **file_list); extern FILE * next_file (FILE *fp); -/* */ +/* Close standard input if we have read from it. */ extern void cleanup_file_list_stdin (void); - +/* Emit the --help output for --tabs=LIST option accepted by expand and + unexpand. */ extern void emit_tab_list_info (void);