bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-cflow] 1 line, no newline, wc says 0 lines


From: James Dennis
Subject: Re: [bug-cflow] 1 line, no newline, wc says 0 lines
Date: Thu, 6 Oct 2016 17:21:31 -0400

I tried taking it a little further. I have a file with 6 lines in it, but no newline at the end of the 6th, and it indeed reports 5 lines.

On Thu, Oct 6, 2016 at 5:14 PM, James Dennis <address@hidden> wrote:
Hello.

I was writing data to a file and ran `wc -l <file>` on it to check if the file had output. wc kept reporting 0, so I assumed there was no data. After finding no reason to think data isn't being written I ran `cat <file>` instead and found data was there. It was on a single line with no newline.

I found `wc.c` in cflow's source inside the `doc/` directory and was easy enough to adjust for this specific case.

My experience may be the intended behavior. The COUNT macro certainly suggests this, but I found it misleading and would love to patch it if the cflow team agrees.

James

PS. I tried to scan the mailing list for this but I didn't find anything. Sorry if this is a repeat.



--
jms dnns
me // facebook // github // twitter


reply via email to

[Prev in Thread] Current Thread [Next in Thread]