tweaks: separate a symbol from its definition by two spaces

It's a little clearer, and new ones were like that already.
master
Benno Schulenberg 2020-05-29 18:45:14 +02:00
parent 248d392c4d
commit 933dd567de
8 changed files with 96 additions and 96 deletions

View File

@ -271,9 +271,9 @@ size_t light_to_col = 0;
#define BLANKAFTER TRUE /* A blank line after this one. */
#define TOGETHER FALSE
#ifdef ENABLE_MULTIBUFFER
#define CAN_OPEN_OTHER_BUFFER TRUE
#define CAN_OPEN_OTHER_BUFFER TRUE
#else
#define CAN_OPEN_OTHER_BUFFER FALSE
#define CAN_OPEN_OTHER_BUFFER FALSE
#endif
/* Empty functions, for the most part corresponding to toggles. */
@ -727,9 +727,9 @@ void shortcut_init(void)
#endif /* ENABLE_HELP */
#ifdef ENABLE_HELP
#define WITHORSANS(help) help
#define WITHORSANS(help) help
#else
#define WITHORSANS(help) ""
#define WITHORSANS(help) ""
#endif
/* Start populating the different menus with functions. */

View File

@ -27,11 +27,11 @@
#include <string.h>
#ifndef SEARCH_HISTORY
#define SEARCH_HISTORY "search_history"
#define SEARCH_HISTORY "search_history"
#endif
#ifndef POSITION_HISTORY
#define POSITION_HISTORY "filepos_history"
#define POSITION_HISTORY "filepos_history"
#endif
static bool history_changed = FALSE;

View File

@ -43,9 +43,9 @@
#endif
#ifdef ENABLE_MULTIBUFFER
#define read_them_all TRUE
#define read_them_all TRUE
#else
#define read_them_all FALSE
#define read_them_all FALSE
#endif
#ifdef ENABLE_MOUSE

View File

@ -25,7 +25,7 @@
#ifdef NEED_XOPEN_SOURCE_EXTENDED
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED 1
#define _XOPEN_SOURCE_EXTENDED 1
#endif
#endif
@ -46,30 +46,30 @@
#endif
/* Suppress warnings for __attribute__((warn_unused_result)). */
#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)
#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)
/* Macros for flags, indexing each bit in a small array. */
#define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))]
#define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8)))
#define SET(flag) FLAGS(flag) |= FLAGMASK(flag)
#define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag)
#define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0)
#define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag)
#define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))]
#define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8)))
#define SET(flag) FLAGS(flag) |= FLAGMASK(flag)
#define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag)
#define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0)
#define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag)
/* Macros for allocation of character strings. */
#define charalloc(howmuch) (char *)nmalloc(howmuch)
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, howmuch)
#define charalloc(howmuch) (char *)nmalloc(howmuch)
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, howmuch)
/* In UTF-8 a character is at most six bytes long. */
#ifdef ENABLE_UTF8
#define MAXCHARLEN 6
#define MAXCHARLEN 6
#else
#define MAXCHARLEN 1
#define MAXCHARLEN 1
#endif
/* Set a default value for PATH_MAX if there isn't one. */
#ifndef PATH_MAX
#define PATH_MAX 4096
#define PATH_MAX 4096
#endif
#ifdef USE_SLANG
@ -77,8 +77,8 @@
#include <slcurses.h>
/* Slang curses emulation brain damage, part 3: Slang doesn't define the
* curses equivalents of the Insert or Delete keys. */
#define KEY_DC SL_KEY_DELETE
#define KEY_IC SL_KEY_IC
#define KEY_DC SL_KEY_DELETE
#define KEY_IC SL_KEY_IC
/* Ncurses support. */
#elif defined(HAVE_NCURSESW_NCURSES_H)
#include <ncursesw/ncurses.h>
@ -90,7 +90,7 @@
#endif /* CURSES_H */
#if defined(NCURSES_VERSION_MAJOR) && (NCURSES_VERSION_MAJOR < 6)
#define USING_OLD_NCURSES yes
#define USING_OLD_NCURSES yes
#endif
#ifdef ENABLE_NLS
@ -98,14 +98,14 @@
#ifdef HAVE_LIBINTL_H
#include <libintl.h>
#endif
#define _(string) gettext(string)
#define P_(singular, plural, number) ngettext(singular, plural, number)
#define _(string) gettext(string)
#define P_(singular, plural, number) ngettext(singular, plural, number)
#else
#define _(string) (string)
#define P_(singular, plural, number) (number == 1 ? singular : plural)
#define _(string) (string)
#define P_(singular, plural, number) (number == 1 ? singular : plural)
#endif
#define gettext_noop(string) (string)
#define N_(string) gettext_noop(string)
#define gettext_noop(string) (string)
#define N_(string) gettext_noop(string)
/* Mark a string that will be sent to gettext() later. */
#include <dirent.h>
@ -121,22 +121,22 @@
#endif
#if defined(ENABLE_WRAPPING) || defined(ENABLE_JUSTIFY)
#define ENABLED_WRAPORJUSTIFY 1
#define ENABLED_WRAPORJUSTIFY 1
#endif
#define BACKWARD FALSE
#define FORWARD TRUE
#define BACKWARD FALSE
#define FORWARD TRUE
#define BLIND FALSE
#define VISIBLE TRUE
#define BLIND FALSE
#define VISIBLE TRUE
#define JUSTFIND 0
#define REPLACING 1
#define INREGION 2
#define JUSTFIND 0
#define REPLACING 1
#define INREGION 2
#ifdef ENABLE_COLOR
#define USE_THE_DEFAULT -1
#define BAD_COLOR -2
#define USE_THE_DEFAULT -1
#define BAD_COLOR -2
#endif
#define STANDARD_INPUT 0
@ -572,61 +572,61 @@ enum
#define DEL_CODE 0x7F
/* Codes for "modified" Arrow keys, beyond KEY_MAX of ncurses. */
#define CONTROL_LEFT 0x401
#define CONTROL_RIGHT 0x402
#define CONTROL_UP 0x403
#define CONTROL_DOWN 0x404
#define CONTROL_HOME 0x405
#define CONTROL_END 0x406
#define CONTROL_DELETE 0x40D
#define SHIFT_CONTROL_LEFT 0x411
#define SHIFT_CONTROL_RIGHT 0x412
#define SHIFT_CONTROL_UP 0x413
#define SHIFT_CONTROL_DOWN 0x414
#define SHIFT_CONTROL_HOME 0x415
#define SHIFT_CONTROL_END 0x416
#define CONTROL_SHIFT_DELETE 0x41D
#define ALT_LEFT 0x421
#define ALT_RIGHT 0x422
#define ALT_UP 0x423
#define ALT_DOWN 0x424
#define ALT_PAGEUP 0x427
#define ALT_PAGEDOWN 0x428
#define ALT_INSERT 0x42C
#define ALT_DELETE 0x42D
#define SHIFT_ALT_LEFT 0x431
#define SHIFT_ALT_RIGHT 0x432
#define SHIFT_ALT_UP 0x433
#define SHIFT_ALT_DOWN 0x434
#define CONTROL_LEFT 0x401
#define CONTROL_RIGHT 0x402
#define CONTROL_UP 0x403
#define CONTROL_DOWN 0x404
#define CONTROL_HOME 0x405
#define CONTROL_END 0x406
#define CONTROL_DELETE 0x40D
#define SHIFT_CONTROL_LEFT 0x411
#define SHIFT_CONTROL_RIGHT 0x412
#define SHIFT_CONTROL_UP 0x413
#define SHIFT_CONTROL_DOWN 0x414
#define SHIFT_CONTROL_HOME 0x415
#define SHIFT_CONTROL_END 0x416
#define CONTROL_SHIFT_DELETE 0x41D
#define ALT_LEFT 0x421
#define ALT_RIGHT 0x422
#define ALT_UP 0x423
#define ALT_DOWN 0x424
#define ALT_PAGEUP 0x427
#define ALT_PAGEDOWN 0x428
#define ALT_INSERT 0x42C
#define ALT_DELETE 0x42D
#define SHIFT_ALT_LEFT 0x431
#define SHIFT_ALT_RIGHT 0x432
#define SHIFT_ALT_UP 0x433
#define SHIFT_ALT_DOWN 0x434
//#define SHIFT_LEFT 0x451
//#define SHIFT_RIGHT 0x452
#define SHIFT_UP 0x453
#define SHIFT_DOWN 0x454
#define SHIFT_HOME 0x455
#define SHIFT_END 0x456
#define SHIFT_PAGEUP 0x457
#define SHIFT_PAGEDOWN 0x458
#define SHIFT_DELETE 0x45D
#define SHIFT_TAB 0x45F
#define SHIFT_UP 0x453
#define SHIFT_DOWN 0x454
#define SHIFT_HOME 0x455
#define SHIFT_END 0x456
#define SHIFT_PAGEUP 0x457
#define SHIFT_PAGEDOWN 0x458
#define SHIFT_DELETE 0x45D
#define SHIFT_TAB 0x45F
/* A special keycode for when <Tab> is pressed while the mark is on. */
#define INDENT_KEY 0x4F1
#define INDENT_KEY 0x4F1
/* A special keycode to signal the beginning and end of a bracketed paste. */
#define BRACKETED_PASTE_MARKER 0x4FB
#define BRACKETED_PASTE_MARKER 0x4FB
#ifdef USE_SLANG
#ifdef ENABLE_UTF8
#define KEY_BAD 0xFF /* Clipped error code. */
#define KEY_BAD 0xFF /* Clipped error code. */
#endif
#define KEY_FLUSH 0x91 /* User-definable control code. */
#define KEY_FLUSH 0x91 /* User-definable control code. */
#else
#define KEY_FLUSH KEY_F0 /* Nonexistent function key. */
#define KEY_FLUSH KEY_F0 /* Nonexistent function key. */
#endif
#ifndef NANO_TINY
/* An imaginary key for when we get a SIGWINCH (window resize). */
#define KEY_WINCH -2
#define KEY_WINCH -2
/* Some extra flags for the undo function. */
#define WAS_BACKSPACE_AT_EOF (1<<1)
@ -637,17 +637,17 @@ enum
#endif /* !NANO_TINY */
/* The default number of columns from end of line where wrapping occurs. */
#define COLUMNS_FROM_EOL 8
#define COLUMNS_FROM_EOL 8
/* The default width of a tab in spaces. */
#define WIDTH_OF_TAB 8
#define WIDTH_OF_TAB 8
/* The default comment character when a syntax does not specify any. */
#define GENERAL_COMMENT_CHARACTER "#"
#define GENERAL_COMMENT_CHARACTER "#"
/* The maximum number of search/replace history strings saved, not
* counting the blank lines at their ends. */
#define MAX_SEARCH_HISTORY 100
#define MAX_SEARCH_HISTORY 100
/* The largest size_t number that doesn't have the high bit set. */
#define HIGHEST_POSITIVE ((~(size_t)0) >> 1)
#define HIGHEST_POSITIVE ((~(size_t)0) >> 1)

View File

@ -32,10 +32,10 @@
#include <unistd.h>
#ifndef RCFILE_NAME
#define HOME_RC_NAME ".nanorc"
#define RCFILE_NAME "nanorc"
#define HOME_RC_NAME ".nanorc"
#define RCFILE_NAME "nanorc"
#else
#define HOME_RC_NAME RCFILE_NAME
#define HOME_RC_NAME RCFILE_NAME
#endif
static const rcoption rcopts[] = {

View File

@ -396,7 +396,7 @@ void go_looking(void)
linestruct *was_current = openfile->current;
size_t was_current_x = openfile->current_x;
//#define TIMEIT 12
//#define TIMEIT 12
#ifdef TIMEIT
#include <time.h>
clock_t start = clock();

View File

@ -458,8 +458,8 @@ void handle_comment_action(undostruct *u, bool undoing, bool add_comment)
#endif /* ENABLE_COMMENT */
#ifndef NANO_TINY
#define redo_paste undo_cut
#define undo_paste redo_cut
#define redo_paste undo_cut
#define undo_paste redo_cut
/* Undo a cut, or redo a paste. */
void undo_cut(undostruct *u)
@ -1461,7 +1461,7 @@ size_t quote_length(const char *line)
}
/* The maximum depth of recursion. This must be an even number. */
#define RECURSION_LIMIT 222
#define RECURSION_LIMIT 222
/* Return TRUE when the given line is the beginning of a paragraph (BOP). */
bool begpar(const linestruct *const line, int depth)

View File

@ -32,9 +32,9 @@
#endif
#ifdef REVISION
#define BRANDING REVISION
#define BRANDING REVISION
#else
#define BRANDING PACKAGE_STRING
#define BRANDING PACKAGE_STRING
#endif
static int *key_buffer = NULL;
@ -3482,8 +3482,8 @@ void spotlight_softwrapped(size_t from_col, size_t to_col)
#endif
#ifdef ENABLE_EXTRA
#define CREDIT_LEN 54
#define XLCREDIT_LEN 9
#define CREDIT_LEN 54
#define XLCREDIT_LEN 9
/* Fully blank the terminal screen, then slowly "crawl" the credits over it.
* Abort the crawl upon any keystroke. */