Revision fe2c0307

View differences:

fifo.c
70 70
        ssize_t size;
71 71
        size_t rmax;
72 72
        rmax = MIN(MIN(readsize, buf + bufsize - rpos), (wpos+bufsize-rpos-1) % bufsize);
73
//fprintf(stderr,"reading %lu bytes, ", rmax);
73 74
        size = read(0, rpos, rmax);
74
//fprintf(stderr,"reading %lu bytes, read %ld bytes\n", rmax, size);
75
//fprintf(stderr,"read %ld bytes\n", size);
75 76
        if (size < 0) {
76 77
          break;
77 78
        } else if (size == 0)  {
......
85 86
        ssize_t size;
86 87
        size_t wmax;
87 88
        wmax = (wpos > rpos) ? (buf + bufsize) - wpos  : rpos - wpos;
89
//fprintf(stderr,"writing %lu bytes, ", wmax);
88 90
        size = write(1, wpos, wmax);
89
//fprintf(stderr,"writing %lu bytes, written %ld bytes\n", wmax, size);
91
//fprintf(stderr,"written %ld bytes\n", size);
90 92
        if (size < 0) {
91 93
          break;
92 94
        } else {

Also available in: Unified diff