whitespace
This commit is contained in:
parent
475cafb90e
commit
4e08a79555
5
exec.c
5
exec.c
@ -22,7 +22,7 @@
|
||||
|
||||
#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
|
||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
||||
@ -441,7 +441,8 @@ comexec(struct op *t, struct tbl *volatile tp, const char **ap,
|
||||
*/
|
||||
keepasn_ok = 1;
|
||||
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 ((cp = *++ap) == NULL) {
|
||||
tp = NULL;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <sys/file.h>
|
||||
#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.
|
||||
|
10
jobs.c
10
jobs.c
@ -22,7 +22,7 @@
|
||||
|
||||
#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
|
||||
#define mksh_killpg killpg
|
||||
@ -63,7 +63,7 @@ struct proc {
|
||||
#define JF_W_ASYNCNOTIFY 0x004 /* set if waiting and async notification ok */
|
||||
#define JF_XXCOM 0x008 /* set for $(command) jobs */
|
||||
#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_KNOWN 0x080 /* $! referenced */
|
||||
#define JF_ZOMBIE 0x100 /* known, unwaited process */
|
||||
@ -87,7 +87,7 @@ struct job {
|
||||
int32_t age; /* number of jobs started */
|
||||
Coproc_id coproc_id; /* 0 or id of coprocess output pipe */
|
||||
#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 */
|
||||
#endif
|
||||
};
|
||||
@ -717,7 +717,7 @@ j_resume(const char *cp, int bg)
|
||||
/* attach tty to job */
|
||||
if (j->state == PRUNNING) {
|
||||
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. */
|
||||
if (ttypgrp_ok &&
|
||||
tcsetpgrp(tty_fd, (j->flags & JF_SAVEDTTYPGRP) ?
|
||||
@ -1026,7 +1026,7 @@ j_waitj(Job *j,
|
||||
tty_fd, (long)kshpgrp, strerror(errno));
|
||||
if (j->state == PSTOPPED) {
|
||||
j->flags |= JF_SAVEDTTY;
|
||||
tcgetattr(tty_fd, &j->ttystate);
|
||||
tcgetattr(tty_fd, &j->ttystat);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
8
misc.c
8
misc.c
@ -29,7 +29,7 @@
|
||||
#include <grp.h>
|
||||
#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 */
|
||||
|
||||
@ -705,9 +705,11 @@ cclass(const unsigned char *p, int sub)
|
||||
if (ISMAGIC(c)) {
|
||||
c = *p++;
|
||||
if ((c & 0x80) && !ISMAGIC(c)) {
|
||||
c &= 0x7f;/* extended pattern matching: *+?@! */
|
||||
/* extended pattern matching: *+?@! */
|
||||
c &= 0x7F;
|
||||
/* XXX the ( char isn't handled as part of [] */
|
||||
if (c == ' ') /* simile for @: plain (..) */
|
||||
if (c == ' ')
|
||||
/* simile for @: plain (..) */
|
||||
c = '(' /*)*/;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user