diff options
author | pgen <p.gen.progs@gmail.com> | 2024-02-06 00:04:51 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2024-02-06 00:06:39 +0100 |
commit | dfd5830b2ab094d79cc360e9f341d406b2525d16 (patch) | |
tree | 9c216ab15bd70f41c3fda9769be83863061b944b | |
parent | 85d783c4e669e14adccc5c009ca71180c630458c (diff) |
Rename get_bytes/_word into read_bytes/_word
-rwxr-xr-x | smenu.c | 78 | ||||
-rwxr-xr-x | smenu.h | 36 |
2 files changed, 57 insertions, 57 deletions
@@ -3315,11 +3315,11 @@ buffer_cmp(const void *a, const void *b) /* the character. */ /* ===================================================================== */ int -get_bytes(FILE *input, - char *utf8_buffer, - ll_t *zapped_glyphs_list, - langinfo_t *langinfo, - misc_t *misc) +read_bytes(FILE *input, + char *utf8_buffer, + ll_t *zapped_glyphs_list, + langinfo_t *langinfo, + misc_t *misc) { int byte; int last; @@ -3498,26 +3498,26 @@ expand(char *src, return len; } -/* ===================================================================== */ -/* get_word(input): return a char pointer to the next word (as a string) */ -/* Accept: a FILE * for the input stream. */ -/* Return: a char * */ -/* On Success: the return value will point to a nul-terminated */ -/* string. */ -/* On Failure: the return value will be set to NULL. */ -/* ===================================================================== */ +/* ====================================================================== */ +/* read_word(input): return a char pointer to the next word (as a string) */ +/* Accept: a FILE * for the input stream. */ +/* Return: a char * */ +/* On Success: the return value will point to a nul-terminated */ +/* string. */ +/* On Failure: the return value will be set to NULL. */ +/* ====================================================================== */ char * -get_word(FILE *input, - ll_t *word_delims_list, - ll_t *line_delims_list, - ll_t *zapped_glyphs_list, - char *utf8_buffer, - unsigned char *is_last, - toggle_t *toggles, - langinfo_t *langinfo, - win_t *win, - limit_t *limits, - misc_t *misc) +read_word(FILE *input, + ll_t *word_delims_list, + ll_t *line_delims_list, + ll_t *zapped_glyphs_list, + char *utf8_buffer, + unsigned char *is_last, + toggle_t *toggles, + langinfo_t *langinfo, + win_t *win, + limit_t *limits, + misc_t *misc) { char *temp = NULL; int byte; @@ -3530,7 +3530,7 @@ get_word(FILE *input, /* Skip leading delimiters. */ /* """""""""""""""""""""""" */ do - byte = get_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); + byte = read_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); while (byte != EOF && ll_find(word_delims_list, utf8_buffer, buffer_cmp) != NULL); @@ -3672,7 +3672,7 @@ get_word(FILE *input, is_special = 0; next: - byte = get_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); + byte = read_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); } /* Nul-terminate the word to make it a string. */ @@ -3688,12 +3688,12 @@ get_word(FILE *input, /* """""""""""""""""""""""""""""""""""""""""""""""""""" */ if (ll_find(line_delims_list, utf8_buffer, buffer_cmp) == NULL) { - byte = get_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); + byte = read_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); while (byte != EOF && ll_find(word_delims_list, utf8_buffer, buffer_cmp) != NULL && ll_find(line_delims_list, utf8_buffer, buffer_cmp) == NULL) - byte = get_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); + byte = read_bytes(input, utf8_buffer, zapped_glyphs_list, langinfo, misc); if (byte != EOF) { @@ -10914,17 +10914,17 @@ main(int argc, char *argv[]) /* - The -R is taken into account */ /* - The first part of the -C option is done */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ - while ((word = get_word(input_file, - word_delims_list, - line_delims_list, - zapped_glyphs_list, - utf8_buffer, - &is_last, - &toggles, - &langinfo, - &win, - &limits, - &misc)) + while ((word = read_word(input_file, + word_delims_list, + line_delims_list, + zapped_glyphs_list, + utf8_buffer, + &is_last, + &toggles, + &langinfo, + &win, + &limits, + &misc)) != NULL) { int selectable; @@ -650,27 +650,27 @@ expand(char *src, misc_t *misc); int -get_bytes(FILE *input, - char *utf8_buffer, - ll_t *ignored_glyphs_list, - langinfo_t *langinfo, - misc_t *misc); +read_bytes(FILE *input, + char *utf8_buffer, + ll_t *ignored_glyphs_list, + langinfo_t *langinfo, + misc_t *misc); int get_scancode(unsigned char *s, size_t max); char * -get_word(FILE *input, - ll_t *word_delims_list, - ll_t *line_delims_list, - ll_t *ignored_glyphs_list, - char *utf8_buffer, - unsigned char *is_last, - toggle_t *toggles, - langinfo_t *langinfo, - win_t *win, - limit_t *limits, - misc_t *misc); +read_word(FILE *input, + ll_t *word_delims_list, + ll_t *line_delims_list, + ll_t *ignored_glyphs_list, + char *utf8_buffer, + unsigned char *is_last, + toggle_t *toggles, + langinfo_t *langinfo, + win_t *win, + limit_t *limits, + misc_t *misc); void left_margin_putp(char *s, term_t *term, win_t *win); @@ -824,7 +824,7 @@ void align_word(word_t *word, alignment_t alignment, size_t prerfix, char sp); int -isempty_non_utf8(const unsigned char * s); +isempty_non_utf8(const unsigned char *s); int -isempty_utf8(const unsigned char * s); +isempty_utf8(const unsigned char *s); |