questions about a backup program for the MS-DOS environment
D'Arcy J.M. Cain
darcy at druid.uucp
Fri May 4 00:30:10 AEST 1990
In article <12459 at wpi.wpi.edu> jhallen at wpi.wpi.edu (Joseph H Allen) writes:
>In article <1990Apr25.125806.20450 at druid.uucp> darcy at druid.UUCP (D'Arcy J.M. Cain) writes:
>> while ((n = fread(buf, sizeof(char), BUFSIZ, infile)) != 0)
>> fwrite(buf, sizeof(char), n, outfile);
>
>No, no, no Yuck! Don't use the C functions, and don't use such tiny buffers.
>(no wonder it's so slow :-)
>
>Try (in small or tiny model):
>
>#include <dos.h>
> [ ... A bunch of assembler code shoe-horned into a C program]
Double yuck. Not only does this depend on a specific hardware platform,
a specific OS, a specific vendor's compiler but even 2 specific models
of the compiler out of 6 possible. I bet someone would be hard pressed
to modify this code to make it less portable than it is.
--
D'Arcy J.M. Cain (darcy at druid) | Government:
D'Arcy Cain Consulting | Organized crime with an attitude
West Hill, Ontario, Canada |
(416) 281-6094 |
More information about the Comp.lang.c
mailing list