Al Danial

Show:

What's happening?

  • Comment: treat a text file as a binary file

    To answer your question about how cloc determines if a file is binary: cloc uses the Perl built-in -B file test operator. If "-B file" returns true, Perl (and cloc) say the file is binary. A command line test: perl -e 'print "is binary\n" if -B $ARGV[0]' /path/to/your/file.

    2009-09-10 04:35:21 UTC in cloc

  • Comment: treat a text file as a binary file

    I added a new option, --read-binary-files, that bypasses the logic which tests whether or not to try counting lines of a file it considers as binary. The new code is in svn check-in # 146, http://cloc.svn.sourceforge.net/viewvc/cloc/trunk/cloc?revision=146&pathrev=146. The caveat to using this option is that you will have to be very careful what you pass to the program. The best thing to do...

    2009-09-10 04:28:15 UTC in cloc

  • cloc

    alnd committed revision 146 to the cloc SVN repository, changing 1 files.

    2009-09-10 04:21:42 UTC in cloc

  • cloc

    alnd committed revision 145 to the cloc SVN repository, changing 1 files.

    2009-09-10 04:03:23 UTC in cloc

  • cloc

    alnd committed revision 144 to the cloc SVN repository, changing 1 files.

    2009-09-09 04:28:56 UTC in cloc

  • Comment: treat a text file as a binary file

    I've not come across files such as these before. A work-around is relatively simple--I can add a new option to skip the binary file test. The drawback is that when this new switch is used, one must supply a list of input files which are to be counted. Just giving it a directory name and telling it to search for text files will no longer work as the code will try to count binary files and...

    2009-09-03 04:47:30 UTC in cloc

  • Comment: Serious bug in comment removing

    As explained at http://cloc.sourceforge.net/#Limitations item #2, cloc is unable to figure out that comment markers within strings should be ignored. If you were to replace the // markers with text that does not start or end a C comment, then it will work as desired.

    2009-08-19 05:25:13 UTC in cloc

  • cloc

    alnd committed revision 143 to the cloc SVN repository, changing 1 files.

    2009-08-16 20:58:40 UTC in cloc

  • Comment: results displayed is erroneous

    This is not a defect. The standard Perl time() function--which cloc uses--has a resolution of one second. If the code runs so quickly that start and end times match, cloc sets the elapsed time to 0.5 seconds. The header line shows the *rate* at which files and lines were processed. Your input is so small that some runs show with subsecond times, hence the 0.5 sec value shown. 76.0 files/s...

    2009-07-18 03:28:34 UTC in cloc

  • cloc

    alnd committed revision 142 to the cloc SVN repository, changing 1 files.

    2009-06-26 05:39:07 UTC in cloc

About Me

  • 2000-10-31 (9 years ago)
  • 98031
  • alnd (My Site)
  • Al Danial

Send me a message