VirtualBox

Changeset 1216 in kBuild for trunk/src/kash


Ignore:
Timestamp:
Oct 7, 2007 9:15:21 PM (17 years ago)
Author:
bird
Message:

more fixes.

Location:
trunk/src/kash
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/eval.c

    r1214 r1216  
    12541254timescmd(shinstance *psh, int argc, char **argv)
    12551255{
    1256         struct sh_tms tms;
     1256        shtms tms;
    12571257        int u, s, cu, cs;
    12581258        char us[8], ss[8], cus[8], css[8];
     
    12601260        nextopt(psh, "");
    12611261
    1262         sh_times(&tms);
     1262        sh_times(psh, &tms);
    12631263
    12641264        u = conv_time(tms.tms_utime, us, sizeof(us));
  • trunk/src/kash/exec.c

    r1214 r1216  
    200200        } while (errno == EINTR);
    201201#else
    202         sh_execve(psh, cmd, argv, envp);
     202        sh_execve(psh, cmd, (const char * const*)argv, (const char * const*)envp);
    203203#endif
    204204        e = errno;
  • trunk/src/kash/jobs.c

    r1214 r1216  
    4949#if JOBS
    5050# include <termios.h>
    51 # undef CEOF                    /* syntax.h redefines this */
    5251#endif
    5352#include "redir.h"
  • trunk/src/kash/jobs.h

    r879 r1216  
    9393int waitcmd(struct shinstance *, int, char **);
    9494int jobidcmd(struct shinstance *, int, char **);
     95union node;
    9596struct job *makejob(struct shinstance *, union node *, int);
    9697int forkshell(struct shinstance *, struct job *, union node *, int);
  • trunk/src/kash/main.c

    r1214 r1216  
    3838        The Regents of the University of California.  All rights reserved.\n");
    3939#endif /* not lint */
    40 
    4140#ifndef lint
    4241static char sccsid[] = "@(#)main.c      8.7 (Berkeley) 7/19/95";
     
    4443__RCSID("$NetBSD: main.c,v 1.48 2003/09/14 12:09:29 jmmv Exp $");
    4544#endif /* not lint */
    46 
    4745#endif
    4846
  • trunk/src/kash/main.h

    r879 r1216  
    3535 */
    3636
     37#include "shtypes.h"
    3738/*extern int rootpid;*/ /* pid of main shell */
    3839/*extern int rootshell;*/       /* true if we aren't a child of the main shell */
  • trunk/src/kash/mkbuiltins

    r819 r1216  
    6666 */
    6767
    68 #ifdef HAVE_SYS_CDEFS_H
    69 #include <sys/cdefs.h>
    70 #endif
     68#include "shtypes.h"
    7169
    7270struct builtincmd {
    7371      const char *name;
    74       int (*builtin)(int, char **);
     72      int (*builtin)(shinstance *, int, char **);
    7573};
    7674
     
    107105                shift
    108106        }
    109         echo 'int '"$func"'(int, char **);' >&4
     107        echo 'int '"$func"'(shinstance *, int, char **);' >&4
    110108        while
    111109                [ $# != 0 -a "$1" != '#' ]
  • trunk/src/kash/output.h

    r1214 r1216  
    6767void freestdout(struct shinstance *);
    6868void outfmt(struct output *, const char *, ...)
    69     __attribute__((__format__(__printf__,3,4)));
     69    __attribute__((__format__(__printf__,2,3)));
    7070void out1fmt(struct shinstance *, const char *, ...)
    7171    __attribute__((__format__(__printf__,2,3)));
  • trunk/src/kash/parser.c

    r1214 r1216  
    11111111                                PARSEBACKQOLD();
    11121112                                break;
    1113                         case CEOF:
     1113                        case CSHEOF:
    11141114                                goto endword;           /* exit outer loop */
    11151115                        default:
  • trunk/src/kash/shell.h

    r1214 r1216  
    8888#endif
    8989
     90#include "shtypes.h"
     91
    9092#endif
  • trunk/src/kash/shinstance.h

    r1214 r1216  
    120120 * running in a thread and not a separate process.
    121121 */
    122 typedef struct shinstance
     122struct shinstance
    123123{
    124124    struct shinstance  *next;           /**< The next shell instance. */
     
    324324    struct t_op const  *t_wp_op;
    325325
    326 } shinstance;
     326};
    327327
    328328
     
    376376#include <time.h>
    377377#ifdef _MSC_VER
    378     typedef struct sh_tms
     378    typedef struct shtms
    379379    {
    380380        clock_t tms_utime;
     
    382382        clock_t tms_cutime;
    383383        clock_t tms_cstime;
    384     } sh_tms;
     384    } shtms;
    385385#else
    386386#   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
     389clock_t sh_times(shinstance *, shtms *);
    391390int sh_sysconf_clk_tck(void);
    392391
  • trunk/src/kash/syntax.c

    r1214 r1216  
    88#ifdef _MSC_VER /* doesn't implement the fancy initializers I think... */
    99
    10 char basesyntax[257] = {CEOF};
    11 char dqsyntax[257] = {CEOF};
    12 char sqsyntax[257] = {CEOF};
    13 char arisyntax[257] = {CEOF};
     10char basesyntax[257] = {CSHEOF};
     11char dqsyntax[257] = {CSHEOF};
     12char sqsyntax[257] = {CSHEOF};
     13char arisyntax[257] = {CSHEOF};
    1414char is_type[257] = {0};
    1515
     
    114114
    115115/* syntax table used when not in quotes */
    116 const char basesyntax[257] = { CEOF,
     116const char basesyntax[257] = { CSHEOF,
    117117    set_range(CTL_FIRST, CTL_LAST, CCTL)
    118118    set('\n', CNL)
     
    135135
    136136/* syntax table used when in double quotes */
    137 const char dqsyntax[257] = { CEOF,
     137const char dqsyntax[257] = { CSHEOF,
    138138    set_range(CTL_FIRST, CTL_LAST, CCTL)
    139139    set('\n', CNL)
     
    156156
    157157/* syntax table used when in single quotes */
    158 const char sqsyntax[257] = { CEOF,
     158const char sqsyntax[257] = { CSHEOF,
    159159    set_range(CTL_FIRST, CTL_LAST, CCTL)
    160160    set('\n', CNL)
     
    173173
    174174/* syntax table used when in arithmetic */
    175 const char arisyntax[257] = { CEOF,
     175const char arisyntax[257] = { CSHEOF,
    176176    set_range(CTL_FIRST, CTL_LAST, CCTL)
    177177    set('\n', CNL)
  • trunk/src/kash/syntax.h

    r809 r1216  
    3333 */
    3434
    35 #ifdef HAVE_SYS_CDEFS_H
    36 #include <sys/cdefs.h>
    37 #endif
    3835#include <ctype.h>
    3936
     
    4946#define CLP 8                   /* a left paren in arithmetic */
    5047#define CRP 9                   /* a right paren in arithmetic */
    51 #define CEOF 10                 /* end of file */
     48#define CSHEOF 10               /* end of file */
    5249#define CCTL 11                 /* like CWORD, except it must be escaped */
    5350#define CSPCL 12                /* these terminate a word */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette