diff options
| author | Paul Eggert | 2024-01-20 16:52:31 -0800 |
|---|---|---|
| committer | Paul Eggert | 2024-01-20 17:28:53 -0800 |
| commit | b6ed79b71ccb3df8df05531d473ff9510cf9a39f (patch) | |
| tree | cea1f448b8e163fc0972b09774f075f9c2277372 /src/term.c | |
| parent | 0a47a5a4bef0a33c012302346685ecab861cc306 (diff) | |
| download | emacs-b6ed79b71ccb3df8df05531d473ff9510cf9a39f.tar.gz emacs-b6ed79b71ccb3df8df05531d473ff9510cf9a39f.zip | |
Be more systematic about parens in C source code
Be more systematic about putting space before paren in calls,
and in avoiding unnecessary parentheses in macros.
This was partly inspired by my wading through gcc -E output
while debugging something else, and seeing too many parens.
This patch does not change the generated .o files on my platform.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/term.c b/src/term.c index d3c858c6bf2..447876d288a 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -86,12 +86,12 @@ static AVOID vfatal (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); | |||
| 86 | #ifndef HAVE_ANDROID | 86 | #ifndef HAVE_ANDROID |
| 87 | 87 | ||
| 88 | #define OUTPUT(tty, a) \ | 88 | #define OUTPUT(tty, a) \ |
| 89 | emacs_tputs ((tty), a, \ | 89 | emacs_tputs (tty, a, \ |
| 90 | FRAME_TOTAL_LINES (XFRAME (selected_frame)) - curY (tty), \ | 90 | FRAME_TOTAL_LINES (XFRAME (selected_frame)) - curY (tty), \ |
| 91 | cmputc) | 91 | cmputc) |
| 92 | 92 | ||
| 93 | #define OUTPUT1(tty, a) emacs_tputs ((tty), a, 1, cmputc) | 93 | #define OUTPUT1(tty, a) emacs_tputs (tty, a, 1, cmputc) |
| 94 | #define OUTPUTL(tty, a, lines) emacs_tputs ((tty), a, lines, cmputc) | 94 | #define OUTPUTL(tty, a, lines) emacs_tputs (tty, a, lines, cmputc) |
| 95 | 95 | ||
| 96 | #define OUTPUT_IF(tty, a) \ | 96 | #define OUTPUT_IF(tty, a) \ |
| 97 | do { \ | 97 | do { \ |
| @@ -99,7 +99,8 @@ static AVOID vfatal (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); | |||
| 99 | OUTPUT (tty, a); \ | 99 | OUTPUT (tty, a); \ |
| 100 | } while (0) | 100 | } while (0) |
| 101 | 101 | ||
| 102 | #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0) | 102 | #define OUTPUT1_IF(tty, a) \ |
| 103 | do { if (a) emacs_tputs (tty, a, 1, cmputc); } while (0) | ||
| 103 | 104 | ||
| 104 | #endif | 105 | #endif |
| 105 | 106 | ||
| @@ -1117,7 +1118,7 @@ per_line_cost (const char *str) | |||
| 1117 | 1118 | ||
| 1118 | int *char_ins_del_vector; | 1119 | int *char_ins_del_vector; |
| 1119 | 1120 | ||
| 1120 | #define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_COLS ((f))]) | 1121 | #define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_COLS (f)]) |
| 1121 | 1122 | ||
| 1122 | static void | 1123 | static void |
| 1123 | calculate_ins_del_char_costs (struct frame *f) | 1124 | calculate_ins_del_char_costs (struct frame *f) |