RE: chop LF

2000-04-22 Thread C. Falconer
: chop LF the problem is foo is end in LF ( 0A ), and it will let a.out get wrong output. if i run #a.out and input data from keybord, then end it by ctrl+D, will get the right answer. i'm not sure, if i understand you right ... you are having trouble to detect the end of file, when

chop LF

2000-04-21 Thread maths
hello everybody i wrote a program a.out. it get input from stdin, so i can use pipe or redirection to get data from file. such as # cat foo|a.out the problem is foo is end in LF ( 0A ), and it will let a.out get wrong output. if i run #a.out and input data from keybord, then end it by ctrl+D,

Re: chop LF

2000-04-21 Thread Oswald Buddenhagen
the problem is foo is end in LF ( 0A ), and it will let a.out get wrong output. if i run #a.out and input data from keybord, then end it by ctrl+D, will get the right answer. i'm not sure, if i understand you right ... you are having trouble to detect the end of file, when there is an