Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4136] Error in dumpf.c

Date2004-02-24 15:59
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:4136] Error in dumpf.c
In the cases 7 and 8 the first digit is ignored if not preceded by a
sign.  The code might be better as

    case 7:
        while (nk--) {
          char *bp = inbuf;
          do {                  /* Skip whitespace */
            read(ifd, bp, 1);
          } while (isspace(*bp));
          do {                  /* Absorb digits */
            read(ifd, ++bp, 1);
          } while (isdigit(*bp));
          *bp = '\0';       /* Terminate string */
          lseek(ifd, (off_t)(-1), SEEK_CUR); /* Unread! */
          if (sizeof(MYFLT)==4)
            sscanf(inbuf,"%f", kp);
          else
            sscanf(inbuf,"%lf", kp);
          kp++;
        }
        break;
    case 8:
        while (nk--) {
          char * bp = inbuf;
          do {                  /* Skip whitespace */
            read(ifd, bp, 1);
          } while (isspace(*bp));
          do {                  /* Absorb digits and such*/
            read(ifd, ++bp, 1);
          } while (!isspace(*bp));
          *bp = '\0';
          lseek(ifd, (off_t)(-1), SEEK_CUR); /* Unread! */
          if (sizeof(MYFLT)==4)
            sscanf(inbuf,"%f", kp);
          else
            sscanf(inbuf,"%lf", kp);
          kp++;
        }
        break;

Could someone with access to csound5 and csound check this in?  I have
too much code out of step with the CVS to dare to try to check this in

==John ffitch