Changeset 809 for trunk/src/ash
- Timestamp:
- Jan 29, 2007, 6:54:36 AM (19 years ago)
- Location:
- trunk/src/ash
- Files:
-
- 30 edited
-
Makefile.kmk (modified) (2 diffs)
-
alias.c (modified) (1 diff)
-
arith.y (modified) (1 diff)
-
arith_lex.l (modified) (1 diff)
-
bltin/kill.c (modified) (2 diffs)
-
bltin/test.c (modified) (2 diffs)
-
cd.c (modified) (1 diff)
-
error.c (modified) (1 diff)
-
eval.c (modified) (4 diffs)
-
exec.c (modified) (1 diff)
-
expand.c (modified) (7 diffs)
-
histedit.c (modified) (3 diffs)
-
input.c (modified) (2 diffs)
-
jobs.c (modified) (3 diffs)
-
mail.c (modified) (1 diff)
-
main.c (modified) (3 diffs)
-
memalloc.c (modified) (2 diffs)
-
miscbltin.c (modified) (1 diff)
-
mkbuiltins (modified) (2 diffs)
-
mystring.c (modified) (1 diff)
-
options.c (modified) (1 diff)
-
output.c (modified) (1 diff)
-
parser.c (modified) (3 diffs)
-
redir.c (modified) (1 diff)
-
shell.h (modified) (1 diff)
-
show.c (modified) (1 diff)
-
syntax.c (modified) (1 diff)
-
syntax.h (modified) (2 diffs)
-
trap.c (modified) (7 diffs)
-
var.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/Makefile.kmk
r785 r809 16 16 kmk_ash_DEFS = lint SHELL SMALL 17 17 kmk_ash_DEFS.linux = BSD 18 kmk_ash_DEFS.solaris = BSD 18 19 kmk_ash_DEFS.win = \ 19 20 BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS … … 67 68 win/err.c \ 68 69 win/dirent.c \ 70 sys_signame.c \ 71 strlcpy.c \ 72 setmode.c 73 kmk_ash_SOURCES.solaris = \ 69 74 sys_signame.c \ 70 75 strlcpy.c \ -
trunk/src/ash/alias.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/arith.y
r626 r809 34 34 */ 35 35 36 #ifdef HAVE_SYS_CDEFS_H 36 37 #include <sys/cdefs.h> 38 #endif 37 39 #ifndef lint 38 40 #if 0 -
trunk/src/ash/arith_lex.l
r626 r809 35 35 */ 36 36 37 #ifdef HAVE_SYS_CDEFS_H 37 38 #include <sys/cdefs.h> 39 #endif 38 40 #ifndef lint 39 41 #if 0 -
trunk/src/ash/bltin/kill.c
r632 r809 30 30 */ 31 31 32 #ifndef __sun__ 32 33 #include <sys/cdefs.h> 34 #endif 33 35 #if !defined(lint) && !defined(SHELL) 34 36 __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\n\ … … 45 47 46 48 #include <ctype.h> 49 #ifndef __sun__ 47 50 #include <err.h> 51 #endif 48 52 #include <errno.h> 49 53 #include <signal.h> -
trunk/src/ash/bltin/test.c
r632 r809 11 11 */ 12 12 13 #ifndef __sun__ 13 14 #include <sys/cdefs.h> 15 #endif 14 16 #ifndef lint 15 17 __RCSID("$NetBSD: test.c,v 1.26 2005/02/10 06:56:55 simonb Exp $"); … … 20 22 21 23 #include <ctype.h> 24 #ifndef __sun__ 22 25 #include <err.h> 26 #endif 23 27 #include <errno.h> 24 28 #include <stdio.h> -
trunk/src/ash/cd.c
r626 r809 33 33 */ 34 34 35 #ifndef __sun__ 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/error.c
r632 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/eval.c
r629 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 53 55 #ifdef HAVE_SYSCTL_H 54 56 #include <sys/sysctl.h> 57 #endif 58 #ifdef __sun__ 59 #include <iso/limits_iso.h> 55 60 #endif 56 61 … … 609 614 static char *sys_path = NULL; 610 615 static int mib[] = {CTL_USER, USER_CS_PATH}; 611 #endif 616 #endif 612 617 #ifdef PC_PATH_SEP 613 618 static char def_path[] = "PATH=/usr/bin;/bin;/usr/sbin;/sbin"; … … 632 637 #else 633 638 return def_path; 634 #endif 639 #endif 635 640 } 636 641 -
trunk/src/ash/exec.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/expand.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 51 53 #include <stdlib.h> 52 54 #include <stdio.h> 55 #ifdef __sun__ 56 #include <iso/limits_iso.h> 57 #endif 53 58 54 59 /* … … 101 106 STATIC void varvalue(char *, int, int, int); 102 107 STATIC void recordregion(int, int, int); 103 STATIC void removerecordregions(int); 108 STATIC void removerecordregions(int); 104 109 STATIC void ifsbreakup(char *, struct arglist *); 105 110 STATIC void ifsfree(void); … … 305 310 306 311 307 STATIC void 312 STATIC void 308 313 removerecordregions(int endoff) 309 314 { … … 328 333 return; 329 334 } 330 335 331 336 ifslastp = &ifsfirst; 332 337 while (ifslastp->next && ifslastp->next->begoff < endoff) … … 562 567 loc--; 563 568 if ((varflags & VSQUOTE) && loc > startp && 564 *(loc - 1) == CTLESC) { 569 *(loc - 1) == CTLESC) { 565 570 for (q = startp; q < loc; q++) 566 571 if (*q == CTLESC) … … 740 745 if (subevalvar(p, var, 0, subtype, startloc, varflags)) { 741 746 varflags &= ~VSNUL; 742 /* 743 * Remove any recorded regions beyond 744 * start of variable 747 /* 748 * Remove any recorded regions beyond 749 * start of variable 745 750 */ 746 751 removerecordregions(startloc); -
trunk/src/ash/histedit.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 43 45 44 46 #include <sys/param.h> 47 #ifndef __sun__ 45 48 #include <paths.h> 49 #endif 46 50 #include <stdio.h> 47 51 #include <stdlib.h> … … 154 158 else if (Eflag) 155 159 el_set(el, EL_EDITOR, "emacs"); 156 el_set(el, EL_BIND, "^I", 160 el_set(el, EL_BIND, "^I", 157 161 tabcomplete ? "rl-complete" : "ed-insert", NULL); 158 162 el_source(el, NULL); -
trunk/src/ash/input.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 48 50 #include <stdlib.h> 49 51 #include <string.h> 52 #ifdef __sun__ 53 #include <iso/limits_iso.h> 54 #endif 50 55 51 56 /* -
trunk/src/ash/jobs.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #else 38 #define _PATH_DEVNULL "/dev/null" 39 #endif 36 40 #ifndef lint 37 41 #if 0 … … 43 47 44 48 #include <fcntl.h> 49 #ifdef __sun__ 50 #define sys_siglist _sys_siglist 51 #endif 45 52 #include <signal.h> 46 53 #include <errno.h> 47 54 #include <unistd.h> 48 55 #include <stdlib.h> 56 #ifndef __sun__ 49 57 #include <paths.h> 58 #endif 50 59 #include <sys/types.h> 51 60 #include <sys/param.h> 52 #if def BSD61 #if defined(BSD) || defined(__sun__) 53 62 #include <sys/wait.h> 54 63 #include <sys/time.h> … … 688 697 int i; 689 698 const char *err_msg = "No such job: %s"; 690 699 691 700 if (name == NULL) { 692 701 #if JOBS -
trunk/src/ash/mail.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/main.c
r638 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\ … … 179 181 init_syntax(); 180 182 } 181 #endif 183 #endif 182 184 init(); 183 185 setstackmark(&smark); … … 202 204 if (sflag == 0 || minusc) { 203 205 static int sigs[] = { 204 SIGINT, SIGQUIT, SIGHUP, 206 SIGINT, SIGQUIT, SIGHUP, 205 207 #ifdef SIGTSTP 206 208 SIGTSTP, -
trunk/src/ash/memalloc.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 224 226 /* 225 227 * Stack marks pointing to the start of the old block 226 * must be relocated to point to the new block 228 * must be relocated to point to the new block 227 229 */ 228 230 xmark = markp; -
trunk/src/ash/miscbltin.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/mkbuiltins
r629 r809 1 #!/bin/sh - 1 #!/bin/sh -x 2 2 # $NetBSD: mkbuiltins,v 1.21 2004/06/06 07:03:11 christos Exp $ 3 3 # … … 66 66 */ 67 67 68 #ifdef HAVE_SYS_CDEFS_H 68 69 #include <sys/cdefs.h> 70 #endif 69 71 70 72 struct builtincmd { -
trunk/src/ash/mystring.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/options.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/output.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/parser.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 43 45 44 46 #include <stdlib.h> 47 #ifdef __sun__ 48 #include <iso/limits_iso.h> 49 #endif 45 50 46 51 #include "shell.h" … … 746 751 if (**pp == *wordtext && equal(*pp, wordtext)) 747 752 { 748 lasttoken = t = pp - 753 lasttoken = t = pp - 749 754 parsekwd + KWDOFFSET; 750 755 TRACE(("keyword %s recognized\n", tokname[t])); -
trunk/src/ash/redir.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/shell.h
r626 r809 70 70 #define MKINIT /* empty */ 71 71 72 #ifdef HAVE_SYS_CDEFS_H 72 73 #include <sys/cdefs.h> 74 #endif 73 75 74 76 extern char nullstr[1]; /* null string */ -
trunk/src/ash/show.c
r626 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 -
trunk/src/ash/syntax.c
r638 r809 1 1 /* $NetBSD: syntax.c,v 1.1 2004/01/17 17:38:12 dsl Exp $ */ 2 3 #ifdef __sun__ 4 #include <stdio.h> 5 #include <iso/limits_iso.h> 6 #endif 2 7 3 8 #include "shell.h" -
trunk/src/ash/syntax.h
r638 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #include <ctype.h> 37 39 … … 89 91 extern const char arisyntax[]; 90 92 extern const char is_type[]; 91 #endif 93 #endif -
trunk/src/ash/trap.c
r630 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 64 66 extern void init_sys_signame(void); 65 67 extern char sys_signame[NSIG][16]; 66 #endif 68 #endif 67 69 68 70 /* … … 84 86 int pendingsigs; /* indicates some signal received */ 85 87 88 #ifdef __sun__ 89 typedef void (*sig_t) (int); 90 #endif 86 91 static int getsigaction(int, sig_t *); 87 92 … … 101 106 if (strcasecmp(p, "exit") == 0 ) 102 107 return 0; 103 108 104 109 if (strncasecmp(p, "sig", 3) == 0) 105 110 p += 3; … … 107 112 #ifndef HAVE_SYS_SIGNAME 108 113 init_sys_signame(); 109 #endif 114 #endif 110 115 for (i = 0; i < NSIG; ++i) 111 116 if (strcasecmp (p, sys_signame[i]) == 0) … … 125 130 #ifndef HAVE_SYS_SIGNAME 126 131 init_sys_signame(); 127 #endif 132 #endif 128 133 129 134 for (n = 1; n < NSIG; n++) { … … 148 153 #ifndef HAVE_SYS_SIGNAME 149 154 init_sys_signame(); 150 #endif 155 #endif 151 156 152 157 if (argc <= 1) { -
trunk/src/ash/var.c
r637 r809 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H 35 36 #include <sys/cdefs.h> 37 #endif 36 38 #ifndef lint 37 39 #if 0 … … 45 47 #include <stdlib.h> 46 48 #include <strings.h> 49 #ifndef __sun__ 47 50 #include <paths.h> 51 #else 52 #define _PATH_DEFPATH "/usr/bin:/usr/sbin" 53 #include <iso/limits_iso.h> 54 #endif 48 55 49 56 #ifdef PC_OS2_LIBPATHS … … 123 130 #ifdef _MSC_VER 124 131 struct var vpath2; 125 #endif 132 #endif 126 133 struct var vps1; 127 134 struct var vps2; … … 155 162 { &vpath2, VSTRFIXED|VTEXTFIXED, "Path=", 156 163 changepath }, 157 #endif 164 #endif 158 165 /* 159 166 * vps1 depends on uid
Note:
See TracChangeset
for help on using the changeset viewer.
