Date: Fri, 6 Jan 1995 11:33:55 -0800 (PST) From: Darwin Hawes Subject: Re: reading '\t' in files To: Jon Keene Cc: djgpp AT sun DOT soe DOT clarkson DOT edu 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 | I This is a typical net.posting. Any resemblance to reality is I | strictly coincidental. # *-------------------------------------=========================##########