summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2016-12-03 13:23:17 +0100
committerpgen <p.gen.progs@gmail.com>2016-12-03 13:23:17 +0100
commit0d7a9c2bf66889a981f123a905e38fa962686f9e (patch)
tree38248fde0d4ffc89a3b874a543321fd9e99a4896
parent0e181a62235cc30ac5ea893ad3533600cdec0605 (diff)
Cosmetic changes
-rw-r--r--smenu.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/smenu.c b/smenu.c
index ea6ab2f..4acdb84 100644
--- a/smenu.c
+++ b/smenu.c
@@ -344,7 +344,7 @@ struct word_s
{
int start, end; /* start/end absolute horiz. word positions *
* on the screen */
- size_t mbytes; /* number of multibytes to display */
+ size_t mb; /* number of multibytes to display */
int special_level; /* can vary from 0 to 5; 0 meaning normal */
char * str; /* display string associated with this word */
size_t len; /* number of bytes of str (for trimming) */
@@ -3368,14 +3368,14 @@ build_metadata(word_t * word_a, term_t * term, int count, win_t * win)
len = word_width + 1; /* Resets the current line length */
tab_count = 1; /* Resets the current number of words *
* in the line */
- word_a[i].end = word_width - 1;
- word_a[i].mbytes = word_len + 1;
+ word_a[i].end = word_width - 1;
+ word_a[i].mb = word_len + 1;
}
else
{
word_a[i].start = len;
word_a[i].end = word_a[i].start + word_width - 1;
- word_a[i].mbytes = word_len + 1;
+ word_a[i].mb = word_len + 1;
line_nb_of_word_a[i] = last;
len += word_width + 1; /* Increase line length */
@@ -3445,8 +3445,7 @@ disp_word(word_t * word_a, int pos, int search_mode, char * buffer,
(void)tputs(enter_standout_mode, 1, outch);
}
- mb_strprefix(tmp_max_word, word_a[pos].str, (int)word_a[pos].mbytes - 1,
- &p);
+ mb_strprefix(tmp_max_word, word_a[pos].str, (int)word_a[pos].mb - 1, &p);
(void)fputs(tmp_max_word, stdout);
/* Overwrite the beginning of the word with the search buffer */
@@ -3518,8 +3517,8 @@ disp_word(word_t * word_a, int pos, int search_mode, char * buffer,
else if (term->has_standout)
(void)tputs(enter_standout_mode, 1, outch);
- (void)mb_strprefix(tmp_max_word, word_a[pos].str,
- (int)word_a[pos].mbytes - 1, &p);
+ (void)mb_strprefix(tmp_max_word, word_a[pos].str, (int)word_a[pos].mb - 1,
+ &p);
(void)fputs(tmp_max_word, stdout);
}
(void)tputs(exit_attribute_mode, 1, outch);
@@ -3528,8 +3527,7 @@ disp_word(word_t * word_a, int pos, int search_mode, char * buffer,
{
/* Display a normal word without any attribute */
/* """"""""""""""""""""""""""""""""""""""""""" */
- mb_strprefix(tmp_max_word, word_a[pos].str, (int)word_a[pos].mbytes - 1,
- &p);
+ mb_strprefix(tmp_max_word, word_a[pos].str, (int)word_a[pos].mb - 1, &p);
if (!word_a[pos].is_selectable)
{