Subversion Repositories wimsdev

Rev

Rev 10 | Rev 8185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 3836
Line 39... Line 39...
39
void output(int fh)
39
void output(int fh)
40
{
40
{
41
    int l, *ip;
41
    int l, *ip;
42
    if(answerlen<0) l=strlen(textbuf); else l=answerlen;
42
    if(answerlen<0) l=strlen(textbuf); else l=answerlen;
43
    ip=(int *) commbuf; *ip=l;
43
    ip=(int *) commbuf; *ip=l;
44
    write(fh,commbuf,l+sizeof(int));
44
    (void)write(fh,commbuf,l+sizeof(int));
45
    close(fh);
45
    close(fh);
46
    if(debugging) {
46
    if(debugging) {
47
        if(textbuf[0]=='O') debug("%.2s %d bytes.",textbuf,l);
47
        if(textbuf[0]=='O') debug("%.2s %d bytes.",textbuf,l);
48
        else debug("%s",textbuf);
48
        else debug("%s",textbuf);
49
    }
49
    }
Line 92... Line 92...
92
    }
92
    }
93
    textbuf[l]=0; textptr=textbuf;
93
    textbuf[l]=0; textptr=textbuf;
94
    answerlen=-1;
94
    answerlen=-1;
95
    if(debugging) debug("> %s",textbuf);
95
    if(debugging) debug("> %s",textbuf);
96
    if(options()>=0) cmd();
96
    if(options()>=0) cmd();
97
    end: chdir(cwd); cwdtype=dir_home; output(fh);
97
    end: (void)chdir(cwd); cwdtype=dir_home; output(fh);
98
}
98
}
99
 
-