* Was trying to use the new system API which is not ready causing stack issues.
authorcarl <cecodere@yahoo.ca>
Tue, 19 Feb 2019 16:44:32 +0000 (00:44 +0800)
committercarl <cecodere@yahoo.ca>
Tue, 19 Feb 2019 16:44:32 +0000 (00:44 +0800)
modules/src/input/inp_pkg.body

index 9950f34..2a025cd 100644 (file)
@@ -107,7 +107,7 @@ INP_rdfile(fd, fn, size, pbuf)
        register long *size;
        char **pbuf;            /* output parameter */
 {
-       long rsize;
+       int rsize;
 
        if (
             ((*size = sys_filesize(fn))) < 0
@@ -217,13 +217,12 @@ INP_rdblock(fd, buf, n)
        char *buf;
        int *n;
 {
-       long readSize;
-       readSize = (size_t)*n;
 
-       if (!sys_read(fd, buf, INP_BUFSIZE, &readSize)) {
+
+       if (!sys_read(fd, buf, INP_BUFSIZE, n)) {
                return 0;
        }
-       *n = (int)readSize;
+
        buf[*n] = '\0';
        return 1;
 }