I don't quite know what the --wide option is supposed to do, but when I run sloccount this way I get no differences:
sloccount dir unwide.text
sloccount --wide dir > wide.text
diff unwide.text wide.text
Adding --multiproject changes the output slightly, but not as much as expected.
The sloccount front-end script checks for --wide, and assigns it to a wide variable, but doesn't do anything else with it. Changing the wrapper to pass $wide to get_sloc (the only executable that uses --wide) produces very different results in my .text files above, which might be the expected behavior. I have attached a copy of sloccount with that change made.
However, the reason this came up is because I tracked down a copy of sloc2html.py, and it initially failed with this traceback:
Traceback (most recent call last):
File "./sloc2html.py", line 78, in <module>
l, n = split ( lang, "=" )
ValueError: need more than 1 value to unpack
This is because sloccount (without --wide) generates output that looks like this:
SLOC Directory SLOC-by-Language (Sorted)
152177 sntools python=119400,sh=30240,perl=1167,ansic=576,tcl=411,
csh=298,lisp=50,cpp=30,php=5
The traceback is caused because an empty element is prodced in the list which results from splitting the third field of the line. If I fix the script to ignore empty elements, it fails on the next line because it is formatted incorrectly. If I join the second and third lines sloc2html does not fail and generates html.
Adding --multiproject changes the output slightly, but doesn't change the lines shown above.
However, fixing the sloccount front-end script to pass $wide to get_sloc produces very different results in my .text files above, and sloc2html.py hangs at line 65 because it never finds the 'SLOC' line and doesn't handle the EOF condition.
Was this the reason that sloc2html.py was dropped? Would there be any interest in a 'fixed' (whatever that means) version of it?
Sorry, my example should have been this: