From 242da047a053db00bbcfd77810ca2a70e4e7dcab Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Wed, 18 Jan 2012 15:16:13 +0000 Subject: Use only C89 commenting style in .h file, in case of C89 compilers or similar that want to link --- termkey.h.in | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/termkey.h.in b/termkey.h.in index d29893d..4c7270f 100644 --- a/termkey.h.in +++ b/termkey.h.in @@ -18,17 +18,17 @@ typedef enum { TERMKEY_SYM_UNKNOWN = -1, TERMKEY_SYM_NONE = 0, - // Special names in C0 + /* Special names in C0 */ TERMKEY_SYM_BACKSPACE, TERMKEY_SYM_TAB, TERMKEY_SYM_ENTER, TERMKEY_SYM_ESCAPE, - // Special names in G0 + /* Special names in G0 */ TERMKEY_SYM_SPACE, TERMKEY_SYM_DEL, - // Special keys + /* Special keys */ TERMKEY_SYM_UP, TERMKEY_SYM_DOWN, TERMKEY_SYM_LEFT, @@ -43,7 +43,7 @@ typedef enum { TERMKEY_SYM_HOME, TERMKEY_SYM_END, - // Special keys from terminfo + /* Special keys from terminfo */ TERMKEY_SYM_CANCEL, TERMKEY_SYM_CLEAR, TERMKEY_SYM_CLOSE, @@ -67,7 +67,7 @@ typedef enum { TERMKEY_SYM_SUSPEND, TERMKEY_SYM_UNDO, - // Numeric keypad special keys + /* Numeric keypad special keys */ TERMKEY_SYM_KP0, TERMKEY_SYM_KP1, TERMKEY_SYM_KP2, @@ -87,7 +87,7 @@ typedef enum { TERMKEY_SYM_KPPERIOD, TERMKEY_SYM_KPEQUALS, - // et cetera ad nauseum + /* et cetera ad nauseum */ TERMKEY_N_SYMS } TermKeySym; @@ -122,11 +122,11 @@ enum { typedef struct { TermKeyType type; union { - long codepoint; // TERMKEY_TYPE_UNICODE - int number; // TERMKEY_TYPE_FUNCTION - TermKeySym sym; // TERMKEY_TYPE_KEYSYM - char mouse[4]; // TERMKEY_TYPE_MOUSE - // opaque. see termkey_interpret_mouse + long codepoint; /* TERMKEY_TYPE_UNICODE */ + int number; /* TERMKEY_TYPE_FUNCTION */ + TermKeySym sym; /* TERMKEY_TYPE_KEYSYM */ + char mouse[4]; /* TERMKEY_TYPE_MOUSE */ + /* opaque. see termkey_interpret_mouse */ } code; int modifiers; @@ -139,19 +139,19 @@ typedef struct { typedef struct _TermKey TermKey; enum { - TERMKEY_FLAG_NOINTERPRET = 1 << 0, // Do not interpret C0//DEL codes if possible - TERMKEY_FLAG_CONVERTKP = 1 << 1, // Convert KP codes to regular keypresses - TERMKEY_FLAG_RAW = 1 << 2, // Input is raw bytes, not UTF-8 - TERMKEY_FLAG_UTF8 = 1 << 3, // Input is definitely UTF-8 - TERMKEY_FLAG_NOTERMIOS = 1 << 4, // Do not make initial termios calls on construction - TERMKEY_FLAG_SPACESYMBOL = 1 << 5, // Sets TERMKEY_CANON_SPACESYMBOL - TERMKEY_FLAG_CTRLC = 1 << 6, // Allow Ctrl-C to be read as normal, disabling SIGINT - TERMKEY_FLAG_EINTR = 1 << 7 // Return ERROR on signal (EINTR) rather than retry + TERMKEY_FLAG_NOINTERPRET = 1 << 0, /* Do not interpret C0//DEL codes if possible */ + TERMKEY_FLAG_CONVERTKP = 1 << 1, /* Convert KP codes to regular keypresses */ + TERMKEY_FLAG_RAW = 1 << 2, /* Input is raw bytes, not UTF-8 */ + TERMKEY_FLAG_UTF8 = 1 << 3, /* Input is definitely UTF-8 */ + TERMKEY_FLAG_NOTERMIOS = 1 << 4, /* Do not make initial termios calls on construction */ + TERMKEY_FLAG_SPACESYMBOL = 1 << 5, /* Sets TERMKEY_CANON_SPACESYMBOL */ + TERMKEY_FLAG_CTRLC = 1 << 6, /* Allow Ctrl-C to be read as normal, disabling SIGINT */ + TERMKEY_FLAG_EINTR = 1 << 7 /* Return ERROR on signal (EINTR) rather than retry */ }; enum { - TERMKEY_CANON_SPACESYMBOL = 1 << 0, // Space is symbolic rather than Unicode - TERMKEY_CANON_DELBS = 1 << 1, // Del is converted to Backspace + TERMKEY_CANON_SPACESYMBOL = 1 << 0, /* Space is symbolic rather than Unicode */ + TERMKEY_CANON_DELBS = 1 << 1, /* Del is converted to Backspace */ }; void termkey_check_version(int major, int minor); @@ -192,15 +192,15 @@ TermKeySym termkey_keyname2sym(TermKey *tk, const char *keyname); TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKeyMouseEvent *event, int *button, int *line, int *col); typedef enum { - TERMKEY_FORMAT_LONGMOD = 1 << 0, // Shift-... instead of S-... - TERMKEY_FORMAT_CARETCTRL = 1 << 1, // ^X instead of C-X - TERMKEY_FORMAT_ALTISMETA = 1 << 2, // Meta- or M- instead of Alt- or A- - TERMKEY_FORMAT_WRAPBRACKET = 1 << 3, // Wrap special keys in brackets like + TERMKEY_FORMAT_LONGMOD = 1 << 0, /* Shift-... instead of S-... */ + TERMKEY_FORMAT_CARETCTRL = 1 << 1, /* ^X instead of C-X */ + TERMKEY_FORMAT_ALTISMETA = 1 << 2, /* Meta- or M- instead of Alt- or A- */ + TERMKEY_FORMAT_WRAPBRACKET = 1 << 3, /* Wrap special keys in brackets like */ - TERMKEY_FORMAT_MOUSE_POS = 1 << 8 // Include mouse position if relevant; @ col,line + TERMKEY_FORMAT_MOUSE_POS = 1 << 8 /* Include mouse position if relevant; @ col,line */ } TermKeyFormat; -// Some useful combinations +/* Some useful combinations */ #define TERMKEY_FORMAT_VIM (TERMKEY_FORMAT_ALTISMETA|TERMKEY_FORMAT_WRAPBRACKET) -- cgit v1.2.3-70-g09d2