throw out a bunch more of 0x60 characters throughout code and comments
This commit is contained in:
parent
72426f16e0
commit
8d3634d008
33
NOTES
33
NOTES
@ -1,3 +1,4 @@
|
||||
$MirBSD: NOTES,v 1.2 2004/04/17 00:47:16 tg Stab $
|
||||
$OpenBSD: NOTES,v 1.9 2003/10/26 15:07:25 jmc Exp $
|
||||
|
||||
General features of at&t ksh88 that are not (yet) in pdksh:
|
||||
@ -7,7 +8,7 @@ General features of at&t ksh88 that are not (yet) in pdksh:
|
||||
- trap DEBUG, local ERR and EXIT traps in functions.
|
||||
- ERRNO parameter.
|
||||
- doesn't have posix file globbing (eg, [[:alpha:]], etc.).
|
||||
- use of an `agent' to execute unreadable/setuid/setgid shell scripts
|
||||
- use of an 'agent' to execute unreadable/setuid/setgid shell scripts
|
||||
(don't ask).
|
||||
- read/select aren't hooked in to the command line editor
|
||||
- the last command of a pipeline is not run in the parent shell
|
||||
@ -29,10 +30,10 @@ Known bugs (see also BUG-REPORTS and PROJECTS files):
|
||||
of a command (eg, HISTFILE=/foo/bar echo hi) effects the parent
|
||||
shell. Note that setting other (not so special) parameters
|
||||
does not effect the parent shell.
|
||||
- `echo hi | exec cat -n' causes at&t to exit, `exec echo hi | cat -n'
|
||||
- 'echo hi | exec cat -n' causes at&t to exit, 'exec echo hi | cat -n'
|
||||
does not. pdksh exits for neither. Don't think POSIX requires
|
||||
an exit, but not sure.
|
||||
- `echo foo | read bar; echo $bar' prints foo in at&t ksh, nothing
|
||||
- 'echo foo | read bar; echo $bar' prints foo in at&t ksh, nothing
|
||||
in pdksh (ie, the read is done in a separate process in pdksh).
|
||||
Misc:
|
||||
|
||||
@ -40,12 +41,12 @@ Known problems not caused by ksh:
|
||||
- after stoping a job, emacs/vi is not re-entered. Hitting return
|
||||
prints the prompt and everything is fine again. Problem (often
|
||||
involving a pager like less) is related to order of process
|
||||
scheduling (shell runs before `stop'ed (sub) processes have had a chance
|
||||
scheduling (shell runs before 'stop'ed (sub) processes have had a chance
|
||||
to clean up the screen/terminal).
|
||||
|
||||
Known differences between pdksh & at&t ksh (that may change)
|
||||
- vi:
|
||||
- `^U': at&t: kills only what has been inserted, pdksh: kills to
|
||||
- '^U': at&t: kills only what has been inserted, pdksh: kills to
|
||||
start of line
|
||||
- at&t ksh login shells say "Warning: you have running jobs" if you
|
||||
try to exit when there are running jobs. An immediate second attempt
|
||||
@ -65,7 +66,7 @@ Known differences between pdksh & at&t ksh (that may change)
|
||||
it is the same as set -o.
|
||||
- in pdksh emacs mode, ^T does what gnu emacs does, not what at&t ksh
|
||||
does.
|
||||
- in ksh93, `. name' calls a function (defined with function) with POSIX
|
||||
- in ksh93, '. name' calls a function (defined with function) with POSIX
|
||||
semantics (instead of ksh semantics). in pdksh, . does not call
|
||||
functions.
|
||||
- test: "test -f foo bar blah" is the same as "test -f foo" (the extra
|
||||
@ -126,7 +127,7 @@ Known differences between pdksh & at&t ksh (that are not likely to change)
|
||||
- at&t ksh seems to allow function calls inside expressions
|
||||
(eg, typeset -i x='y(2)') but they do not seem to be regular functions
|
||||
nor math functions (eg, pow, exp) - anyone known anything about this?
|
||||
- `set -o nounset; unset foo; echo ${#foo}`: at&t ksh prints 0; pdksh
|
||||
- 'set -o nounset; unset foo; echo ${#foo}': at&t ksh prints 0; pdksh
|
||||
generates error. Same for ${#foo[*]} and ${#foo[@]}.
|
||||
- . file: at&t ksh parses the whole file before executing anything,
|
||||
pdksh executes as it parses. This means aliases defined in the file
|
||||
@ -136,7 +137,7 @@ Known differences between pdksh & at&t ksh (that are not likely to change)
|
||||
- a return in $ENV in at&t ksh will cause the shell to exit, while in
|
||||
pdksh it will stop executing the script (this is consistent with
|
||||
what a return in .profile does in both shells).
|
||||
- at&t ksh does file globbing for `echo "${foo:-"*"}"`, pdksh does not
|
||||
- at&t ksh does file globbing for 'echo "${foo:-"*"}"', pdksh does not
|
||||
(POSIX would seem to indicate pdksh is right).
|
||||
- at&t ksh thinks ${a:##foo} is ok, pdksh doesn't.
|
||||
- at&t does tilde expansion on here-document delimiters, pdksh does
|
||||
@ -162,9 +163,9 @@ Known differences between pdksh & at&t ksh (that are not likely to change)
|
||||
stopped jobs when job control is enabled. pdksh doesn't.
|
||||
- at&t ksh automatically sets the bgnice option for interactive shells;
|
||||
pdksh does not.
|
||||
- in at&t ksh, "eval `false`; echo $?" prints 1, pdksh prints 0 (which
|
||||
is what POSIX says it should). Same goes for "wait `false`; echo $?".
|
||||
(same goes for "set `false`; echo $?" if posix option is set - some
|
||||
- in at&t ksh, "eval $(false); echo $?" prints 1, pdksh prints 0 (which
|
||||
is what POSIX says it should). Same goes for "wait $(false); echo $?".
|
||||
(same goes for "set $(false); echo $?" if posix option is set - some
|
||||
scripts that use the old getopt depend on this, so be careful about
|
||||
setting the posix option).
|
||||
- in at&t ksh, print -uX and read -uX are interrperted as -u with no
|
||||
@ -206,7 +207,7 @@ Known differences between pdksh & at&t ksh (that are not likely to change)
|
||||
- pdksh bumps RANDOM in parent after a fork, at&t ksh bumps it in both
|
||||
parent and child:
|
||||
RANDOM=1
|
||||
echo child: `echo $RANDOM`
|
||||
echo child: $(echo $RANDOM)
|
||||
echo parent: $RANDOM
|
||||
will produce "child: 16838 parent: 5758" in pdksh, while at&t ksh
|
||||
will produce "child: 5758 parent: 5758".
|
||||
@ -214,7 +215,7 @@ Known differences between pdksh & at&t ksh (that are not likely to change)
|
||||
Oddities in ksh (pd & at&t):
|
||||
- array references inside (())/$(()) are strange:
|
||||
$(( x[2] )) does the expected, $(( $x[2] )) doesn't.
|
||||
- `typeset -R3 X='x '; echo "($X)"` produces ( x) - trailing
|
||||
- 'typeset -R3 X='x '; echo "($X)"' produces ( x) - trailing
|
||||
spaces are stripped.
|
||||
- typeset -R turns off Z flag.
|
||||
- both shells have the following mis-feature:
|
||||
@ -287,7 +288,7 @@ at&t ksh bugs:
|
||||
$ echo ${abc:-G { I } K }
|
||||
hi K }
|
||||
$
|
||||
The second echo should only have printed `hi'.
|
||||
The second echo should only have printed 'hi'.
|
||||
- (all)
|
||||
$ echo ${abc:- > foo}
|
||||
syntax error: > unexpected
|
||||
@ -496,7 +497,7 @@ at&t ksh bugs:
|
||||
POSIX sh questions (references are to POSIX 1003.2-1992)
|
||||
- arithmetic expressions: how are empty expressions treated?
|
||||
(eg, echo $(( ))). at&t ksh (and now pdksh) echo 0.
|
||||
Same question goes for `test "" -eq 0' - does this generate an error
|
||||
Same question goes for 'test "" -eq 0' - does this generate an error
|
||||
or, if not, what is the exit code?
|
||||
- should tilde expansion occur after :'s in the word part of ${..=..}?
|
||||
(me thinks it should)
|
||||
@ -519,7 +520,7 @@ POSIX sh bugs (references are to POSIX 1003.2-1992)
|
||||
"foo ^W" will do nothing. This is inconsistent with the vi
|
||||
spec, which says delete preceding word including and interceding
|
||||
blanks (para at line 5189, section 5).
|
||||
- parameter expansion, section 3.6.2, line 391: `in each case that a
|
||||
- parameter expansion, section 3.6.2, line 391: 'in each case that a
|
||||
value of word is needed (..), word shall be subjected to tilde
|
||||
expansion, parameter expansion, ...'. Various expansions should not
|
||||
be performed if parameter is in double quotes.
|
||||
|
3
README
3
README
@ -1,3 +1,4 @@
|
||||
$MirBSD: README,v 1.2 2004/04/17 00:47:16 tg Exp $
|
||||
$OpenBSD: README,v 1.10 2003/03/10 03:48:16 david Exp $
|
||||
|
||||
Last updated Jul '99 for pdksh-5.2.14.
|
||||
@ -101,7 +102,7 @@ Compiling/Installing:
|
||||
perfect - see BUG-REPORTS file), using gcc - cc has problems with
|
||||
macro expansions in the argument of a macro (in this case, the ARGS
|
||||
macro).
|
||||
* On TitanOS (Stardent/Titan), use `CC="cc -43" configure ...'.
|
||||
* On TitanOS (Stardent/Titan), use 'CC="cc -43" configure ...'.
|
||||
When configure finishes, edit config.h, undef HAVE_DIRENT_H and
|
||||
define HAVE_SYS_DIR_H (the dirent.h header file is broken).
|
||||
* On Linux (red hat distribution), check that /dev/tty has mode 0666
|
||||
|
3
alloc.c
3
alloc.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: alloc.c,v 1.2 2004/04/17 00:47:16 tg Exp $ */
|
||||
/* $OpenBSD: alloc.c,v 1.6 2003/08/05 20:52:27 millert Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002 Marc Espie.
|
||||
@ -12,7 +13,7 @@
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD
|
||||
* PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
|
7
c_ksh.c
7
c_ksh.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: c_ksh.c,v 1.2 2004/04/17 00:47:17 tg Exp $ */
|
||||
/* $OpenBSD: c_ksh.c,v 1.17 2003/10/22 07:40:38 jmc Exp $ */
|
||||
|
||||
/*
|
||||
@ -862,7 +863,7 @@ c_typeset(wp)
|
||||
}
|
||||
shprintf(newline);
|
||||
}
|
||||
/* Only report first `element' of an array with
|
||||
/* Only report first 'element' of an array with
|
||||
* no set elements.
|
||||
*/
|
||||
if (!any_set)
|
||||
@ -1193,7 +1194,7 @@ c_kill(wp)
|
||||
/* assume old style options if -digits or -UPPERCASE */
|
||||
if ((p = wp[1]) && *p == '-' && (digit(p[1]) || isupper(p[1]))) {
|
||||
if (!(t = gettrap(p + 1, TRUE))) {
|
||||
bi_errorf("bad signal `%s'", p + 1);
|
||||
bi_errorf("bad signal '%s'", p + 1);
|
||||
return 1;
|
||||
}
|
||||
i = (wp[2] && strcmp(wp[2], "--") == 0) ? 3 : 2;
|
||||
@ -1207,7 +1208,7 @@ c_kill(wp)
|
||||
break;
|
||||
case 's':
|
||||
if (!(t = gettrap(builtin_opt.optarg, TRUE))) {
|
||||
bi_errorf("bad signal `%s'",
|
||||
bi_errorf("bad signal '%s'",
|
||||
builtin_opt.optarg);
|
||||
return 1;
|
||||
}
|
||||
|
5
c_sh.c
5
c_sh.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: c_sh.c,v 1.2 2004/04/17 00:47:17 tg Exp $ */
|
||||
/* $OpenBSD: c_sh.c,v 1.17 2003/03/13 09:03:07 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
@ -646,8 +647,8 @@ c_set(wp)
|
||||
;
|
||||
}
|
||||
/* POSIX says set exit status is 0, but old scripts that use
|
||||
* getopt(1), use the construct: set -- `getopt ab:c "$@"`
|
||||
* which assumes the exit value set will be that of the ``
|
||||
* getopt(1), use the construct: set -- $(getopt ab:c "$@")
|
||||
* which assumes the exit value set will be that of the $()
|
||||
* (subst_exstat is cleared in execute() so that it will be 0
|
||||
* if there are no command substitutions).
|
||||
*/
|
||||
|
5
c_test.c
5
c_test.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: c_test.c,v 1.2 2004/04/17 00:47:17 tg Exp $ */
|
||||
/* $OpenBSD: c_test.c,v 1.10 2003/10/10 19:09:07 millert Exp $ */
|
||||
|
||||
/*
|
||||
@ -391,7 +392,7 @@ test_eval(te, op, opnd1, opnd2, do_eval)
|
||||
{
|
||||
int s2;
|
||||
/* ksh88/ksh93 succeed if file2 can't be stated
|
||||
* (subtly different from `does not exist').
|
||||
* (subtly different from 'does not exist').
|
||||
*/
|
||||
return stat(opnd1, &b1) == 0
|
||||
&& (((s2 = stat(opnd2, &b2)) == 0
|
||||
@ -401,7 +402,7 @@ test_eval(te, op, opnd1, opnd2, do_eval)
|
||||
{
|
||||
int s1;
|
||||
/* ksh88/ksh93 succeed if file1 can't be stated
|
||||
* (subtly different from `does not exist').
|
||||
* (subtly different from 'does not exist').
|
||||
*/
|
||||
return stat(opnd2, &b2) == 0
|
||||
&& (((s1 = stat(opnd1, &b1)) == 0
|
||||
|
20
config.h
20
config.h
@ -1,4 +1,4 @@
|
||||
/* $MirBSD: config.h,v 1.3 2004/04/07 17:22:48 tg Exp $ */
|
||||
/* $MirBSD: config.h,v 1.4 2004/04/17 00:47:17 tg Exp $ */
|
||||
/* $OpenBSD: config.h,v 1.9 2003/10/22 07:40:38 jmc Exp $ */
|
||||
|
||||
/* config.h. NOT generated automatically. */
|
||||
@ -25,10 +25,10 @@
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
/* #undef gid_t */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* Define if you have a working 'mmap' system call. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
@ -43,13 +43,13 @@
|
||||
/* Define if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* Define to 'long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
@ -62,16 +62,16 @@
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* Define if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
/* Define if 'sys_siglist' is declared by <signal.h>. */
|
||||
#define SYS_SIGLIST_DECLARED 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
/* #undef uid_t */
|
||||
|
||||
/* Define if the closedir function returns void instead of int. */
|
||||
@ -137,7 +137,7 @@
|
||||
/* Define if time() is declared in <time.h> */
|
||||
#define TIME_DECLARED 1
|
||||
|
||||
/* Define to `unsigned' if <signal.h> doesn't define */
|
||||
/* Define to 'unsigned' if <signal.h> doesn't define */
|
||||
/* #undef sigset_t */
|
||||
|
||||
/* Define if sys_errlist[] and sys_nerr are in the C library */
|
||||
|
2
configure
vendored
2
configure
vendored
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $MirBSD: configure,v 1.6 2004/04/17 00:37:08 tg Exp $
|
||||
# $MirBSD: configure,v 1.7 2004/04/17 00:47:17 tg Exp $
|
||||
#
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.13.20020210
|
||||
|
6
edit.c
6
edit.c
@ -1,4 +1,4 @@
|
||||
/* $MirBSD: edit.c,v 1.4 2003/08/31 20:54:02 tg Exp $ */
|
||||
/* $MirBSD: edit.c,v 1.5 2004/04/17 00:47:18 tg Exp $ */
|
||||
/* $OpenBSD: edit.c,v 1.18 2003/08/22 18:17:10 fgsch Exp $ */
|
||||
|
||||
/*
|
||||
@ -69,7 +69,7 @@ x_init()
|
||||
if (_POSIX_VDISABLE >= 0)
|
||||
vdisable_c = (char) _POSIX_VDISABLE;
|
||||
else
|
||||
/* `feature not available' */
|
||||
/* 'feature not available' */
|
||||
vdisable_c = (char) 0377;
|
||||
#else
|
||||
# if defined(HAVE_PATHCONF) && defined(_PC_VDISABLE)
|
||||
@ -293,7 +293,7 @@ x_mode(onoff)
|
||||
edchars.eof = '\4';
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
/* Convert unset values to internal `unset' value */
|
||||
/* Convert unset values to internal 'unset' value */
|
||||
if (edchars.erase == vdisable_c)
|
||||
edchars.erase = -1;
|
||||
if (edchars.kill == vdisable_c)
|
||||
|
7
expr.c
7
expr.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: expr.c,v 1.2 2004/04/17 00:47:18 tg Exp $ */
|
||||
/* $OpenBSD: expr.c,v 1.9 2003/10/22 07:40:38 jmc Exp $ */
|
||||
|
||||
/*
|
||||
@ -245,15 +246,15 @@ evalerr(es, type, str)
|
||||
default:
|
||||
s = opinfo[(int)es->tok].name;
|
||||
}
|
||||
warningf(TRUE, "%s: unexpected `%s'", es->expression, s);
|
||||
warningf(TRUE, "%s: unexpected '%s'", es->expression, s);
|
||||
break;
|
||||
|
||||
case ET_BADLIT:
|
||||
warningf(TRUE, "%s: bad number `%s'", es->expression, str);
|
||||
warningf(TRUE, "%s: bad number '%s'", es->expression, str);
|
||||
break;
|
||||
|
||||
case ET_RECURSIVE:
|
||||
warningf(TRUE, "%s: expression recurses on parameter `%s'",
|
||||
warningf(TRUE, "%s: expression recurses on parameter '%s'",
|
||||
es->expression, str);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $MirBSD: history.c,v 1.6 2003/05/22 14:06:07 tg Exp $ */
|
||||
/* $MirBSD: history.c,v 1.7 2004/04/17 00:47:18 tg Exp $ */
|
||||
/* $OpenBSD: history.c,v 1.22 2003/05/18 01:02:42 jsyn Exp $ */
|
||||
|
||||
/*
|
||||
@ -980,7 +980,7 @@ hist_shrink(oldbase, oldbytes)
|
||||
|
||||
|
||||
/*
|
||||
* find a pointer to the data `no' back from the end of the file
|
||||
* find a pointer to the data 'no' back from the end of the file
|
||||
* return the pointer and the number of bytes left
|
||||
*/
|
||||
static unsigned char *
|
||||
|
10
jobs.c
10
jobs.c
@ -1,4 +1,4 @@
|
||||
/* $MirBSD: jobs.c,v 1.2 2004/04/07 17:14:12 tg Exp $ */
|
||||
/* $MirBSD: jobs.c,v 1.3 2004/04/17 00:47:19 tg Exp $ */
|
||||
/* $OpenBSD: jobs.c,v 1.21 2003/11/10 21:26:39 millert Exp $ */
|
||||
|
||||
/*
|
||||
@ -636,7 +636,7 @@ exchild(t, flags, close_fd)
|
||||
}
|
||||
}
|
||||
}
|
||||
remove_job(j, "child"); /* in case of `jobs` command */
|
||||
remove_job(j, "child"); /* in case of 'jobs' command */
|
||||
nzombie = 0;
|
||||
#ifdef JOBS
|
||||
ttypgrp_ok = 0;
|
||||
@ -1245,10 +1245,10 @@ j_waitj(j, flags, where)
|
||||
if (tty_fd >= 0) {
|
||||
/* Only restore tty settings if job was originally
|
||||
* started in the foreground. Problems can be
|
||||
* caused by things like `more foobar &' which will
|
||||
* caused by things like 'more foobar &' which will
|
||||
* typically get and save the shell's vi/emacs tty
|
||||
* settings before setting up the tty for itself;
|
||||
* when more exits, it restores the `original'
|
||||
* when more exits, it restores the 'original'
|
||||
* settings, and things go down hill from there...
|
||||
*/
|
||||
if (j->state == PEXITED && j->status == 0
|
||||
@ -1557,7 +1557,7 @@ j_print(j, how, shf)
|
||||
case PSIGNALLED:
|
||||
if (WIFCORED(p->status))
|
||||
coredumped = 1;
|
||||
/* kludge for not reporting `normal termination signals'
|
||||
/* kludge for not reporting 'normal termination signals'
|
||||
* (ie, SIGINT, SIGPIPE)
|
||||
*/
|
||||
if (how == JP_SHORT && !coredumped
|
||||
|
3
lex.c
3
lex.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: lex.c,v 1.2 2004/04/17 00:47:19 tg Exp $ */
|
||||
/* $OpenBSD: lex.c,v 1.18 2003/08/06 21:08:05 millert Exp $ */
|
||||
|
||||
/*
|
||||
@ -827,7 +828,7 @@ readhere(iop)
|
||||
ungetsc(c);
|
||||
while ((c = getsc()) != '\n') {
|
||||
if (c == 0)
|
||||
yyerror("here document `%s' unclosed\n", eof);
|
||||
yyerror("here document '%s' unclosed\n", eof);
|
||||
Xcheck(xs, xp);
|
||||
Xput(xs, xp, c);
|
||||
}
|
||||
|
3
main.c
3
main.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: main.c,v 1.2 2004/04/17 00:47:19 tg Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.26 2004/01/08 05:43:14 jmc Exp $ */
|
||||
|
||||
/*
|
||||
@ -612,7 +613,7 @@ shell(s, toplevel)
|
||||
t = compile(s);
|
||||
if (t != NULL && t->type == TEOF) {
|
||||
if (wastty && Flag(FIGNOREEOF) && --attempts > 0) {
|
||||
shellf("Use `exit' to leave ksh\n");
|
||||
shellf("Use 'exit' to leave ksh\n");
|
||||
s->type = SSTDIN;
|
||||
} else if (wastty && !really_exit
|
||||
&& j_stopped_running())
|
||||
|
6
misc.c
6
misc.c
@ -1,4 +1,4 @@
|
||||
/* $MirBSD: misc.c,v 1.5 2003/12/23 13:41:50 tg Exp $ */
|
||||
/* $MirBSD: misc.c,v 1.6 2004/04/17 00:47:19 tg Exp $ */
|
||||
/* $OpenBSD: misc.c,v 1.20 2003/10/22 07:40:38 jmc Exp $ */
|
||||
|
||||
/*
|
||||
@ -443,7 +443,7 @@ parse_args(argv, what, setargsp)
|
||||
break;
|
||||
}
|
||||
if (i == NELEM(options)) {
|
||||
internal_errorf(1, "parse_args: `%c'", optc);
|
||||
internal_errorf(1, "parse_args: '%c'", optc);
|
||||
return -1; /* not reached */
|
||||
}
|
||||
}
|
||||
@ -1029,7 +1029,7 @@ ksh_getopt(argv, go, options)
|
||||
go->optarg = go->buf;
|
||||
return ':';
|
||||
}
|
||||
warningf(TRUE, "%s%s-`%c' requires argument",
|
||||
warningf(TRUE, "%s%s-'%c' requires argument",
|
||||
(go->flags & GF_NONAME) ? "" : argv[0],
|
||||
(go->flags & GF_NONAME) ? "" : ": ", c);
|
||||
if (go->flags & GF_ERROR)
|
||||
|
17
shf.c
17
shf.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: shf.c,v 1.2 2004/04/17 00:47:19 tg Exp $ */
|
||||
/* $OpenBSD: shf.c,v 1.8 2003/02/28 09:45:09 jmc Exp $ */
|
||||
|
||||
/*
|
||||
@ -856,13 +857,13 @@ shf_smprintf(fmt, va_alist)
|
||||
#define ABIGNUM 32000 /* big numer that will fit in a short */
|
||||
#define LOG2_10 3.321928094887362347870319429 /* log base 2 of 10 */
|
||||
|
||||
#define FL_HASH 0x001 /* `#' seen */
|
||||
#define FL_PLUS 0x002 /* `+' seen */
|
||||
#define FL_RIGHT 0x004 /* `-' seen */
|
||||
#define FL_BLANK 0x008 /* ` ' seen */
|
||||
#define FL_SHORT 0x010 /* `h' seen */
|
||||
#define FL_LONG 0x020 /* `l' seen */
|
||||
#define FL_ZERO 0x040 /* `0' seen */
|
||||
#define FL_HASH 0x001 /* '#' seen */
|
||||
#define FL_PLUS 0x002 /* '+' seen */
|
||||
#define FL_RIGHT 0x004 /* '-' seen */
|
||||
#define FL_BLANK 0x008 /* ' ' seen */
|
||||
#define FL_SHORT 0x010 /* 'h' seen */
|
||||
#define FL_LONG 0x020 /* 'l' seen */
|
||||
#define FL_ZERO 0x040 /* '0' seen */
|
||||
#define FL_DOT 0x080 /* '.' seen */
|
||||
#define FL_UPPER 0x100 /* format character was uppercase */
|
||||
#define FL_NUMBER 0x200 /* a number was formated %[douxefg] */
|
||||
@ -1176,7 +1177,7 @@ shf_vfprintf(shf, fmt, args)
|
||||
(void) memcpy(s, p, precision);
|
||||
s += precision;
|
||||
/*
|
||||
* `g' format strips trailing
|
||||
* 'g' format strips trailing
|
||||
* zeros after the decimal.
|
||||
*/
|
||||
if (c == 'g' && !(flags & FL_HASH)) {
|
||||
|
3
syn.c
3
syn.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: syn.c,v 1.2 2004/04/17 00:47:20 tg Exp $ */
|
||||
/* $OpenBSD: syn.c,v 1.14 2003/10/22 07:40:38 jmc Exp $ */
|
||||
|
||||
/*
|
||||
@ -746,7 +747,7 @@ syntaxerr(what)
|
||||
s = redir;
|
||||
}
|
||||
}
|
||||
yyerror("syntax error: `%s' %s\n", s, what);
|
||||
yyerror("syntax error: '%s' %s\n", s, what);
|
||||
}
|
||||
|
||||
static void
|
||||
|
5
var.c
5
var.c
@ -1,3 +1,4 @@
|
||||
/* $MirBSD: var.c,v 1.2 2004/04/17 00:47:20 tg Exp $ */
|
||||
/* $OpenBSD: var.c,v 1.16 2003/08/05 20:52:27 millert Exp $ */
|
||||
|
||||
#include "sh.h"
|
||||
@ -765,7 +766,7 @@ unset(vp, array_ref)
|
||||
/* If foo[0] is being unset, the remainder of the array is kept... */
|
||||
vp->flag &= SPECIAL | (array_ref ? ARRAY|DEFINED : 0);
|
||||
if (vp->flag & SPECIAL)
|
||||
unsetspec(vp); /* responsible for `unspecial'ing var */
|
||||
unsetspec(vp); /* responsible for 'unspecial'ing var */
|
||||
}
|
||||
|
||||
/* return a pointer to the first char past a legal variable name (returns the
|
||||
@ -1114,7 +1115,7 @@ unsetspec(vp)
|
||||
* set in various places.
|
||||
* Don't know what at&t does for:
|
||||
* MAIL, MAILPATH, HISTSIZE, HISTFILE,
|
||||
* Unsetting these in at&t ksh does not loose the `specialness':
|
||||
* Unsetting these in at&t ksh does not loose the 'specialness':
|
||||
* no effect: IFS, COLUMNS, PATH, TMPDIR,
|
||||
* VISUAL, EDITOR,
|
||||
* pdkshisms: no effect:
|
||||
|
Loading…
x
Reference in New Issue
Block a user