=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/funmap.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- src/usr.bin/mg/funmap.c 2005/03/09 16:20:48 1.10 +++ src/usr.bin/mg/funmap.c 2005/04/03 02:09:28 1.11 @@ -1,4 +1,4 @@ -/* $OpenBSD: funmap.c,v 1.10 2005/03/09 16:20:48 jfb Exp $ */ +/* $OpenBSD: funmap.c,v 1.11 2005/04/03 02:09:28 db Exp $ */ /* * Copyright (c) 2001 Artur Grabowski . All rights reserved. * @@ -43,7 +43,7 @@ #ifndef NO_HELP {apropos_command, "apropos",}, #endif /* !NO_HELP */ - { auto_execute, "auto-execute", }, + {auto_execute, "auto-execute", }, {fillmode, "auto-fill-mode",}, {indentmode, "auto-indent-mode",}, {backchar, "backward-char",}, @@ -220,15 +220,15 @@ {poptobuffer, "switch-to-buffer-other-window",}, {togglereadonly, "toggle-read-only" }, {twiddle, "transpose-chars",}, - { undo, "undo", }, - { undo_dump, "undo-list", }, + {undo, "undo", }, + {undo_dump, "undo-list", }, {universal_argument, "universal-argument",}, {upperregion, "upcase-region",}, {upperword, "upcase-word",}, {showcpos, "what-cursor-position",}, {filewrite, "write-file",}, {yank, "yank",}, - {NULL, NULL,}, + {NULL, NULL,} }; void @@ -248,14 +248,14 @@ struct funmap *fn; if ((fn = malloc(sizeof(*fn))) == NULL) - return FALSE; + return (FALSE); fn->fn_funct = fun; fn->fn_name = fname; fn->fn_next = funs; funs = fn; - return TRUE; + return (TRUE); } /* @@ -268,9 +268,9 @@ for (fn = funs; fn != NULL; fn = fn->fn_next) { if (strcmp(fn->fn_name, fname) == 0) - return fn->fn_funct; + return (fn->fn_funct); } - return NULL; + return (NULL); } const char * @@ -280,20 +280,20 @@ for (fn = funs; fn != NULL; fn = fn->fn_next) { if (fn->fn_funct == fun) - return fn->fn_name; + return (fn->fn_name); } - return NULL; + return (NULL); } /* - * list possible function name completions. + * List possible function name completions. */ LIST * complete_function_list(const char *fname, int c) { - struct funmap *fn; - LIST *head, *el; - int len; + struct funmap *fn; + LIST *head, *el; + int len; len = strlen(fname); head = NULL; @@ -301,16 +301,12 @@ if (memcmp(fname, fn->fn_name, len) == 0) { if ((el = malloc(sizeof(*el))) == NULL) { free_file_list(head); - return NULL; + return (NULL); } el->l_name = fn->fn_name; el->l_next = head; head = el; } } - - return head; + return (head); } - - -