diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2016-05-02 18:24:26 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2016-05-02 18:24:26 +0000 |
commit | 5ac1513f7000459d906395b3a9157798b5031fb6 (patch) | |
tree | f80d2e87ccbe977f5f1127062f4d0aca63f795fd /usr.bin/vi/ex | |
parent | 24ae9ab57aeb722a2c97a31ec7cb5a2f788d09e0 (diff) |
Remove CHAR_T in favor of native types.
schwarze@ agrees with the direction.
Few tweaks and OK tb@
Diffstat (limited to 'usr.bin/vi/ex')
-rw-r--r-- | usr.bin/vi/ex/ex.h | 6 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_abbrev.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_append.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_argv.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_at.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_cd.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_display.c | 8 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_file.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_global.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_map.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_print.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_read.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_script.c | 6 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_subst.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_txt.c | 10 |
15 files changed, 37 insertions, 37 deletions
diff --git a/usr.bin/vi/ex/ex.h b/usr.bin/vi/ex/ex.h index ae0ca33f208..e64cf3ff322 100644 --- a/usr.bin/vi/ex/ex.h +++ b/usr.bin/vi/ex/ex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ex.h,v 1.9 2015/11/19 07:53:31 bentley Exp $ */ +/* $OpenBSD: ex.h,v 1.10 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -110,7 +110,7 @@ struct _excmd { F_SET((cmdp), L__f); \ } - CHAR_T buffer; /* Command: named buffer. */ + char buffer; /* Command: named buffer. */ recno_t lineno; /* Command: line number. */ long count; /* Command: signed count. */ long flagoff; /* Command: signed flag offset. */ @@ -163,7 +163,7 @@ typedef struct _ex_private { TAILQ_HEAD(_tagfh, _tagf) tagfq;/* Tag file list. */ char *tag_last; /* Saved last tag string. */ - CHAR_T *lastbcomm; /* Last bang command. */ + char *lastbcomm; /* Last bang command. */ ARGS **args; /* Command: argument list. */ int argscnt; /* Command: argument list count. */ diff --git a/usr.bin/vi/ex/ex_abbrev.c b/usr.bin/vi/ex/ex_abbrev.c index 93433c46ff6..d4d09058ada 100644 --- a/usr.bin/vi/ex/ex_abbrev.c +++ b/usr.bin/vi/ex/ex_abbrev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_abbrev.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_abbrev.c,v 1.8 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -34,7 +34,7 @@ int ex_abbr(SCR *sp, EXCMD *cmdp) { - CHAR_T *p; + char *p; size_t len; switch (cmdp->argc) { diff --git a/usr.bin/vi/ex/ex_append.c b/usr.bin/vi/ex/ex_append.c index 20431d460c8..89fc88f1f1d 100644 --- a/usr.bin/vi/ex/ex_append.c +++ b/usr.bin/vi/ex/ex_append.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_append.c,v 1.12 2016/01/06 22:29:38 millert Exp $ */ +/* $OpenBSD: ex_append.c,v 1.13 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -71,7 +71,7 @@ ex_insert(SCR *sp, EXCMD *cmdp) static int ex_aci(SCR *sp, EXCMD *cmdp, enum which cmd) { - CHAR_T *p, *t; + char *p, *t; GS *gp; TEXT *tp; TEXTH tiq; diff --git a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c index d620bf43013..1b369a5a5db 100644 --- a/usr.bin/vi/ex/ex_argv.c +++ b/usr.bin/vi/ex/ex_argv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_argv.c,v 1.18 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_argv.c,v 1.19 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -425,7 +425,7 @@ argv_alloc(SCR *sp, size_t len) ap->len = 0; if (ap->blen < len + 1) { ap->blen = len + 1; - REALLOCARRAY(sp, ap->bp, ap->blen, sizeof(CHAR_T)); + REALLOC(sp, ap->bp, ap->blen); if (ap->bp == NULL) { ap->bp = NULL; ap->blen = 0; diff --git a/usr.bin/vi/ex/ex_at.c b/usr.bin/vi/ex/ex_at.c index dca3fe6e16b..6508744ed36 100644 --- a/usr.bin/vi/ex/ex_at.c +++ b/usr.bin/vi/ex/ex_at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_at.c,v 1.12 2015/12/07 20:39:19 mmcc Exp $ */ +/* $OpenBSD: ex_at.c,v 1.13 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -35,7 +35,7 @@ int ex_at(SCR *sp, EXCMD *cmdp) { CB *cbp; - CHAR_T name; + char name; EXCMD *ecp; RANGE *rp; TEXT *tp; diff --git a/usr.bin/vi/ex/ex_cd.c b/usr.bin/vi/ex/ex_cd.c index aeb778b065e..6006618377f 100644 --- a/usr.bin/vi/ex/ex_cd.c +++ b/usr.bin/vi/ex/ex_cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_cd.c,v 1.12 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_cd.c,v 1.13 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -35,7 +35,7 @@ ex_cd(SCR *sp, EXCMD *cmdp) { struct passwd *pw; ARGS *ap; - CHAR_T savech; + char savech; char *dir, *p, *t; /* XXX: END OF THE STACK, DON'T TRUST GETCWD. */ char buf[PATH_MAX * 2]; diff --git a/usr.bin/vi/ex/ex_display.c b/usr.bin/vi/ex/ex_display.c index d832a306e59..33698a62f0e 100644 --- a/usr.bin/vi/ex/ex_display.c +++ b/usr.bin/vi/ex/ex_display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_display.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_display.c,v 1.12 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -24,7 +24,7 @@ #include "tag.h" static int bdisplay(SCR *); -static void db(SCR *, CB *, CHAR_T *); +static void db(SCR *, CB *, char *); /* * ex_display -- :display b[uffers] | s[creens] | t[ags] @@ -107,9 +107,9 @@ bdisplay(SCR *sp) * Display a buffer. */ static void -db(SCR *sp, CB *cbp, CHAR_T *name) +db(SCR *sp, CB *cbp, char *name) { - CHAR_T *p; + char *p; TEXT *tp; size_t len; diff --git a/usr.bin/vi/ex/ex_file.c b/usr.bin/vi/ex/ex_file.c index 0cc25fa88ec..3d3fc66bfbf 100644 --- a/usr.bin/vi/ex/ex_file.c +++ b/usr.bin/vi/ex/ex_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_file.c,v 1.7 2014/11/12 04:28:41 bentley Exp $ */ +/* $OpenBSD: ex_file.c,v 1.8 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -32,7 +32,7 @@ int ex_file(SCR *sp, EXCMD *cmdp) { - CHAR_T *p; + char *p; FREF *frp; NEEDFILE(sp, cmdp); diff --git a/usr.bin/vi/ex/ex_global.c b/usr.bin/vi/ex/ex_global.c index 92966ed1d7b..1cbb61e1270 100644 --- a/usr.bin/vi/ex/ex_global.c +++ b/usr.bin/vi/ex/ex_global.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_global.c,v 1.15 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_global.c,v 1.16 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -61,7 +61,7 @@ ex_v(SCR *sp, EXCMD *cmdp) static int ex_g_setup(SCR *sp, EXCMD *cmdp, enum which cmd) { - CHAR_T *ptrn, *p, *t; + char *ptrn, *p, *t; EXCMD *ecp; MARK abs_mark; RANGE *rp; diff --git a/usr.bin/vi/ex/ex_map.c b/usr.bin/vi/ex/ex_map.c index 0030d6fc7d0..f92351bedbf 100644 --- a/usr.bin/vi/ex/ex_map.c +++ b/usr.bin/vi/ex/ex_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_map.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_map.c,v 1.8 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -43,7 +43,7 @@ int ex_map(SCR *sp, EXCMD *cmdp) { seq_t stype; - CHAR_T *input, *p; + char *input, *p; stype = FL_ISSET(cmdp->iflags, E_C_FORCE) ? SEQ_INPUT : SEQ_COMMAND; diff --git a/usr.bin/vi/ex/ex_print.c b/usr.bin/vi/ex/ex_print.c index 346ccab8076..76090eea6a1 100644 --- a/usr.bin/vi/ex/ex_print.c +++ b/usr.bin/vi/ex/ex_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_print.c,v 1.11 2016/01/06 22:29:38 millert Exp $ */ +/* $OpenBSD: ex_print.c,v 1.12 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -196,7 +196,7 @@ static int ex_prchars(SCR *sp, const char *p, size_t *colp, size_t len, u_int flags, int repeatc) { - CHAR_T ch, *kp; + char ch, *kp; size_t col, tlen, ts; if (O_ISSET(sp, O_LIST)) diff --git a/usr.bin/vi/ex/ex_read.c b/usr.bin/vi/ex/ex_read.c index b61a56b300d..2ec79faf9af 100644 --- a/usr.bin/vi/ex/ex_read.c +++ b/usr.bin/vi/ex/ex_read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_read.c,v 1.11 2016/01/06 22:28:52 millert Exp $ */ +/* $OpenBSD: ex_read.c,v 1.12 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -42,7 +42,7 @@ ex_read(SCR *sp, EXCMD *cmdp) { enum { R_ARG, R_EXPANDARG, R_FILTER } which; struct stat sb; - CHAR_T *arg, *name; + char *arg, *name; EX_PRIVATE *exp; FILE *fp; FREF *frp; diff --git a/usr.bin/vi/ex/ex_script.c b/usr.bin/vi/ex/ex_script.c index 384eb50a7c5..db98baef699 100644 --- a/usr.bin/vi/ex/ex_script.c +++ b/usr.bin/vi/ex/ex_script.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_script.c,v 1.24 2016/04/19 17:42:09 martijn Exp $ */ +/* $OpenBSD: ex_script.c,v 1.25 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -185,7 +185,7 @@ err: if (sc->sh_master != -1) static int sscr_getprompt(SCR *sp) { - CHAR_T *endp, *p, *t, buf[1024]; + char *endp, *p, *t, buf[1024]; SCRIPT *sc; struct pollfd pfd[1]; recno_t lline; @@ -481,7 +481,7 @@ done: static int sscr_insert(SCR *sp) { - CHAR_T *endp, *p, *t; + char *endp, *p, *t; SCRIPT *sc; struct pollfd pfd[1]; recno_t lno; diff --git a/usr.bin/vi/ex/ex_subst.c b/usr.bin/vi/ex/ex_subst.c index 0467a0c8e8a..8cd2c8a3f1c 100644 --- a/usr.bin/vi/ex/ex_subst.c +++ b/usr.bin/vi/ex/ex_subst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_subst.c,v 1.26 2016/01/06 22:29:38 millert Exp $ */ +/* $OpenBSD: ex_subst.c,v 1.27 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -1245,7 +1245,7 @@ re_sub(SCR *sp, char *ip, char **lbp, size_t *lbclenp, size_t *lblenp, * all escaping characters. This (hopefully) matches historic practice. */ #define OUTCH(ch, nltrans) { \ - CHAR_T __ch = (ch); \ + char __ch = (ch); \ u_int __value = KEY_VAL(sp, __ch); \ if ((nltrans) && (__value == K_CR || __value == K_NL)) { \ NEEDNEWLINE(sp); \ diff --git a/usr.bin/vi/ex/ex_txt.c b/usr.bin/vi/ex/ex_txt.c index a1fef3a802b..548fd8d9184 100644 --- a/usr.bin/vi/ex/ex_txt.c +++ b/usr.bin/vi/ex/ex_txt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_txt.c,v 1.14 2016/01/20 08:43:27 bentley Exp $ */ +/* $OpenBSD: ex_txt.c,v 1.15 2016/05/02 18:24:25 martijn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -42,16 +42,16 @@ */ static int txt_dent(SCR *, TEXT *); -static void txt_prompt(SCR *, TEXT *, CHAR_T, u_int32_t); +static void txt_prompt(SCR *, TEXT *, char, u_int32_t); /* * ex_txt -- * Get lines from the terminal for ex. * - * PUBLIC: int ex_txt(SCR *, TEXTH *, CHAR_T, u_int32_t); + * PUBLIC: int ex_txt(SCR *, TEXTH *, char, u_int32_t); */ int -ex_txt(SCR *sp, TEXTH *tiqh, CHAR_T prompt, u_int32_t flags) +ex_txt(SCR *sp, TEXTH *tiqh, char prompt, u_int32_t flags) { EVENT ev; GS *gp; @@ -347,7 +347,7 @@ alloc_err: * not ours. */ static void -txt_prompt(SCR *sp, TEXT *tp, CHAR_T prompt, u_int32_t flags) +txt_prompt(SCR *sp, TEXT *tp, char prompt, u_int32_t flags) { /* Display the prompt. */ if (LF_ISSET(TXT_PROMPT)) |