diff --git a/NOTES b/NOTES index fa1d321..6612bd4 100644 --- a/NOTES +++ b/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,14 +137,14 @@ 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 not. eg. $ cat << ~michael ~michael - $ + $ works for pdksh, not for at&t ksh (POSIX seems to agree with pdksh). - in at&t ksh, tracked aliases have the export flag implicitly set and tracked aliases and normal aliases live in the same name space @@ -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: @@ -232,7 +233,7 @@ Oddities in ksh (pd & at&t): a=[ab] $ x=typeset; $x a=[ab]; echo "$a" a=a - $ + $ - both ignore SIGTSTP,SIGTTIN,SIGTTOU in exec'd processes when talking and not monitoring (at&t ksh kind of does this). Doesn't really make sense. @@ -255,19 +256,19 @@ at&t ksh bugs: Bus error (core dumped) - (only riscos, hpux) $ typeset x[ - $ + $ - (only osf/1) $ A=B cat << EOF .$A. EOF Segmentation fault(coredump) - $ + $ - (only osf/1) $ read "?foo " foo Foo $ set | grep Foo =Foo - $ + $ - (all) $ typeset -i A $ typeset -L3 A @@ -278,20 +279,20 @@ at&t ksh bugs: a, , a, , b a, , c - $ + $ - (all) $ echo ${abc:-G { I } K } G { I K } - $ + $ $ abc=hi $ 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 - $ + $ - (all? hpux) read reads too much from pipe (when pipe isn't stdin) print 'hi\nthere' | ksh 8<&0 0< /dev/tty $ read -u8 x @@ -301,7 +302,7 @@ at&t ksh bugs: $ read -u8 y $ print $y there - $ + $ - (all) $ umask 0 $ umask @@ -316,8 +317,8 @@ at&t ksh bugs: $ echo : "$@" # this is ok : $ echo :"$@" # this should print : too (me thinks) - - $ + + $ - (only osf/1) $ set +m $ sleep 1 & # wait for a sec or two @@ -336,13 +337,13 @@ at&t ksh bugs: - (osf/1) POSIX says OPTIND shall be initialized to 1 $ echo $OPTIND 0 - $ + $ - (osf/1 + others?) $ typeset -ri r=10 $ let r=12 $ echo $r 12 - $ + $ - (osf/1 + others?) $ typeset -i a $ typeset -L3 a @@ -357,7 +358,7 @@ at&t ksh bugs: $ x='2^I^J^M ' $ echo "($x)" (^I^J^M) - $ + $ - (osf/1 + others?) $ typeset +i RANDOM Memory fault (core dumped) @@ -370,7 +371,7 @@ at&t ksh bugs: (DEF ) $ typeset | grep ' x$' leftjust 4 x - $ + $ $ typeset -L4 x=def $ echo "($x)" (def ) @@ -379,7 +380,7 @@ at&t ksh bugs: (AB ) $ typeset | grep ' x$' uppercase x - $ + $ $ typeset -i x $ x='2()' $ x='()' @@ -388,7 +389,7 @@ at&t ksh bugs: $ unset foo $ echo "${foo:-"*"}" - $ + $ - (osf/1, others?) $ alias blah blah: alias not found @@ -419,14 +420,14 @@ at&t ksh bugs: bcdef $ echo ${f#abc|a|d} abcdef - $ + $ - (osf/1, hp-ux, others?) $ i() echo hi $ typeset -f function i { hi - $ + $ - (osf/1, others?) $ function X { echo start of X @@ -453,7 +454,7 @@ at&t ksh bugs: echo end of X } } - $ + $ - (osf/1, others?) $ while read x; do print -r "A $x"; done |& [1] 18212 @@ -469,12 +470,12 @@ at&t ksh bugs: ksh: p: bad file unit number $ while read x; do print -r "A $x"; done |& ksh: process already exists - $ + $ - (osf/1, others?) in restricted shells, command -p should not work. $ PATH=/tmp ksh -r - $ print hi | command -p cat -n + $ print hi | command -p cat -n 1 hi - $ + $ - (osf/1, others?) error message wrong for autoload files that don't define functions $ FPATH=/tmp @@ -482,8 +483,8 @@ at&t ksh bugs: $ aja hi there ksh: echo: not found - $ - - (SunOS M-12/28/93d): + $ + - (SunOS M-12/28/93d): $ cat -n << X $( > echo foo > ) @@ -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. @@ -538,7 +539,7 @@ POSIX sh bugs (references are to POSIX 1003.2-1992) Y'` Number of args: 1 1: - $ + $ POSIX would indicate the backslash-newline would be preserved. - does not say how "cat << ''" is to be treated (illegal, read 'til blank line, or read 'til eof). at&t ksh reads til eof, bourne shell diff --git a/README b/README index 48e3fae..a98274e 100644 --- a/README +++ b/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 diff --git a/alloc.c b/alloc.c index 09df76b..e7fc069 100644 --- a/alloc.c +++ b/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, diff --git a/c_ksh.c b/c_ksh.c index d062ef5..b4f95e6 100644 --- a/c_ksh.c +++ b/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) @@ -873,7 +874,7 @@ c_typeset(wp) } return 0; } - + int c_alias(wp) char **wp; @@ -938,7 +939,7 @@ c_alias(wp) return c_unalias((char **) args); } - + if (*wp == NULL) { struct tbl *ap, **p; @@ -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; } diff --git a/c_sh.c b/c_sh.c index 50f9d9c..617fc28 100644 --- a/c_sh.c +++ b/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). */ diff --git a/c_test.c b/c_test.c index 3e57eeb..de2a8b8 100644 --- a/c_test.c +++ b/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 diff --git a/config.h b/config.h index 43ed150..71188a2 100644 --- a/config.h +++ b/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 doesn't define. */ +/* Define to 'int' if 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 doesn't define. */ +/* Define to 'int' if doesn't define. */ /* #undef mode_t */ -/* Define to `long' if doesn't define. */ +/* Define to 'long' if doesn't define. */ /* #undef off_t */ -/* Define to `int' if doesn't define. */ +/* Define to 'int' if 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 do not work properly. */ +/* Define if the 'S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ -/* Define if `sys_siglist' is declared by . */ +/* Define if 'sys_siglist' is declared by . */ #define SYS_SIGLIST_DECLARED 1 /* Define if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 -/* Define to `int' if doesn't define. */ +/* Define to 'int' if 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 */ #define TIME_DECLARED 1 -/* Define to `unsigned' if doesn't define */ +/* Define to 'unsigned' if doesn't define */ /* #undef sigset_t */ /* Define if sys_errlist[] and sys_nerr are in the C library */ diff --git a/configure b/configure index 62b9aba..a6f9e62 100644 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /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 +# Generated automatically using autoconf version 2.13.20020210 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -1016,7 +1016,7 @@ else #ifdef _AIX yes #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then @@ -1105,7 +1105,7 @@ rm -f conftest* #ifdef __EMX__ yes #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then @@ -1122,7 +1122,7 @@ rm -f conftest* #if defined(titan) || defined(_titan) || defined(__titan) YesTitan #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "YesTitan" >/dev/null 2>&1; then @@ -1149,7 +1149,7 @@ int main() { #if defined(__NeXT) || defined(NeXT) this is a NeXT box and the compile should fail #endif - + ; return 0; } EOF if { (eval echo configure:1161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then @@ -1167,7 +1167,7 @@ int main() { #if !defined(__NeXT) && !defined(NeXT) this is NOT a NeXT box and the compile should fail #endif - + ; return 0; } EOF if { (eval echo configure:1179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then @@ -1188,7 +1188,7 @@ rm -f conftest* ;; #( #ifdef __hpux yes #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then @@ -1201,7 +1201,7 @@ rm -f conftest* esac #)) test $ksh_cv_os_type != no && break done - + fi echo "$ac_t""$ksh_cv_os_type" 1>&6 @@ -1264,7 +1264,7 @@ EOF # # Force dirent check to find the right thing. There is a dirent.h # (and a sys/dirent.h) file which compiles, but generates garbage... - # + # ac_cv_header_dirent_dirent_h=no ac_cv_header_dirent_sys_ndir_h=no ac_cv_header_dirent_sys_dir_h=yes @@ -1282,12 +1282,12 @@ EOF #if !defined(SIGINT) || !defined(SIGQUIT) Bad NeXT #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "Bad NeXT" >/dev/null 2>&1; then rm -rf conftest* - { echo "configure: error: + { echo "configure: error: There is a problem on NeXT boxes resulting in a bad siglist.out file being generated (which breaks the trap and kill commands) and probably resulting in many configuration tests not working correctly. @@ -1368,7 +1368,7 @@ EOF fi ;; #( esac #)) - + if test "$program_transform_name" = s,x,x,; then program_transform_name= else @@ -1567,7 +1567,7 @@ else # include # include /* _POSIX_VERSION => HAVE_DIRENT_H test not needed */ #endif - + int main() { ; return 0; } @@ -1591,7 +1591,7 @@ echo "$ac_t""$ksh_cv_header_unistd" 1>&6 EOF fi - + echo $ac_n "checking terminal interface""... $ac_c" 1>&6 echo "configure:1602: checking terminal interface" >&5 if eval "test \"$(echo '$''{'ksh_cv_term_check'+set}')\" = set"; then @@ -1610,7 +1610,7 @@ int main() { (would be good to know if alter versions of ultrix work). #endif /* ultrix */ tcgetattr(0, &t); tcsetattr(0, TCSADRAIN, &t); - + ; return 0; } EOF if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -1635,7 +1635,7 @@ int main() { { struct ltchars ltc; ioctl(0, TIOCGLTC, <c); } # endif /* TIOCGLTC */ #endif /* TIOCGATC */ - + ; return 0; } EOF if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -1697,7 +1697,7 @@ EOF EOF fi - + for ac_hdr in stddef.h stdlib.h string.h memory.h fcntl.h limits.h paths.h \ sys/param.h sys/resource.h values.h ulimit.h sys/time.h do @@ -1733,7 +1733,7 @@ if eval "test \"$(echo '$ac_cv_header_'$ac_safe)\" = yes"; then cat >> confdefs.h <&6 fi @@ -1851,7 +1851,7 @@ if eval "test \"$(echo '$ac_cv_header_'$ac_safe)\" = yes"; then cat >> confdefs.h <&6 fi @@ -1871,7 +1871,7 @@ else #include #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])off_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -1892,7 +1892,7 @@ echo "$ac_t""$ac_cv_type_off_t" 1>&6 EOF fi - + echo $ac_n "checking for mode_t in sys/types.h""... $ac_c" 1>&6 echo "configure:1903: checking for mode_t in sys/types.h" >&5 if eval "test \"$(echo '$''{'ac_cv_type_mode_t'+set}')\" = set"; then @@ -1906,7 +1906,7 @@ else #include #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])mode_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -1927,7 +1927,7 @@ echo "$ac_t""$ac_cv_type_mode_t" 1>&6 EOF fi - + echo $ac_n "checking for pid_t in sys/types.h""... $ac_c" 1>&6 echo "configure:1938: checking for pid_t in sys/types.h" >&5 if eval "test \"$(echo '$''{'ac_cv_type_pid_t'+set}')\" = set"; then @@ -1941,7 +1941,7 @@ else #include #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])pid_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -1962,7 +1962,7 @@ echo "$ac_t""$ac_cv_type_pid_t" 1>&6 EOF fi - + echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 echo "configure:1973: checking for uid_t in sys/types.h" >&5 if eval "test \"$(echo '$''{'ac_cv_type_uid_t'+set}')\" = set"; then @@ -1976,7 +1976,7 @@ else #include #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])uid_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -1997,7 +1997,7 @@ echo "$ac_t""$ac_cv_type_uid_t" 1>&6 EOF fi - + if test $ac_cv_type_uid_t = no; then cat >> confdefs.h <<\EOF #define gid_t int @@ -2143,8 +2143,8 @@ else #include #endif /* HAVE_SYS_TIME_H */ #include - - + + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])clock_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -2165,7 +2165,7 @@ echo "$ac_t""$ac_cv_type_clock_t" 1>&6 EOF fi - + echo $ac_n "checking for sigset_t in and ""... $ac_c" 1>&6 echo "configure:2176: checking for sigset_t in and " >&5 if eval "test \"$(echo '$''{'ac_cv_type_sigset_t'+set}')\" = set"; then @@ -2179,7 +2179,7 @@ else #include #endif #include - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])sigset_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -2200,7 +2200,7 @@ echo "$ac_t""$ac_cv_type_sigset_t" 1>&6 EOF fi - + echo $ac_n "checking for rlim_t in and ""... $ac_c" 1>&6 echo "configure:2211: checking for rlim_t in and " >&5 if eval "test \"$(echo '$''{'ac_cv_type_rlim_t'+set}')\" = set"; then @@ -2216,7 +2216,7 @@ else #ifdef HAVE_SYS_RESOURCE_H #include #endif - + EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z0-9_])rlim_t([^a-zA-Z0-9_]|\$)" >/dev/null 2>&1; then @@ -2240,7 +2240,7 @@ echo "configure:2242: checking what to set rlim_t to" >&5 else if test "$cross_compiling" = yes; then { echo "configure: error: cannot determine type for rlimt_t when cross compiling" 1>&2; exit 1; } - + else cat > conftest.$ac_ext < conftest.$ac_ext </dev/null; then @@ -2276,7 +2276,7 @@ fi EOF fi - + echo $ac_n "checking for working memmove""... $ac_c" 1>&6 echo "configure:2287: checking for working memmove" >&5 if eval "test \"$(echo '$''{'ksh_cv_func_memmove'+set}')\" = set"; then @@ -2381,7 +2381,7 @@ EOF fi fi - + echo $ac_n "checking for memset""... $ac_c" 1>&6 echo "configure:2392: checking for memset" >&5 if eval "test \"$(echo '$''{'ksh_cv_func_memset'+set}')\" = set"; then @@ -2399,7 +2399,7 @@ else #ifdef HAVE_MEMORY_H # include #endif - + int main() { char buf[16]; memset(buf, 'x', 7); printf("%7s", buf); @@ -2424,7 +2424,7 @@ echo "$ac_t""$ksh_cv_func_memset" 1>&6 EOF fi - + for ac_func in confstr dup2 flock getcwd getwd killpg mkstemp nice \ setrlimit strerror strcasecmp strstr sysconf tcsetpgrp \ ulimit waitpid wait3 @@ -2476,7 +2476,7 @@ if eval "test \"$(echo '$ac_cv_func_'$ac_func)\" = yes"; then cat >> confdefs.h <&6 fi @@ -2586,7 +2586,7 @@ if eval "test \"$(echo '$ac_cv_func_'$ac_func)\" = yes"; then cat >> confdefs.h <&6 fi @@ -2703,12 +2703,12 @@ else #include #include - + int main() { struct stat statb; lstat("/", &statb); - + ; return 0; } EOF if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -2741,7 +2741,7 @@ else #include "confdefs.h" #include int main() { -char *msg = *(sys_errlist + 1); if (msg && *msg) return 12; +char *msg = *(sys_errlist + 1); if (msg && *msg) return 12; ; return 0; } EOF if { (eval echo configure:2753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then @@ -2783,7 +2783,7 @@ int main() { char *p; p = sys_errlist[sys_nerr - 1]; if (p) return 12; - + ; return 0; } EOF if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -2806,7 +2806,7 @@ EOF fi fi - + echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 echo "configure:2817: checking for sys_siglist declaration in signal.h or unistd.h" >&5 if eval "test \"$(echo '$''{'ac_cv_decl_sys_siglist'+set}')\" = set"; then @@ -2866,7 +2866,7 @@ int main() { char *p = sys_siglist[2]; if (p) return 12; - + ; return 0; } EOF if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -2889,7 +2889,7 @@ EOF fi fi - + echo $ac_n "checking time() declaration in time.h""... $ac_c" 1>&6 echo "configure:2900: checking time() declaration in time.h" >&5 if eval "test \"$(echo '$''{'ksh_cv_time_delcared'+set}')\" = set"; then @@ -2923,7 +2923,7 @@ echo "$ac_t""$ksh_cv_time_delcared" 1>&6 EOF fi - + echo $ac_n "checking if times() is present/working""... $ac_c" 1>&6 echo "configure:2934: checking if times() is present/working" >&5 if eval "test \"$(echo '$''{'ksh_cv_func_times_ok'+set}')\" = set"; then @@ -2931,7 +2931,7 @@ if eval "test \"$(echo '$''{'ksh_cv_func_times_ok'+set}')\" = set"; then else if test "$cross_compiling" = yes; then { echo "configure: error: cannot determine if times works when cross compiling" 1>&2; exit 1; } - + else cat > conftest.$ac_ext < conftest.$ac_ext </dev/null; then @@ -3026,14 +3026,14 @@ if eval "test \"$(echo '$ac_cv_func_'$ac_func)\" = yes"; then cat >> confdefs.h <&6 fi done fi - + echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 echo "configure:3044: checking whether stat file-mode macros are broken" >&5 if eval "test \"$(echo '$''{'ac_cv_header_stat_broken'+set}')\" = set"; then @@ -3200,7 +3200,7 @@ fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF -#define const +#define const EOF fi @@ -3217,7 +3217,7 @@ else void foo() { } /* Some compilers (old pcc ones) like "void *a;", but a can't be used */ void *bar(a) void *a; { int *b = (int *) a; *b = 1; return a; } - + int main() { ; return 0; } @@ -3243,7 +3243,7 @@ echo "$ac_t""$ksh_cv_c_void" 1>&6 EOF fi - + echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 echo "configure:3254: checking if compiler understands volatile" >&5 if eval "test \"$(echo '$''{'ksh_cv_c_volatile'+set}')\" = set"; then @@ -3276,11 +3276,11 @@ echo "$ac_t""$ksh_cv_c_volatile" 1>&6 : else cat >> confdefs.h <<\EOF -#define volatile +#define volatile EOF fi - + echo $ac_n "checking if compiler understands prototypes""... $ac_c" 1>&6 echo "configure:3291: checking if compiler understands prototypes" >&5 if eval "test \"$(echo '$''{'ksh_cv_c_prototypes'+set}')\" = set"; then @@ -3296,7 +3296,7 @@ int bar(int a, char b, char *c); int bar(a, b, c) int a; char b; char *c; { foo("%d%c%s\n", a, b, c); return a + b + *c; } void foo(char *fmt, ...) { va_list a; va_start(a, fmt); va_end(a); } - + int main() { ; return 0; } @@ -3320,7 +3320,7 @@ echo "$ac_t""$ksh_cv_c_prototypes" 1>&6 EOF fi - + echo $ac_n "checking if C compiler groks __attribute__((.. ))""... $ac_c" 1>&6 echo "configure:3331: checking if C compiler groks __attribute__((.. ))" >&5 if eval "test \"$(echo '$''{'ksh_cv_c_func_attr'+set}')\" = set"; then @@ -3339,9 +3339,9 @@ void test_nr() __attribute__((noreturn)); void test_nr() { exit(1); } void test_uk() __attribute__((blah)); void test_uk() { return; } - + int main() { -test_nr("%d", 10); test_cnst(2); test_uk(); test_nr(); +test_nr("%d", 10); test_cnst(2); test_uk(); test_nr(); ; return 0; } EOF if { (eval echo configure:3353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then @@ -3363,7 +3363,7 @@ echo "$ac_t""$ksh_cv_c_func_attr" 1>&6 EOF fi - + # Pull the hash mark out of the macro call to avoid m4 problems. ac_msg="whether #! works in shell scripts" echo $ac_n "checking $ac_msg""... $ac_c" 1>&6 @@ -3432,7 +3432,7 @@ main() exit(2); exit(fcntl(fd2, F_GETFD, 0) == 0 ? 0 : 3); } - + EOF eval $ac_link if test -s conftest$ac_exe_suffix && (./conftest; exit) 2>/dev/null; then @@ -3451,7 +3451,7 @@ echo "$ac_t""$ksh_cv_dup2_clexec_ok" 1>&6 EOF fi - + echo $ac_n "checking flavour of signal routines""... $ac_c" 1>&6 echo "configure:3462: checking flavour of signal routines" >&5 if eval "test \"$(echo '$''{'ksh_cv_signal_check'+set}')\" = set"; then @@ -3468,7 +3468,7 @@ int main() { sigemptyset(&ss); sigsuspend(&ss); sigaction(SIGINT, &sa, (struct sigaction *) 0); sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); - + ; return 0; } EOF if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -3486,7 +3486,7 @@ int main() { int mask = sigmask(SIGINT); sigsetmask(mask); sigblock(mask); sigpause(mask); - + ; return 0; } EOF if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -3506,7 +3506,7 @@ int main() { int mask = sigmask(SIGINT); sigset(SIGINT, foo); sigrelse(SIGINT); sighold(SIGINT); sigpause(SIGINT); - + ; return 0; } EOF if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -3553,7 +3553,7 @@ if eval "test \"$(echo '$''{'ksh_cv_signals_interrupt'+set}')\" = set"; then else if test "$cross_compiling" = yes; then { echo "configure: error: cannot determine if signals interrupt read() when cross compiling" 1>&2; exit 1; } - + else cat > conftest.$ac_ext < conftest.$ac_ext </dev/null; then @@ -3677,7 +3677,7 @@ EOF fi fi - + echo $ac_n "checking flavour of pgrp routines""... $ac_c" 1>&6 echo "configure:3688: checking flavour of pgrp routines" >&5 if eval "test \"$(echo '$''{'ksh_cv_pgrp_check'+set}')\" = set"; then @@ -3712,7 +3712,7 @@ cat > conftest.$ac_ext </dev/null; then @@ -3753,7 +3753,7 @@ cat > conftest.$ac_ext </dev/null; then @@ -3789,7 +3789,7 @@ cat > conftest.$ac_ext </dev/null; then @@ -3829,7 +3829,7 @@ EOF EOF fi - + if test $ksh_cv_pgrp_check = bsd || test $ksh_cv_pgrp_check = posix ; then echo $ac_n "checking if process group synchronization is required""... $ac_c" 1>&6 echo "configure:3841: checking if process group synchronization is required" >&5 @@ -3883,7 +3883,7 @@ cat > conftest.$ac_ext </dev/null; then @@ -3903,7 +3903,7 @@ EOF fi fi - + echo $ac_n "checking if opendir() fails to open non-directories""... $ac_c" 1>&6 echo "configure:3914: checking if opendir() fails to open non-directories" >&5 if eval "test \"$(echo '$''{'ksh_cv_opendir_ok'+set}')\" = set"; then @@ -3952,7 +3952,7 @@ cat > conftest.$ac_ext </dev/null; then @@ -3971,7 +3971,7 @@ echo "$ac_t""$ksh_cv_opendir_ok" 1>&6 EOF fi - + echo $ac_n "checking if you have /dev/fd/n""... $ac_c" 1>&6 echo "configure:3982: checking if you have /dev/fd/n" >&5 if eval "test \"$(echo '$''{'ksh_cv_dev_fd'+set}')\" = set"; then @@ -4008,7 +4008,7 @@ cat > conftest.$ac_ext </dev/null; then @@ -4027,7 +4027,7 @@ echo "$ac_t""$ksh_cv_dev_fd" 1>&6 EOF fi - + ac_clean_files="$ac_clean_files a.out" trap '' 1 2 15 cat > confcache <<\EOF diff --git a/edit.c b/edit.c index 74f0600..a6923b7 100644 --- a/edit.c +++ b/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) @@ -108,7 +108,7 @@ check_sigwinch ARGS((void)) if (ws.ws_col) { x_cols = ws.ws_col < MIN_COLS ? MIN_COLS : ws.ws_col; - + if ((vp = typeset("COLUMNS", 0, 0, 0, 0))) setint(vp, (long) ws.ws_col); } @@ -211,7 +211,7 @@ x_mode(onoff) if (onoff) { TTY_state cb; X_chars oldchars; - + oldchars = edchars; cb = tty_state; @@ -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) diff --git a/expr.c b/expr.c index e61372f..4289abb 100644 --- a/expr.c +++ b/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; diff --git a/history.c b/history.c index dc1448a..b394b63 100644 --- a/history.c +++ b/history.c @@ -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 * diff --git a/jobs.c b/jobs.c index 641a28c..2eec63a 100644 --- a/jobs.c +++ b/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 diff --git a/lex.c b/lex.c index 53e72b5..6447836 100644 --- a/lex.c +++ b/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 $ */ /* @@ -126,7 +127,7 @@ yylex(cf) #ifdef KSH else if (cf&LETEXPR) { *wp++ = OQUOTE; /* enclose arguments in (double) quotes */ - state = SLETPAREN; + state = SLETPAREN; statep->ls_sletparen.nparen = 0; } #endif /* KSH */ @@ -467,7 +468,7 @@ yylex(cf) statep->ls_scsparen.csstate = 0; state = statep->ls_state = SCSPAREN; - + } } } @@ -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); } diff --git a/main.c b/main.c index 4262fea..f8700cf 100644 --- a/main.c +++ b/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()) diff --git a/misc.c b/misc.c index 6c735ce..85ca8d2 100644 --- a/misc.c +++ b/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) diff --git a/shf.c b/shf.c index 2947858..361a3b9 100644 --- a/shf.c +++ b/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)) { diff --git a/syn.c b/syn.c index 5cb6831..9ce436a 100644 --- a/syn.c +++ b/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 diff --git a/var.c b/var.c index 8d3eacb..dc2577b 100644 --- a/var.c +++ b/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: