- May
- 13,399
- 190
I have a ~31MB ASCII export of HKML.
If I count the number of occurrences of 0x0A (LF) with my own program I get 627507, which agrees with the line count given by two versions of WC.EXE (Gnu and Thompson Toolkit).
If I count the number of occurrences of 0x0D (CR), I get 627546, which agrees with the line counts given by TEXTPAD (editor) and DEVENV's editor.
If I count the number of occurrences of 0x0D0A (CRLF), I get 627470, which doesn't agree with anything else I've seen. It does suggest that there are 76 CRs not followed by LFs and 37 LFs not preceded by CRs.
TCC's @LINES gives 627560. How does it arrive at this number? Is there a sense in which it is correct?
If I count the number of occurrences of 0x0A (LF) with my own program I get 627507, which agrees with the line count given by two versions of WC.EXE (Gnu and Thompson Toolkit).
If I count the number of occurrences of 0x0D (CR), I get 627546, which agrees with the line counts given by TEXTPAD (editor) and DEVENV's editor.
If I count the number of occurrences of 0x0D0A (CRLF), I get 627470, which doesn't agree with anything else I've seen. It does suggest that there are 76 CRs not followed by LFs and 37 LFs not preceded by CRs.
TCC's @LINES gives 627560. How does it arrive at this number? Is there a sense in which it is correct?