- #include <stdio.h>
- #include <dos.h>
- #include <conio.h>
- void main(void)
- {
- char line[512];
- char *buffer;
- FILE *input;
- if ((input = fopen("\AUTOEXEC.BAT", "r")) == NULL)
- printf("Error opening \AUTOEXEC.BATn");
- else
- {
- if (setvbuf(input, buffer, _IOFBF, 8192))
- printf("Error changing file buffern");
- else
- while (fgets(line, sizeof(line), input))
- fputs(line, stdout);
- fclose(input);
- }
- }