diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2015-09-26 21:51:59 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2015-09-26 21:51:59 +0000 |
commit | 7c2a190511f8aa92075125450b736ad7785eec24 (patch) | |
tree | b18fe1f74c56852c98e8d4739b990a0754ad0bb2 /usr.bin/mg | |
parent | 157e54f66538f249c3a8783a9e3421dec123522e (diff) |
whitespace
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/autoexec.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/basic.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/buffer.c | 6 | ||||
-rw-r--r-- | usr.bin/mg/cmode.c | 14 | ||||
-rw-r--r-- | usr.bin/mg/cscope.c | 53 | ||||
-rw-r--r-- | usr.bin/mg/dired.c | 14 | ||||
-rw-r--r-- | usr.bin/mg/kbd.c | 6 | ||||
-rw-r--r-- | usr.bin/mg/keymap.c | 4 |
8 files changed, 52 insertions, 53 deletions
diff --git a/usr.bin/mg/autoexec.c b/usr.bin/mg/autoexec.c index 43d52182d44..d4447e439c1 100644 --- a/usr.bin/mg/autoexec.c +++ b/usr.bin/mg/autoexec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoexec.c,v 1.16 2015/03/19 21:22:15 bcallah Exp $ */ +/* $OpenBSD: autoexec.c,v 1.17 2015/09/26 21:51:58 jasper Exp $ */ /* this file is in the public domain */ /* Author: Vincent Labrecque <vincent@openbsd.org> April 2002 */ @@ -91,7 +91,7 @@ add_autoexec(const char *pattern, const char *func) * Register an auto-execute hook; that is, specify a filename pattern * (conforming to the shell's filename globbing rules) and an associated * function to execute when a file matching the specified pattern - * is read into a buffer. + * is read into a buffer. */ /* ARGSUSED */ int diff --git a/usr.bin/mg/basic.c b/usr.bin/mg/basic.c index f8a93e13df0..56cc517d3ef 100644 --- a/usr.bin/mg/basic.c +++ b/usr.bin/mg/basic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: basic.c,v 1.45 2015/03/24 22:34:39 florian Exp $ */ +/* $OpenBSD: basic.c,v 1.46 2015/09/26 21:51:58 jasper Exp $ */ /* This file is in the public domain */ @@ -133,7 +133,7 @@ int gotoeob(int f, int n) { struct line *lp; - + (void) setmark(f, n); curwp->w_dotp = blastlp(curbp); curwp->w_doto = llength(curwp->w_dotp); diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c index f7a1d4fa57c..195b14b631e 100644 --- a/usr.bin/mg/buffer.c +++ b/usr.bin/mg/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.98 2015/03/23 12:31:19 bcallah Exp $ */ +/* $OpenBSD: buffer.c,v 1.99 2015/09/26 21:51:58 jasper Exp $ */ /* This file is in the public domain. */ @@ -698,7 +698,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 @@ -710,7 +710,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/usr.bin/mg/cmode.c b/usr.bin/mg/cmode.c index db69d7f3018..a2382854679 100644 --- a/usr.bin/mg/cmode.c +++ b/usr.bin/mg/cmode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmode.c,v 1.15 2015/03/19 21:48:05 bcallah Exp $ */ +/* $OpenBSD: cmode.c,v 1.16 2015/09/26 21:51:58 jasper Exp $ */ /* * This file is in the public domain. * @@ -145,7 +145,7 @@ int cc_tab(int f, int n) { int inwhitep = FALSE; /* In leading whitespace? */ - + inwhitep = in_whitespace(curwp->w_dotp, llength(curwp->w_dotp)); /* If empty line, or in whitespace */ @@ -165,7 +165,7 @@ cc_indent(int f, int n) int ci; /* current indent */ struct line *lp; int ret; - + if (n < 0) return (FALSE); @@ -186,14 +186,14 @@ cc_indent(int f, int n) delleadwhite(FFRAND, 1); /* current indent is computed only to current position */ (void)getindent(curwp->w_dotp, &ci); - + if (pi + ci < 0) ret = indent(FFOTHARG, 0); else ret = indent(FFOTHARG, pi + ci); - + undo_boundary_enable(FFRAND, 1); - + return (ret); } @@ -236,7 +236,7 @@ getindent(const struct line *lp, int *curi) int astp = FALSE; /* Asterisk? */ int cpos = -1; /* comment position */ int cppp = FALSE; /* Preprocessor command? */ - + *curi = 0; /* Compute leading space */ diff --git a/usr.bin/mg/cscope.c b/usr.bin/mg/cscope.c index 5446860785f..6b1db8d81eb 100644 --- a/usr.bin/mg/cscope.c +++ b/usr.bin/mg/cscope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cscope.c,v 1.9 2015/03/19 21:22:15 bcallah Exp $ */ +/* $OpenBSD: cscope.c,v 1.10 2015/09/26 21:51:58 jasper Exp $ */ /* * This file is in the public domain. @@ -168,18 +168,18 @@ cscreatelist(int f, int n) char dir[NFILEN], cmd[BUFSIZ], title[BUFSIZ], *line, *bufp; size_t len; int clen; - + if (getbufcwd(dir, sizeof(dir)) == FALSE) dir[0] = '\0'; - - bufp = eread("Index files in directory: ", dir, + + bufp = eread("Index files in directory: ", dir, sizeof(dir), EFCR | EFDEF | EFNEW | EFNUL); - + if (bufp == NULL) return (ABORT); else if (bufp[0] == '\0') return (FALSE); - + if (stat(dir, &sb) == -1) { dobeep(); ewprintf("stat: %s", strerror(errno)); @@ -189,13 +189,13 @@ cscreatelist(int f, int n) ewprintf("%s: Not a directory", dir); return (FALSE); } - + if (csexists("cscope-indexer") == FALSE) { dobeep(); ewprintf("no such file or directory, cscope-indexer"); return (FALSE); } - + clen = snprintf(cmd, sizeof(cmd), "cscope-indexer -v %s", dir); if (clen < 0 || clen >= sizeof(cmd)) return (FALSE); @@ -205,7 +205,7 @@ cscreatelist(int f, int n) ewprintf("problem opening pipe"); return (FALSE); } - + bp = bfind("*cscope*", TRUE); if (bclear(bp) != TRUE) { pclose(fpipe); @@ -227,7 +227,7 @@ cscreatelist(int f, int n) addline(bp, line); } pclose(fpipe); - return (popbuftop(bp, WNONE)); + return (popbuftop(bp, WNONE)); } /* @@ -239,7 +239,7 @@ csnextmatch(int f, int n) { struct csrecord *r; struct csmatch *m; - + if (curmatch == NULL) { if ((r = TAILQ_FIRST(&csrecords)) == NULL) { dobeep(); @@ -307,7 +307,7 @@ int csnextfile(int f, int n) { struct csrecord *r; - + if (curmatch == NULL) { if ((r = TAILQ_FIRST(&csrecords)) == NULL) { dobeep(); @@ -324,7 +324,7 @@ csnextfile(int f, int n) } currecord = r; curmatch = TAILQ_FIRST(&currecord->matches); - return (jumptomatch()); + return (jumptomatch()); } /* @@ -334,7 +334,7 @@ int csprevfile(int f, int n) { struct csrecord *r; - + if (curmatch == NULL) { if ((r = TAILQ_FIRST(&csrecords)) == NULL) { dobeep(); @@ -352,12 +352,12 @@ csprevfile(int f, int n) } currecord = r; curmatch = TAILQ_FIRST(&currecord->matches); - return (jumptomatch()); + return (jumptomatch()); } /* - * The current symbol location is extracted from currecord->filename and - * curmatch->lineno. Load the file similar to filevisit and goto the + * The current symbol location is extracted from currecord->filename and + * curmatch->lineno. Load the file similar to filevisit and goto the * lineno recorded. */ int @@ -365,7 +365,7 @@ jumptomatch(void) { struct buffer *bp; char *adjf; - + if (curmatch == NULL || currecord == NULL) return (FALSE); adjf = adjustname(currecord->filename, TRUE); @@ -382,12 +382,11 @@ jumptomatch(void) } gotoline(FFARG, curmatch->lineno); return (TRUE); - } /* * Ask for the symbol, construct cscope commandline with the symbol - * and passed in index. Popen cscope, read the output into *cscope* + * and passed in index. Popen cscope, read the output into *cscope* * buffer and pop it. */ int @@ -406,9 +405,9 @@ do_cscope(int i) ewprintf("C-c s not defined"); return (FALSE); } - + if (curtoken(0, 1, pattern) == FALSE) - return (FALSE); + return (FALSE); p = eread(csprompt[i], pattern, MAX_TOKEN, EFNEW | EFCR | EFDEF); if (p == NULL) return (ABORT); @@ -420,7 +419,7 @@ do_cscope(int i) ewprintf("no such file or directory, cscope"); return (FALSE); } - + csflush(); clen = snprintf(cmd, sizeof(cmd), "cscope -L -%d %s 2>/dev/null", i, pattern); @@ -432,7 +431,7 @@ do_cscope(int i) ewprintf("problem opening pipe"); return (FALSE); } - + bp = bfind("*cscope*", TRUE); if (bclear(bp) != TRUE) { pclose(fpipe); @@ -454,7 +453,7 @@ do_cscope(int i) if (addentry(bp, buf) != TRUE) return (FALSE); nores = 1; - }; + }; pclose(fpipe); addline(bp, "-------------------------------------------------------------------------------"); if (nores == 0) @@ -483,7 +482,7 @@ addentry(struct buffer *bp, char *csline) lineno = strtonum(t.lineno, INT_MIN, INT_MAX, &errstr); if (errstr) return (FALSE); - + if (addentryfn == NULL || strcmp(addentryfn, t.fname) != 0) { if ((r = malloc(sizeof(struct csrecord))) == NULL) return (FALSE); @@ -570,7 +569,7 @@ csflush(void) { struct csrecord *r; struct csmatch *m; - + while ((r = TAILQ_FIRST(&csrecords)) != NULL) { free(r->filename); while ((m = TAILQ_FIRST(&r->matches)) != NULL) { diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c index 299658f5b31..e6854ca9359 100644 --- a/usr.bin/mg/dired.c +++ b/usr.bin/mg/dired.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dired.c,v 1.75 2015/09/24 18:20:52 lum Exp $ */ +/* $OpenBSD: dired.c,v 1.76 2015/09/26 21:51:58 jasper Exp $ */ /* This file is in the public domain. */ @@ -132,7 +132,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) d_backpagemap = { 1, 1, - rescan, + rescan, { { 'v', 'v', diredbp, NULL @@ -162,7 +162,7 @@ static struct KEYMAPE (7) diredmap = { CCHR('L'), CCHR('X'), diredcl, (KEYMAP *) & cXmap }, { - CCHR('['), CCHR('['), dirednull, (KEYMAP *) & + CCHR('['), CCHR('['), dirednull, (KEYMAP *) & d_backpagemap }, { @@ -441,7 +441,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); @@ -765,13 +765,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/usr.bin/mg/kbd.c b/usr.bin/mg/kbd.c index 71ae6303de2..1d7a1a2a39c 100644 --- a/usr.bin/mg/kbd.c +++ b/usr.bin/mg/kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.c,v 1.29 2015/03/25 20:53:31 bcallah Exp $ */ +/* $OpenBSD: kbd.c,v 1.30 2015/09/26 21:51:58 jasper Exp $ */ /* This file is in the public domain. */ @@ -414,7 +414,7 @@ static int mgwrap(PF funct, int f, int n) { static PF ofp; - + if (funct != rescan && funct != negative_argument && funct != digit_argument && @@ -425,6 +425,6 @@ mgwrap(PF funct, int f, int n) rptcount = 0; ofp = funct; } - + return ((*funct)(f, n)); } diff --git a/usr.bin/mg/keymap.c b/usr.bin/mg/keymap.c index efdb1b2e996..82a35dba117 100644 --- a/usr.bin/mg/keymap.c +++ b/usr.bin/mg/keymap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keymap.c,v 1.56 2015/09/24 07:07:59 lum Exp $ */ +/* $OpenBSD: keymap.c,v 1.57 2015/09/26 21:51:58 jasper Exp $ */ /* This file is in the public domain. */ @@ -61,7 +61,7 @@ static PF cCsc[] = { rescan, /* o */ csprevmatch, /* p */ rescan, /* q */ - rescan, /* r */ + rescan, /* r */ cssymbol, /* s */ csfindtext /* t */ }; |