Changeset 1216 in kBuild for trunk/src/kash
- Timestamp:
- Oct 7, 2007 9:15:21 PM (17 years ago)
- Location:
- trunk/src/kash
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/eval.c
r1214 r1216 1254 1254 timescmd(shinstance *psh, int argc, char **argv) 1255 1255 { 1256 s truct sh_tms tms;1256 shtms tms; 1257 1257 int u, s, cu, cs; 1258 1258 char us[8], ss[8], cus[8], css[8]; … … 1260 1260 nextopt(psh, ""); 1261 1261 1262 sh_times( &tms);1262 sh_times(psh, &tms); 1263 1263 1264 1264 u = conv_time(tms.tms_utime, us, sizeof(us)); -
trunk/src/kash/exec.c
r1214 r1216 200 200 } while (errno == EINTR); 201 201 #else 202 sh_execve(psh, cmd, argv,envp);202 sh_execve(psh, cmd, (const char * const*)argv, (const char * const*)envp); 203 203 #endif 204 204 e = errno; -
trunk/src/kash/jobs.c
r1214 r1216 49 49 #if JOBS 50 50 # include <termios.h> 51 # undef CEOF /* syntax.h redefines this */52 51 #endif 53 52 #include "redir.h" -
trunk/src/kash/jobs.h
r879 r1216 93 93 int waitcmd(struct shinstance *, int, char **); 94 94 int jobidcmd(struct shinstance *, int, char **); 95 union node; 95 96 struct job *makejob(struct shinstance *, union node *, int); 96 97 int forkshell(struct shinstance *, struct job *, union node *, int); -
trunk/src/kash/main.c
r1214 r1216 38 38 The Regents of the University of California. All rights reserved.\n"); 39 39 #endif /* not lint */ 40 41 40 #ifndef lint 42 41 static char sccsid[] = "@(#)main.c 8.7 (Berkeley) 7/19/95"; … … 44 43 __RCSID("$NetBSD: main.c,v 1.48 2003/09/14 12:09:29 jmmv Exp $"); 45 44 #endif /* not lint */ 46 47 45 #endif 48 46 -
trunk/src/kash/main.h
r879 r1216 35 35 */ 36 36 37 #include "shtypes.h" 37 38 /*extern int rootpid;*/ /* pid of main shell */ 38 39 /*extern int rootshell;*/ /* true if we aren't a child of the main shell */ -
trunk/src/kash/mkbuiltins
r819 r1216 66 66 */ 67 67 68 #ifdef HAVE_SYS_CDEFS_H 69 #include <sys/cdefs.h> 70 #endif 68 #include "shtypes.h" 71 69 72 70 struct builtincmd { 73 71 const char *name; 74 int (*builtin)( int, char **);72 int (*builtin)(shinstance *, int, char **); 75 73 }; 76 74 … … 107 105 shift 108 106 } 109 echo 'int '"$func"'( int, char **);' >&4107 echo 'int '"$func"'(shinstance *, int, char **);' >&4 110 108 while 111 109 [ $# != 0 -a "$1" != '#' ] -
trunk/src/kash/output.h
r1214 r1216 67 67 void freestdout(struct shinstance *); 68 68 void outfmt(struct output *, const char *, ...) 69 __attribute__((__format__(__printf__, 3,4)));69 __attribute__((__format__(__printf__,2,3))); 70 70 void out1fmt(struct shinstance *, const char *, ...) 71 71 __attribute__((__format__(__printf__,2,3))); -
trunk/src/kash/parser.c
r1214 r1216 1111 1111 PARSEBACKQOLD(); 1112 1112 break; 1113 case C EOF:1113 case CSHEOF: 1114 1114 goto endword; /* exit outer loop */ 1115 1115 default: -
trunk/src/kash/shell.h
r1214 r1216 88 88 #endif 89 89 90 #include "shtypes.h" 91 90 92 #endif -
trunk/src/kash/shinstance.h
r1214 r1216 120 120 * running in a thread and not a separate process. 121 121 */ 122 typedefstruct shinstance122 struct shinstance 123 123 { 124 124 struct shinstance *next; /**< The next shell instance. */ … … 324 324 struct t_op const *t_wp_op; 325 325 326 } shinstance;326 }; 327 327 328 328 … … 376 376 #include <time.h> 377 377 #ifdef _MSC_VER 378 typedef struct sh _tms378 typedef struct shtms 379 379 { 380 380 clock_t tms_utime; … … 382 382 clock_t tms_cutime; 383 383 clock_t tms_cstime; 384 } sh _tms;384 } shtms; 385 385 #else 386 386 # include <sys/times.h> 387 # include <times.h> 388 typedef struct tms sh_tms; 389 #endif 390 clock_t sh_times(sh_tms *); 387 typedef struct tms shtms; 388 #endif 389 clock_t sh_times(shinstance *, shtms *); 391 390 int sh_sysconf_clk_tck(void); 392 391 -
trunk/src/kash/syntax.c
r1214 r1216 8 8 #ifdef _MSC_VER /* doesn't implement the fancy initializers I think... */ 9 9 10 char basesyntax[257] = {C EOF};11 char dqsyntax[257] = {C EOF};12 char sqsyntax[257] = {C EOF};13 char arisyntax[257] = {C EOF};10 char basesyntax[257] = {CSHEOF}; 11 char dqsyntax[257] = {CSHEOF}; 12 char sqsyntax[257] = {CSHEOF}; 13 char arisyntax[257] = {CSHEOF}; 14 14 char is_type[257] = {0}; 15 15 … … 114 114 115 115 /* syntax table used when not in quotes */ 116 const char basesyntax[257] = { C EOF,116 const char basesyntax[257] = { CSHEOF, 117 117 set_range(CTL_FIRST, CTL_LAST, CCTL) 118 118 set('\n', CNL) … … 135 135 136 136 /* syntax table used when in double quotes */ 137 const char dqsyntax[257] = { C EOF,137 const char dqsyntax[257] = { CSHEOF, 138 138 set_range(CTL_FIRST, CTL_LAST, CCTL) 139 139 set('\n', CNL) … … 156 156 157 157 /* syntax table used when in single quotes */ 158 const char sqsyntax[257] = { C EOF,158 const char sqsyntax[257] = { CSHEOF, 159 159 set_range(CTL_FIRST, CTL_LAST, CCTL) 160 160 set('\n', CNL) … … 173 173 174 174 /* syntax table used when in arithmetic */ 175 const char arisyntax[257] = { C EOF,175 const char arisyntax[257] = { CSHEOF, 176 176 set_range(CTL_FIRST, CTL_LAST, CCTL) 177 177 set('\n', CNL) -
trunk/src/kash/syntax.h
r809 r1216 33 33 */ 34 34 35 #ifdef HAVE_SYS_CDEFS_H36 #include <sys/cdefs.h>37 #endif38 35 #include <ctype.h> 39 36 … … 49 46 #define CLP 8 /* a left paren in arithmetic */ 50 47 #define CRP 9 /* a right paren in arithmetic */ 51 #define C EOF 10/* end of file */48 #define CSHEOF 10 /* end of file */ 52 49 #define CCTL 11 /* like CWORD, except it must be escaped */ 53 50 #define CSPCL 12 /* these terminate a word */
Note:
See TracChangeset
for help on using the changeset viewer.