diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
commit | f05428e4cd63dde97bac14b84dd146a5c00455e3 (patch) | |
tree | e1331adb5d216f2b3fa6baa6491752348d2e5f10 /lib/libedit/map.c | |
parent | 6de57e42c294763c78d77b0a9a7c5a08008a378a (diff) | |
download | FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.zip FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'lib/libedit/map.c')
-rw-r--r-- | lib/libedit/map.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/libedit/map.c b/lib/libedit/map.c index 3378217..5f91c75 100644 --- a/lib/libedit/map.c +++ b/lib/libedit/map.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; #endif /* not lint && not SCCSID */ /* - * map.c: Editor function definitions + * map.c: Editor function definitions */ #include "sys.h" #include <stdlib.h> @@ -660,8 +660,8 @@ private el_action_t el_map_vi_command[] = { /* 41 */ ED_UNASSIGNED, /* ) */ /* 42 */ ED_UNASSIGNED, /* * */ /* 43 */ ED_NEXT_HISTORY, /* + */ - /* 44 */ VI_REPEAT_PREV_CHAR, /* , */ - /* 45 */ ED_PREV_HISTORY, /* - */ + /* 44 */ VI_REPEAT_PREV_CHAR, /* , */ + /* 45 */ ED_PREV_HISTORY, /* - */ /* 46 */ ED_UNASSIGNED, /* . */ /* 47 */ VI_SEARCH_PREV, /* / */ /* 48 */ VI_ZERO, /* 0 */ @@ -882,7 +882,7 @@ protected int map_init(el) EditLine *el; { - + /* * Make sure those are correct before starting. */ @@ -902,7 +902,7 @@ map_init(el) el->el_map.vii = el_map_vi_insert; el->el_map.help = (el_bindings_t *) el_malloc(sizeof(el_bindings_t) * EL_NUM_FCNS); - (void) memcpy(el->el_map.help, help__get(), + (void) memcpy(el->el_map.help, help__get(), sizeof(el_bindings_t) * EL_NUM_FCNS); el->el_map.func = (el_func_t *) el_malloc(sizeof(el_func_t) * EL_NUM_FCNS); memcpy(el->el_map.func, func__get(), sizeof(el_func_t) * EL_NUM_FCNS); @@ -948,8 +948,8 @@ map_init_nls(el) int i; el_action_t *map = el->el_map.key; - for (i = 0200; i <= 0377; i++) - if (isprint(i)) + for (i = 0200; i <= 0377; i++) + if (isprint(i)) map[i] = ED_INSERT; } @@ -977,12 +977,12 @@ map_init_meta(el) if (el->el_map.type == MAP_VI) map = alt; } - else + else map = alt; } buf[0] = (char) i; buf[2] = 0; - for (i = 0200; i <= 0377; i++) + for (i = 0200; i <= 0377; i++) switch (map[i]) { case ED_INSERT: case ED_UNASSIGNED: @@ -1064,14 +1064,14 @@ map_init_emacs(el) buf[2] = 0; buf[1] = CONTROL('X'); key_add(el, buf, key_map_cmd(el, EM_EXCHANGE_MARK), XK_CMD); - + tty_bind_char(el, 1); term_bind_arrow(el); } /* map_set_editor(): - * Set the editor + * Set the editor */ protected int map_set_editor(el, editor) @@ -1106,12 +1106,12 @@ map_print_key(el, map, in) (void) key__decode_str(in, outbuf, ""); for (bp = el->el_map.help; bp->name != NULL; bp++) if (bp->func == map[(unsigned char) *in]) { - (void) fprintf(el->el_outfile, + (void) fprintf(el->el_outfile, "%s\t->\t%s\n", outbuf, bp->name); return; } } - else + else key_print(el, in); } @@ -1144,13 +1144,13 @@ map_print_some_keys(el, map, first, last) if (bp->func == map[first]) { if (first == last) { (void) fprintf(el->el_outfile, "%-15s-> %s\n", - key__decode_str(firstbuf, unparsbuf, STRQQ), + key__decode_str(firstbuf, unparsbuf, STRQQ), bp->name); } else { (void) fprintf(el->el_outfile, "%-4s to %-7s-> %s\n", key__decode_str(firstbuf, unparsbuf, STRQQ), - key__decode_str(lastbuf, extrabuf, STRQQ), + key__decode_str(lastbuf, extrabuf, STRQQ), bp->name); } return; @@ -1160,13 +1160,13 @@ map_print_some_keys(el, map, first, last) if (map == el->el_map.key) { (void) fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n", key__decode_str(firstbuf, unparsbuf, STRQQ)); - (void) fprintf(el->el_outfile, "el->el_map.key[%d] == %d\n", + (void) fprintf(el->el_outfile, "el->el_map.key[%d] == %d\n", first, el->el_map.key[first]); } else { (void) fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n", key__decode_str(firstbuf, unparsbuf, STRQQ)); - (void) fprintf(el->el_outfile, "el->el_map.alt[%d] == %d\n", + (void) fprintf(el->el_outfile, "el->el_map.alt[%d] == %d\n", first, el->el_map.alt[first]); } #endif @@ -1268,8 +1268,8 @@ map_bind(el, argc, argv) return 0; case 'l': - for (bp = el->el_map.help; bp->name != NULL; bp++) - (void) fprintf(el->el_outfile, "%s\n\t%s\n", + for (bp = el->el_map.help; bp->name != NULL; bp++) + (void) fprintf(el->el_outfile, "%s\n\t%s\n", bp->name, bp->description); return 0; default: @@ -1298,11 +1298,11 @@ map_bind(el, argc, argv) (void) term_clear_arrow(el, in); return -1; } - if (in[1]) + if (in[1]) (void) key_delete(el, in); - else if (map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN) + else if (map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN) (void) key_delete(el, in); - else + else map[(unsigned char) *in] = ED_UNASSIGNED; return 0; } @@ -1326,7 +1326,7 @@ map_bind(el, argc, argv) case XK_STR: case XK_EXE: if ((out = parse__string(outbuf, argv[argc])) == NULL) { - (void) fprintf(el->el_errfile, + (void) fprintf(el->el_errfile, "%s: Invalid \\ or ^ in outstring.\n", argv[0]); return -1; } @@ -1339,7 +1339,7 @@ map_bind(el, argc, argv) case XK_CMD: if ((cmd = parse_cmd(el, argv[argc])) == -1) { - (void) fprintf(el->el_errfile, + (void) fprintf(el->el_errfile, "%s: Invalid command `%s'.\n", argv[0], argv[argc]); return -1; } @@ -1379,7 +1379,7 @@ map_addfunc(el, name, help, func) if (name == NULL || help == NULL || func == NULL) return -1; - el->el_map.func = (el_func_t *) + el->el_map.func = (el_func_t *) el_realloc(el->el_map.func, nf * sizeof(el_func_t)); el->el_map.help = (el_bindings_t *) el_realloc(el->el_map.help, nf * sizeof(el_bindings_t)); |