mg

port of mg editor (openbsd to linux)
Log | Files | Refs | README

commit d2195031ddae6ce274b68c12e8bb3b7058ae9c7d
parent 81e066932e7233ddc14c91a9f63b144989031ceb
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 24 Nov 2014 23:16:49 +0100

code-style: whitespace fixes

Diffstat:
buffer.c | 4++--
cscope.c | 2+-
dired.c | 12++++++------
echo.c | 6+++---
fileio.c | 2+-
search.c | 4++--
6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/buffer.c b/buffer.c @@ -693,7 +693,7 @@ popbuf(struct buffer *bp, int flags) struct mgwin *wp; if (bp->b_nwnd == 0) { /* Not on screen yet. */ - /* + /* * Pick a window for a pop-up. * If only one window, split the screen. * Flag the new window as ephemeral @@ -705,7 +705,7 @@ popbuf(struct buffer *bp, int flags) /* * Pick the uppermost window that isn't * the current window. An LRU algorithm - * might be better. Return a pointer, or NULL on error. + * might be better. Return a pointer, or NULL on error. */ wp = wheadp; diff --git a/cscope.c b/cscope.c @@ -623,7 +623,7 @@ csexists(const char *cmd) goto cleanup; } snprintf(fname, sizeof(fname), "%s/%s", dir, cmd); - if(access(fname, F_OK) == 0) { + if (access(fname, F_OK) == 0) { free(pathc); return (TRUE); } diff --git a/dired.c b/dired.c @@ -128,7 +128,7 @@ static PF direddl[] = { }; static PF diredbp[] = { - d_backpage /* v */ + d_backpage /* v */ }; static PF dirednull[] = { @@ -142,7 +142,7 @@ static PF dirednull[] = { static struct KEYMAPE (1 + IMAPEXT) d_backpagemap = { 1, 1 + IMAPEXT, - rescan, + rescan, { { 'v', 'v', diredbp, NULL @@ -162,7 +162,7 @@ static struct KEYMAPE (7 + NDIRED_XMAPS + IMAPEXT) diredmap = { CCHR('L'), CCHR('X'), diredcl, (KEYMAP *) & cXmap }, { - CCHR('['), CCHR('['), dirednull, (KEYMAP *) & + CCHR('['), CCHR('['), dirednull, (KEYMAP *) & d_backpagemap }, { @@ -426,7 +426,7 @@ d_copy(int f, int n) (void)xbasename(sname, frname, NFILEN); bufp = eread("Copy %s to: ", toname, sizeof(toname), EFDEF | EFNEW | EFCR, sname); - if (bufp == NULL) + if (bufp == NULL) return (ABORT); else if (bufp[0] == '\0') return (FALSE); @@ -750,13 +750,13 @@ d_warpdot(struct line *dotp, int *doto) } static int -d_forwpage(int f, int n) +d_forwpage(int f, int n) { forwpage(f | FFRAND, n); return (d_warpdot(curwp->w_dotp, &curwp->w_doto)); } -static int +static int d_backpage (int f, int n) { backpage(f | FFRAND, n); diff --git a/echo.c b/echo.c @@ -127,9 +127,9 @@ eyesno(const char *sp) free(lp); } /* allow short-hand y/n. */ - if((rep[0] == 'y' || rep[0] == 'Y') && rep[1] == '\0') + if ((rep[0] == 'y' || rep[0] == 'Y') && rep[1] == '\0') return (TRUE); - if((rep[0] == 'n' || rep[0] == 'N') && rep[1] == '\0') + if ((rep[0] == 'n' || rep[0] == 'N') && rep[1] == '\0') return (FALSE); if ((rep[0] == 'y' || rep[0] == 'Y') && (rep[1] == 'e' || rep[1] == 'E') && @@ -825,7 +825,7 @@ ewprintf(const char *fmt, ...) * Printf style formatting. This is called by both "ewprintf" and "ereply" * to provide formatting services to their clients. The move to the start * of the echo line, and the erase to the end of the echo line, is done by - * the caller. + * the caller. * %c prints the "name" of the supplied character. * %k prints the name of the current key (and takes no arguments). * %d prints a decimal integer diff --git a/fileio.c b/fileio.c @@ -683,7 +683,7 @@ bkupleavetmp(const char *fn) if (!leavetmp) return(FALSE); - if((tmpdir = getenv("TMPDIR")) != NULL && *tmpdir != '\0') { + if ((tmpdir = getenv("TMPDIR")) != NULL && *tmpdir != '\0') { tmp = strstr(fn, tmpdir); if (tmp == fn) return (TRUE); diff --git a/search.c b/search.c @@ -134,7 +134,7 @@ forwisearch(int f, int n) if (macrodef || inmacro) /* We can't isearch in macro. Use search instead */ return (forwsearch(f,n)); - else + else return (isearch(SRCH_FORW)); } @@ -149,7 +149,7 @@ backisearch(int f, int n) if (macrodef || inmacro) /* We can't isearch in macro. Use search instead */ return (backsearch(f,n)); - else + else return (isearch(SRCH_BACK)); }