Mail Archives: djgpp/1995/01/06/15:35:00
On Thu, 5 Jan 1995, Jon Keene wrote:
> Hello,
> I'm new to DJGPP, but pretty impressed. I have a question:
> I've written a program that reads from stdin, counts blanks, tabs and
> newlines, and outputs those numbers. When I run it on input from the
> keyboard it works correctly, but when I redirect input from a file the
> number of tabs always comes out zero. Is this some peculiarity of
> DJGPP? Or DOS text files?
Many dos editors replace tabs with an appropriate number of spaces. Try
creating a file by typing
copy con file
Then typing in your test file. Press ^Z to exit. run that file through
your program, and it should output the correct number of tabs.
##########=========================-------------------------------------*
# Darwin Hawes <hawes AT physics DOT ubc DOT ca> |
I This is a typical net.posting. Any resemblance to reality is I
| strictly coincidental. #
*-------------------------------------=========================##########
- Raw text -