Hi As far as I can tell there haven't been any new bits added for almost 20 years, so I expect we can do without the Tflag typedef.
ok? Index: proto.h =================================================================== RCS file: /cvs/src/bin/ksh/proto.h,v retrieving revision 1.35 diff -u -p -r1.35 proto.h --- proto.h 4 Sep 2013 15:49:19 -0000 1.35 +++ proto.h 14 Sep 2015 15:51:02 -0000 @@ -252,7 +252,7 @@ int setstr(struct tbl *, const char *, i struct tbl *setint_v(struct tbl *, struct tbl *, bool); void setint(struct tbl *, long); int getint(struct tbl *, long *, bool); -struct tbl * typeset(const char *, Tflag, Tflag, int, int); +struct tbl *typeset(const char *, int, int, int, int); void unset(struct tbl *, int); char * skip_varname(const char *, int); char *skip_wdvarname(const char *, int); Index: sh.h =================================================================== RCS file: /cvs/src/bin/ksh/sh.h,v retrieving revision 1.36 diff -u -p -r1.36 sh.h --- sh.h 14 Sep 2015 09:42:33 -0000 1.36 +++ sh.h 14 Sep 2015 15:51:03 -0000 @@ -46,9 +46,6 @@ #define sizeofN(type, n) (sizeof(type) * (n)) #define BIT(i) (1<<(i)) /* define bit in flag */ -/* Table flag type - needs > 16 and < 32 bits */ -typedef int Tflag; - #define NUFILE 32 /* Number of user-accessible files */ #define FDBASE 10 /* First file usable by Shell */ @@ -365,7 +362,7 @@ extern const char ksh_version[]; /* name of called builtin function (used by error functions) */ EXTERN char *builtin_argv0; -EXTERN Tflag builtin_flag; /* flags of called builtin (SPEC_BI, etc.) */ +EXTERN int builtin_flag; /* flags of called builtin (SPEC_BI, etc.) */ /* current working directory, and size of memory allocated for same */ EXTERN char *current_wd; Index: table.h =================================================================== RCS file: /cvs/src/bin/ksh/table.h,v retrieving revision 1.8 diff -u -p -r1.8 table.h --- table.h 19 Feb 2012 07:52:30 -0000 1.8 +++ table.h 14 Sep 2015 15:51:03 -0000 @@ -13,7 +13,7 @@ struct table { }; struct tbl { /* table item */ - Tflag flag; /* flags */ + int flag; /* flags */ int type; /* command type (see below), base (if INTEGER), * or offset from val.s of value (if EXPORT) */ Area *areap; /* area to allocate from */ Index: c_ksh.c =================================================================== RCS file: /cvs/src/bin/ksh/c_ksh.c,v retrieving revision 1.37 diff -u -p -r1.37 c_ksh.c --- c_ksh.c 10 Sep 2015 22:48:58 -0000 1.37 +++ c_ksh.c 14 Sep 2015 15:51:03 -0000 @@ -536,14 +536,10 @@ c_typeset(char **wp) { struct block *l; struct tbl *vp, **p; - Tflag fset = 0, fclr = 0; - int thing = 0, func = 0, local = 0; + int fset = 0, fclr = 0, thing = 0, func = 0, local = 0, pflag = 0; const char *options = "L#R#UZ#fi#lprtux"; /* see comment below */ char *fieldstr, *basestr; - int field, base; - int optc; - Tflag flag; - int pflag = 0; + int field, base, optc, flag; switch (**wp) { case 'e': /* export */ @@ -834,9 +830,8 @@ int c_alias(char **wp) { struct table *t = &aliases; - int rv = 0, rflag = 0, tflag, Uflag = 0, pflag = 0; - int prefix = 0; - Tflag xflag = 0; + int rv = 0, rflag = 0, tflag, Uflag = 0, pflag = 0, prefix = 0; + int xflag = 0; int optc; builtin_opt.flags |= GF_PLUSOPT; Index: exec.c =================================================================== RCS file: /cvs/src/bin/ksh/exec.c,v retrieving revision 1.52 diff -u -p -r1.52 exec.c --- exec.c 10 Sep 2015 22:48:58 -0000 1.52 +++ exec.c 14 Sep 2015 15:51:03 -0000 @@ -527,8 +527,7 @@ comexec(struct op *t, struct tbl *volati case CFUNC: /* function call */ { - volatile int old_xflag; - volatile Tflag old_inuse; + volatile int old_xflag, old_inuse; const char *volatile old_kshname; if (!(tp->flag & ISSET)) { @@ -791,7 +790,7 @@ void builtin(const char *name, int (*func) (char **)) { struct tbl *tp; - Tflag flag; + int flag; /* see if any flags should be set for this builtin */ for (flag = 0; ; name++) { Index: var.c =================================================================== RCS file: /cvs/src/bin/ksh/var.c,v retrieving revision 1.45 diff -u -p -r1.45 var.c --- var.c 14 Sep 2015 09:42:33 -0000 1.45 +++ var.c 14 Sep 2015 15:51:03 -0000 @@ -583,7 +583,7 @@ export(struct tbl *vp, const char *val) * LCASEV, UCASEV_AL), and optionally set its value if an assignment. */ struct tbl * -typeset(const char *var, Tflag set, Tflag clr, int field, int base) +typeset(const char *var, int set, int clr, int field, int base) { struct tbl *vp; struct tbl *vpbase, *t;