The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix wc.ml on CRLF checkouts

Open the file in binary mode on all platforms and simply ignore \r
characters when counting the total number of characters.

+5 -2
+4 -1
testsuite/tests/basic-io/wc.ml
··· 17 17 match c with 18 18 '\n' -> 19 19 incr lines; count Outside_word 20 + | '\r' -> 21 + (* Ignore \r to cater for CRLF vs LF checkouts *) 22 + decr chars; count Outside_word 20 23 | ' ' | '\t' -> 21 24 count Outside_word 22 25 | _ -> ··· 29 32 () 30 33 31 34 let count_file name = 32 - let ic = open_in name in 35 + let ic = open_in_bin name in 33 36 count_channel ic; 34 37 close_in ic 35 38
+1 -1
testsuite/tests/basic-io/wc.reference
··· 1 - 1232 characters, 184 words, 58 lines 1 + 1347 characters, 202 words, 61 lines