whitespace
This commit is contained in:
parent
475cafb90e
commit
4e08a79555
5
exec.c
5
exec.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.76 2010/08/28 15:39:18 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.77 2010/08/28 15:48:18 tg Exp $");
|
||||||
|
|
||||||
#ifndef MKSH_DEFAULT_EXECSHELL
|
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
||||||
@ -441,7 +441,8 @@ comexec(struct op *t, struct tbl *volatile tp, const char **ap,
|
|||||||
*/
|
*/
|
||||||
keepasn_ok = 1;
|
keepasn_ok = 1;
|
||||||
while (tp && tp->type == CSHELL) {
|
while (tp && tp->type == CSHELL) {
|
||||||
fcflags = FC_BI|FC_FUNC|FC_PATH;/* undo effects of command */
|
/* undo effects of command */
|
||||||
|
fcflags = FC_BI|FC_FUNC|FC_PATH;
|
||||||
if (tp->val.f == c_builtin) {
|
if (tp->val.f == c_builtin) {
|
||||||
if ((cp = *++ap) == NULL) {
|
if ((cp = *++ap) == NULL) {
|
||||||
tp = NULL;
|
tp = NULL;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.98 2010/07/24 17:08:29 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.99 2010/08/28 15:48:18 tg Exp $");
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* MirOS: This is the default mapping type, and need not be specified.
|
* MirOS: This is the default mapping type, and need not be specified.
|
||||||
|
10
jobs.c
10
jobs.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.69 2010/07/04 17:33:54 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.70 2010/08/28 15:48:19 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
#define mksh_killpg killpg
|
#define mksh_killpg killpg
|
||||||
@ -63,7 +63,7 @@ struct proc {
|
|||||||
#define JF_W_ASYNCNOTIFY 0x004 /* set if waiting and async notification ok */
|
#define JF_W_ASYNCNOTIFY 0x004 /* set if waiting and async notification ok */
|
||||||
#define JF_XXCOM 0x008 /* set for $(command) jobs */
|
#define JF_XXCOM 0x008 /* set for $(command) jobs */
|
||||||
#define JF_FG 0x010 /* running in foreground (also has tty pgrp) */
|
#define JF_FG 0x010 /* running in foreground (also has tty pgrp) */
|
||||||
#define JF_SAVEDTTY 0x020 /* j->ttystate is valid */
|
#define JF_SAVEDTTY 0x020 /* j->ttystat is valid */
|
||||||
#define JF_CHANGED 0x040 /* process has changed state */
|
#define JF_CHANGED 0x040 /* process has changed state */
|
||||||
#define JF_KNOWN 0x080 /* $! referenced */
|
#define JF_KNOWN 0x080 /* $! referenced */
|
||||||
#define JF_ZOMBIE 0x100 /* known, unwaited process */
|
#define JF_ZOMBIE 0x100 /* known, unwaited process */
|
||||||
@ -87,7 +87,7 @@ struct job {
|
|||||||
int32_t age; /* number of jobs started */
|
int32_t age; /* number of jobs started */
|
||||||
Coproc_id coproc_id; /* 0 or id of coprocess output pipe */
|
Coproc_id coproc_id; /* 0 or id of coprocess output pipe */
|
||||||
#ifndef MKSH_UNEMPLOYED
|
#ifndef MKSH_UNEMPLOYED
|
||||||
struct termios ttystate;/* saved tty state for stopped jobs */
|
struct termios ttystat; /* saved tty state for stopped jobs */
|
||||||
pid_t saved_ttypgrp; /* saved tty process group for stopped jobs */
|
pid_t saved_ttypgrp; /* saved tty process group for stopped jobs */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -717,7 +717,7 @@ j_resume(const char *cp, int bg)
|
|||||||
/* attach tty to job */
|
/* attach tty to job */
|
||||||
if (j->state == PRUNNING) {
|
if (j->state == PRUNNING) {
|
||||||
if (ttypgrp_ok && (j->flags & JF_SAVEDTTY))
|
if (ttypgrp_ok && (j->flags & JF_SAVEDTTY))
|
||||||
tcsetattr(tty_fd, TCSADRAIN, &j->ttystate);
|
tcsetattr(tty_fd, TCSADRAIN, &j->ttystat);
|
||||||
/* See comment in j_waitj regarding saved_ttypgrp. */
|
/* See comment in j_waitj regarding saved_ttypgrp. */
|
||||||
if (ttypgrp_ok &&
|
if (ttypgrp_ok &&
|
||||||
tcsetpgrp(tty_fd, (j->flags & JF_SAVEDTTYPGRP) ?
|
tcsetpgrp(tty_fd, (j->flags & JF_SAVEDTTYPGRP) ?
|
||||||
@ -1026,7 +1026,7 @@ j_waitj(Job *j,
|
|||||||
tty_fd, (long)kshpgrp, strerror(errno));
|
tty_fd, (long)kshpgrp, strerror(errno));
|
||||||
if (j->state == PSTOPPED) {
|
if (j->state == PSTOPPED) {
|
||||||
j->flags |= JF_SAVEDTTY;
|
j->flags |= JF_SAVEDTTY;
|
||||||
tcgetattr(tty_fd, &j->ttystate);
|
tcgetattr(tty_fd, &j->ttystat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
8
misc.c
8
misc.c
@ -29,7 +29,7 @@
|
|||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.141 2010/07/17 22:09:36 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.142 2010/08/28 15:48:19 tg Exp $");
|
||||||
|
|
||||||
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
||||||
|
|
||||||
@ -705,9 +705,11 @@ cclass(const unsigned char *p, int sub)
|
|||||||
if (ISMAGIC(c)) {
|
if (ISMAGIC(c)) {
|
||||||
c = *p++;
|
c = *p++;
|
||||||
if ((c & 0x80) && !ISMAGIC(c)) {
|
if ((c & 0x80) && !ISMAGIC(c)) {
|
||||||
c &= 0x7f;/* extended pattern matching: *+?@! */
|
/* extended pattern matching: *+?@! */
|
||||||
|
c &= 0x7F;
|
||||||
/* XXX the ( char isn't handled as part of [] */
|
/* XXX the ( char isn't handled as part of [] */
|
||||||
if (c == ' ') /* simile for @: plain (..) */
|
if (c == ' ')
|
||||||
|
/* simile for @: plain (..) */
|
||||||
c = '(' /*)*/;
|
c = '(' /*)*/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
sh.h
2
sh.h
@ -150,7 +150,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.406 2010/08/28 15:39:20 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.407 2010/08/28 15:48:20 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R39 2010/08/24"
|
#define MKSH_VERSION "R39 2010/08/24"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user