diff options
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/c_ksh.c | 29 | ||||
-rw-r--r-- | bin/ksh/edit.c | 8 | ||||
-rw-r--r-- | bin/ksh/edit.h | 4 | ||||
-rw-r--r-- | bin/ksh/emacs.c | 36 | ||||
-rw-r--r-- | bin/ksh/exec.c | 6 | ||||
-rw-r--r-- | bin/ksh/jobs.c | 4 | ||||
-rw-r--r-- | bin/ksh/lex.c | 9 | ||||
-rw-r--r-- | bin/ksh/table.c | 4 | ||||
-rw-r--r-- | bin/ksh/tree.c | 4 | ||||
-rw-r--r-- | bin/ksh/vi.c | 4 |
10 files changed, 53 insertions, 55 deletions
diff --git a/bin/ksh/c_ksh.c b/bin/ksh/c_ksh.c index 0840c6b9b87..86ed3f07ab0 100644 --- a/bin/ksh/c_ksh.c +++ b/bin/ksh/c_ksh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ksh.c,v 1.21 2004/12/18 21:25:44 millert Exp $ */ +/* $OpenBSD: c_ksh.c,v 1.22 2004/12/19 04:14:20 deraadt Exp $ */ /* * built-in Korn commands: c_* @@ -540,21 +540,21 @@ c_typeset(wp) int pflag = 0; switch (**wp) { - case 'e': /* export */ - fset |= EXPORT; + case 'e': /* export */ + fset |= EXPORT; options = "p"; - break; - case 'r': /* readonly */ - fset |= RDONLY; + break; + case 'r': /* readonly */ + fset |= RDONLY; options = "p"; - break; + break; case 's': /* set */ /* called with 'typeset -' */ break; - case 't': /* typeset */ - local = 1; - break; - } + case 't': /* typeset */ + local = 1; + break; + } fieldstr = basestr = (char *) 0; builtin_opt.flags |= GF_PLUSOPT; @@ -820,7 +820,7 @@ c_typeset(wp) } return 0; } - + int c_alias(wp) char **wp; @@ -885,7 +885,6 @@ c_alias(wp) return c_unalias((char **) args); } - if (*wp == NULL) { struct tbl *ap, **p; @@ -1392,7 +1391,7 @@ const struct builtin kshbuiltins [] = { {"+cd", c_cd}, {"+command", c_command}, {"echo", c_print}, - {"*=export", c_typeset}, + {"*=export", c_typeset}, #ifdef HISTORY {"+fc", c_fc}, #endif /* HISTORY */ @@ -1402,7 +1401,7 @@ const struct builtin kshbuiltins [] = { {"let", c_let}, {"print", c_print}, {"pwd", c_pwd}, - {"*=readonly", c_typeset}, + {"*=readonly", c_typeset}, {"=typeset", c_typeset}, {"+unalias", c_unalias}, {"whence", c_whence}, diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index 7c56c6297c2..5095ec9fbcb 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.23 2004/12/18 22:12:23 millert Exp $ */ +/* $OpenBSD: edit.c,v 1.24 2004/12/19 04:14:20 deraadt Exp $ */ /* * Command line editing - common code @@ -53,7 +53,7 @@ x_init() static void x_sigwinch(sig) - int sig; + int sig; { got_sigwinch = 1; } @@ -77,7 +77,7 @@ check_sigwinch(void) if (ws.ws_col) { x_cols = ws.ws_col < MIN_COLS ? MIN_COLS : ws.ws_col; - + if ((vp = typeset("COLUMNS", 0, 0, 0, 0))) setint(vp, (long) ws.ws_col); } @@ -172,7 +172,7 @@ x_mode(onoff) if (onoff) { struct termios cb; X_chars oldchars; - + oldchars = edchars; cb = tty_state; diff --git a/bin/ksh/edit.h b/bin/ksh/edit.h index 1928a0fb97b..126e4ea17ca 100644 --- a/bin/ksh/edit.h +++ b/bin/ksh/edit.h @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.h,v 1.4 2004/12/18 20:55:52 millert Exp $ */ +/* $OpenBSD: edit.h,v 1.5 2004/12/19 04:14:20 deraadt Exp $ */ /* NAME: * edit.h - globals for edit modes @@ -7,7 +7,7 @@ * This header defines various global edit objects. * * SEE ALSO: - * + * * * RCSid: * $From: edit.h,v 1.2 1994/05/19 18:32:40 michael Exp michael $ diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index 853c467cdf8..06a99627a2d 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.30 2004/12/18 21:25:44 millert Exp $ */ +/* $OpenBSD: emacs.c,v 1.31 2004/12/19 04:14:20 deraadt Exp $ */ /* * Emacs-like command line editing and history @@ -518,7 +518,7 @@ x_delete(nc, push) { int i,j; char *cp; - + if (nc == 0) return; if (xmp != NULL && xmp > xcp) { @@ -565,7 +565,7 @@ x_delete(nc, push) for (cp = x_lastcp(); cp > xcp; ) x_bs(*--cp); - return; + return; } static int @@ -1048,7 +1048,7 @@ x_redraw(limit) { int i, j; char *cp; - + x_adj_ok = 0; if (limit == -1) x_e_putc('\n'); @@ -1476,7 +1476,7 @@ x_init_emacs() for (j = 0; j < X_TABSZ; j++) x_atab[i][j] = NULL; - /* Determine if we can translate meta key or use 8-bit AscII + /* Determine if we can translate meta key or use 8-bit AscII * XXX - It would be nice if there was a locale attribute to * determine if the locale is 7-bit or not. */ @@ -1792,8 +1792,8 @@ do_complete(flags, type) completed = 1; } - if (completed) - x_redraw(0); + if (completed) + x_redraw(0); x_free_words(nwords, words); } @@ -1839,7 +1839,7 @@ static int x_e_getc() { int c; - + if (unget_char >= 0) { c = unget_char; unget_char = -1; @@ -2001,11 +2001,11 @@ x_prev_histword(c) * ignore white-space after the last word */ while (rcp > cp && is_cfs(*rcp)) - rcp--; + rcp--; while (rcp > cp && !is_cfs(*rcp)) - rcp--; + rcp--; if (is_cfs(*rcp)) - rcp++; + rcp++; x_ins(rcp); } else { int c; @@ -2015,16 +2015,16 @@ x_prev_histword(c) * ignore white-space at start of line */ while (*rcp && is_cfs(*rcp)) - rcp++; + rcp++; while (x_arg-- > 1) { - while (*rcp && !is_cfs(*rcp)) - rcp++; - while (*rcp && is_cfs(*rcp)) - rcp++; + while (*rcp && !is_cfs(*rcp)) + rcp++; + while (*rcp && is_cfs(*rcp)) + rcp++; } cp = rcp; while (*rcp && !is_cfs(*rcp)) - rcp++; + rcp++; c = *rcp; *rcp = '\0'; x_ins(cp); @@ -2073,7 +2073,7 @@ x_fold_case(c) int c; { char *cp = xcp; - + if (cp == xep) { x_e_putc(BEL); return KSTD; diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index c23f0c8718b..c68441553ce 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.c,v 1.35 2004/12/18 22:35:41 millert Exp $ */ +/* $OpenBSD: exec.c,v 1.36 2004/12/19 04:14:20 deraadt Exp $ */ /* * execute command tree @@ -110,7 +110,7 @@ execute(t, flags) goto Break; } } - + switch(t->type) { case TCOM: rv = comexec(t, tp, ap, flags); @@ -1007,7 +1007,7 @@ search(name, path, mode, errnop) sp = p; XcheckN(xs, xp, namelen); memcpy(xp, name, namelen); - if (search_access(Xstring(xs, xp), mode, errnop) == 0) + if (search_access(Xstring(xs, xp), mode, errnop) == 0) return Xclose(xs, xp + namelen); if (*sp++ == '\0') sp = NULL; diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c index 2a077a276b7..f897945e46a 100644 --- a/bin/ksh/jobs.c +++ b/bin/ksh/jobs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jobs.c,v 1.26 2004/12/18 22:12:23 millert Exp $ */ +/* $OpenBSD: jobs.c,v 1.27 2004/12/19 04:14:20 deraadt Exp $ */ /* * Process and job control @@ -789,7 +789,7 @@ j_njobs(void) sigprocmask(SIG_BLOCK, &sm_sigchld, &omask); for (j = job_list; j; j = j->next) nj++; - + sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0); return nj; } diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c index d3ea18a6e64..9227c626382 100644 --- a/bin/ksh/lex.c +++ b/bin/ksh/lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.c,v 1.26 2004/12/18 21:25:44 millert Exp $ */ +/* $OpenBSD: lex.c,v 1.27 2004/12/19 04:14:20 deraadt Exp $ */ /* * lexical analysis and source input @@ -126,7 +126,7 @@ yylex(cf) state = SWORD; else if (cf&LETEXPR) { *wp++ = OQUOTE; /* enclose arguments in (double) quotes */ - state = SLETPAREN; + state = SLETPAREN; statep->ls_sletparen.nparen = 0; } else { /* normal lexing */ state = (cf & HEREDELIM) ? SHEREDELIM : SBASE; @@ -517,7 +517,6 @@ yylex(cf) statep->ls_scsparen.csstate = 0; state = statep->ls_state = SCSPAREN; - } } } @@ -1214,7 +1213,7 @@ dopprompt(sp, ntruncate, spp, doprint) strbuf[0] = '\007'; strbuf[1] = '\0'; break; - case 'd': /* '\' 'd' Dow Mon DD */ + case 'd': /* '\' 'd' Dow Mon DD */ time(&t); tm = localtime(&t); strftime(strbuf, sizeof strbuf, "%a %b %d", tm); @@ -1539,7 +1538,7 @@ arraysub(strp) XString ws; char *wp; char c; - int depth = 1; /* we are just past the initial [ */ + int depth = 1; /* we are just past the initial [ */ Xinit(ws, wp, 32, ATEMP); diff --git a/bin/ksh/table.c b/bin/ksh/table.c index 2da1c0a8027..615d17ccdaf 100644 --- a/bin/ksh/table.c +++ b/bin/ksh/table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table.c,v 1.7 2004/12/18 21:25:44 millert Exp $ */ +/* $OpenBSD: table.c,v 1.8 2004/12/19 04:14:20 deraadt Exp $ */ /* * dynamic hashed associative table for commands and variables @@ -109,7 +109,7 @@ tenter(tp, n, h) /* search for name in hashed table */ for (pp = &tp->tbls[h & (tp->size-1)]; (p = *pp) != NULL; pp--) { if (*p->name == *n && strcmp(p->name, n) == 0) - return p; /* found */ + return p; /* found */ if (pp == tp->tbls) /* wrap */ pp += tp->size; } diff --git a/bin/ksh/tree.c b/bin/ksh/tree.c index 2393c43157f..b8c76c69f57 100644 --- a/bin/ksh/tree.c +++ b/bin/ksh/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.13 2004/12/18 21:25:44 millert Exp $ */ +/* $OpenBSD: tree.c,v 1.14 2004/12/19 04:14:20 deraadt Exp $ */ /* * command tree climbing @@ -328,7 +328,7 @@ tputS(wp, shf) wp++; break; case OQUOTE: - quoted = 1; + quoted = 1; tputc('"', shf); break; case CQUOTE: diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c index 263ea09b7a2..9b25a2e6d68 100644 --- a/bin/ksh/vi.c +++ b/bin/ksh/vi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vi.c,v 1.15 2004/12/18 21:25:44 millert Exp $ */ +/* $OpenBSD: vi.c,v 1.16 2004/12/19 04:14:20 deraadt Exp $ */ /* * vi command editing @@ -1109,7 +1109,7 @@ vi_cmd(argcnt, cmd) return ret; } - case '=': /* at&t ksh */ + case '=': /* at&t ksh */ case Ctrl('e'): /* Nonstandard vi/ksh */ print_expansions(es, 1); break; |