more int → bool
This commit is contained in:
parent
bb5e56d4c4
commit
beca8ed86f
4
edit.c
4
edit.c
|
@ -28,7 +28,7 @@
|
|||
|
||||
#ifndef MKSH_NO_CMDLINE_EDITING
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.245 2012/07/20 22:47:22 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.246 2012/08/24 19:02:55 tg Exp $");
|
||||
|
||||
/*
|
||||
* in later versions we might use libtermcap for this, but since external
|
||||
|
@ -779,7 +779,7 @@ glob_path(int flags, const char *pat, XPtrV *wp, const char *lpath)
|
|||
|
||||
oldsize = XPsize(*wp);
|
||||
/* mark dirs */
|
||||
glob_str(Xstring(xs, xp), wp, 1);
|
||||
glob_str(Xstring(xs, xp), wp, true);
|
||||
newsize = XPsize(*wp);
|
||||
|
||||
/* Check that each match is executable... */
|
||||
|
|
12
eval.c
12
eval.c
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.124 2012/08/17 18:34:20 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.125 2012/08/24 19:02:57 tg Exp $");
|
||||
|
||||
/*
|
||||
* string expansion
|
||||
|
@ -60,7 +60,7 @@ typedef struct Expand {
|
|||
static int varsub(Expand *, const char *, const char *, int *, int *);
|
||||
static int comsub(Expand *, const char *);
|
||||
static char *trimsub(char *, char *, int);
|
||||
static void glob(char *, XPtrV *, int);
|
||||
static void glob(char *, XPtrV *, bool);
|
||||
static void globit(XString *, char **, char *, XPtrV *, int);
|
||||
static const char *maybe_expand_tilde(const char *, XString *, char **, int);
|
||||
static char *tilde(char *);
|
||||
|
@ -895,7 +895,7 @@ expand(const char *cp, /* input word */
|
|||
p + Xlength(ds, (dp - 1)),
|
||||
fdo | (f & DOMARKDIRS));
|
||||
else if (fdo & DOGLOB)
|
||||
glob(p, wp, f & DOMARKDIRS);
|
||||
glob(p, wp, tobool(f & DOMARKDIRS));
|
||||
else if ((f & DOPAT) || !(fdo & DOMAGIC))
|
||||
XPput(*wp, p);
|
||||
else
|
||||
|
@ -1399,7 +1399,7 @@ trimsub(char *str, char *pat, int how)
|
|||
|
||||
/* XXX cp not const 'cause slashes are temporarily replaced with NULs... */
|
||||
static void
|
||||
glob(char *cp, XPtrV *wp, int markdirs)
|
||||
glob(char *cp, XPtrV *wp, bool markdirs)
|
||||
{
|
||||
int oldsize = XPsize(*wp);
|
||||
|
||||
|
@ -1420,7 +1420,7 @@ glob(char *cp, XPtrV *wp, int markdirs)
|
|||
* the number of matches found.
|
||||
*/
|
||||
int
|
||||
glob_str(char *cp, XPtrV *wp, int markdirs)
|
||||
glob_str(char *cp, XPtrV *wp, bool markdirs)
|
||||
{
|
||||
int oldsize = XPsize(*wp);
|
||||
XString xs;
|
||||
|
@ -1720,7 +1720,7 @@ alt_expand(XPtrV *wp, char *start, char *exp_start, char *end, int fdo)
|
|||
* expansion. }
|
||||
*/
|
||||
if (fdo & DOGLOB)
|
||||
glob(start, wp, fdo & DOMARKDIRS);
|
||||
glob(start, wp, tobool(fdo & DOMARKDIRS));
|
||||
else
|
||||
XPput(*wp, debunk(start, start, end - start));
|
||||
return;
|
||||
|
|
4
sh.h
4
sh.h
|
@ -157,7 +157,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.578 2012/08/17 18:34:24 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.579 2012/08/24 19:02:57 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R40 2012/08/17"
|
||||
|
||||
|
@ -1632,7 +1632,7 @@ char *evalstr(const char *cp, int);
|
|||
char *evalonestr(const char *cp, int);
|
||||
char *debunk(char *, const char *, size_t);
|
||||
void expand(const char *, XPtrV *, int);
|
||||
int glob_str(char *, XPtrV *, int);
|
||||
int glob_str(char *, XPtrV *, bool);
|
||||
/* exec.c */
|
||||
int execute(struct op * volatile, volatile int, volatile int * volatile);
|
||||
int shcomexec(const char **);
|
||||
|
|
Loading…
Reference in New Issue