Share

cloc

Code

Programming Languages: Perl

License: GNU General Public License (GPL)

Repositories

browse code, statistics, last commit on 2009-12-06 svn co https://cloc.svn.sourceforge.net/svnroot/cloc cloc

Show:

What's happening?

  • cloc

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

    2009-12-06 07:12:42 UTC by alnd

  • Comment: treat a text file as a binary file

    This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).

    2009-09-25 02:20:37 UTC by sf-robot

  • Comment: treat a text file as a binary file

    Thank you very much.

    2009-09-10 04:44:24 UTC by lilyjessie

  • 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 by alnd

  • 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 by alnd

  • cloc

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

    2009-09-10 04:21:42 UTC by alnd

  • cloc

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

    2009-09-10 04:03:23 UTC by alnd

  • cloc

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

    2009-09-09 04:28:56 UTC by alnd

  • Comment: treat a text file as a binary file

    Thank you very much for responding. The new option will be useful in our case. But I wonder how cloc judge whether the file is a binary file? Because I think this file is still a textfile, maybe some special characters in this file make it seemed like a binary file? If I can find out what the special charaters are, I can ask the programmers not to put these characters in their files.

    2009-09-03 05:16:15 UTC by nobody

  • 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 by alnd

Our Numbers