Changeset 1199 for trunk/src/kash/show.c


Ignore:
Timestamp:
Oct 7, 2007, 12:04:05 AM (18 years ago)
Author:
bird
Message:

moving globals into shinstance...

File:
1 edited

Legend:

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

    r1198 r1199  
    6161static void sharg(union node *, FILE *);
    6262static void indent(int, char *, FILE *);
    63 static void trstring(char *);
    64 
    65 
    66 void
    67 showtree(union node *n)
    68 {
    69         trputs("showtree called\n");
     63static void trstring(shinstance *, char *);
     64
     65
     66void
     67showtree(shinstance *psh, union node *n)
     68{
     69        trputs(psh, "showtree called\n");
    7070        shtree(n, 1, NULL, stdout);
    7171}
     
    274274#ifdef DEBUG
    275275void
    276 trputc(int c)
     276trputc(shinstance *psh, int c)
    277277{
    278278        if (debug(psh) != 1)
     
    311311#ifdef DEBUG
    312312void
    313 trputs(const char *s)
     313trputs(shinstance *psh, const char *s)
    314314{
    315315        if (debug(psh) != 1)
     
    320320
    321321static void
    322 trstring(char *s)
     322trstring(shinstance *psh, char *s)
    323323{
    324324        char *p;
     
    367367                return;
    368368        while (*ap) {
    369                 trstring(*ap++);
     369                trstring(psh, *ap++);
    370370                if (*ap)
    371371                        putc(' ', tracefile);
     
    379379#ifdef DEBUG
    380380void
    381 opentrace(void)
     381opentrace(shinstance *psh)
    382382{
    383383        char s[100];
     
    424424                fcntl(fileno(tracefile), F_SETFL, flags | O_APPEND);
    425425#endif
    426         setlinebuf(tracefile);
     426        setvbuf(tracefile, (char *)NULL, _IOLBF, 0); //setlinebuf(tracefile);
    427427        fputs("\nTracing started.\n", tracefile);
    428428}
Note: See TracChangeset for help on using the changeset viewer.