--- ray/src/common/readobj.c 1989/02/02 10:34:39 1.1 +++ ray/src/common/readobj.c 1990/01/18 23:58:57 1.3 @@ -26,7 +26,7 @@ readobj(input) /* read in an object file or stream * char *input; { FILE *popen(); - char *fgets(); + char *fgets(), *fgetline(); FILE *infp; char buf[512]; register int c; @@ -48,12 +48,9 @@ char *input; continue; if (c == '#') { /* comment */ fgets(buf, sizeof(buf), infp); - } else if (c == '!') { /* pipe */ + } else if (c == '!') { /* command */ ungetc(c, infp); - fgets(buf, sizeof(buf), infp); - c = strlen(buf); - if (buf[c-1] == '\n') - buf[c-1] = '\0'; + fgetline(buf, sizeof(buf), infp); readobj(buf); } else { /* object */ ungetc(c, infp); @@ -108,7 +105,7 @@ FILE *fp; error(USER, errmsg); } objp->otype = objptr(alias)->otype; - bcopy(&objptr(alias)->oargs, &objp->oargs, sizeof(FUNARGS)); + copystruct(&objp->oargs, &objptr(alias)->oargs); } else if (readfargs(&objp->oargs, fp) < 0) { sprintf(errmsg, "(%s): bad arguments", name); objerror(objp, USER, errmsg);