dj(1): add a variable for skipping in the main loop

This commit is contained in:
dtb 2024-07-04 20:00:40 -06:00
parent 8c33f0116c
commit fe175cab19
Signed by: trinity
GPG Key ID: 34C0543BBB6AF81B

View File

@ -269,7 +269,13 @@ int main(int argc, char *argv[]){
if(io[i].seek > 0)
return oserr(io[i].fn);
do{ /* read */
do{
{ /* read */
static char skipping = 0;
if(io[0].seek > 0)
skipping = 1;
if(Io_read(&io[0])->bufuse == 0 && !noerror)
Io_read(&io[0]); /* second chance */
if(io[0].bufuse == 0) /* that's all she wrote */
@ -287,6 +293,7 @@ int main(int argc, char *argv[]){
io->bufuse = io->bs;
}
}
}
/* write */
do{