diff --git a/funcs.c b/funcs.c index ead606c..3759254 100644 --- a/funcs.c +++ b/funcs.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.103 2009/04/05 12:35:30 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.104 2009/04/07 19:51:46 tg Exp $"); /* A leading = means assignments before command are kept; * a leading * means a POSIX special builtin; @@ -72,8 +72,8 @@ struct kill_info { }; static const struct t_op { - char op_text[4]; - Test_op op_num; + char op_text[4]; + Test_op op_num; } u_ops[] = { {"-a", TO_FILAXST }, {"-b", TO_FILBDEV }, @@ -2467,7 +2467,7 @@ c_test(const char **wp) if (argc <= 5) { const char **owp = wp; int invert = 0; - Test_op op; + Test_op op; const char *opnd1, *opnd2; while (--argc >= 0) { diff --git a/misc.c b/misc.c index dcddbfb..df0f4f1 100644 --- a/misc.c +++ b/misc.c @@ -9,7 +9,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.102 2009/04/05 12:35:32 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.103 2009/04/07 19:51:47 tg Exp $"); #undef USE_CHVT #if defined(TIOCSCTTY) && !defined(MKSH_SMALL) @@ -1108,19 +1108,18 @@ make_path(const char *cwd, const char *file, XString *xsp, int *phys_pathp) { - int rval = 0; - int use_cdpath = 1; - char *plist; - int len; - int plen = 0; - char *xp = Xstring(*xsp, xp); + int rval = 0; + bool use_cdpath = true; + char *plist; + int len, plen = 0; + char *xp = Xstring(*xsp, xp); if (!file) file = null; if (file[0] == '/') { *phys_pathp = 0; - use_cdpath = 0; + use_cdpath = false; } else { if (file[0] == '.') { char c = file[1]; @@ -1128,12 +1127,12 @@ make_path(const char *cwd, const char *file, if (c == '.') c = file[2]; if (c == '/' || c == '\0') - use_cdpath = 0; + use_cdpath = false; } plist = *cdpathp; if (!plist) - use_cdpath = 0; + use_cdpath = false; else if (use_cdpath) { char *pend; @@ -1143,7 +1142,7 @@ make_path(const char *cwd, const char *file, *cdpathp = *pend ? pend + 1 : NULL; } - if ((use_cdpath == 0 || !plen || plist[0] != '/') && + if ((!use_cdpath || !plen || plist[0] != '/') && (cwd && *cwd)) { len = strlen(cwd); XcheckN(*xsp, xp, len); @@ -1180,11 +1179,9 @@ make_path(const char *cwd, const char *file, void simplify_path(char *pathl) { - char *cur; - char *t; - int isrooted; - char *very_start = pathl; - char *start; + char *cur, *t; + bool isrooted; + char *very_start = pathl, *start; if (!*pathl) return;