ohcount
12 years agoOTWO-1213 Works around lost encoding in Ruby/C binding layer origin/ruby192
Robin Luckey [Mon, 9 Jan 2012 16:44:25 +0000 (08:44 -0800)] 
OTWO-1213 Works around lost encoding in Ruby/C binding layer

When a Ruby 1.9.2 string is passed to the C code, the associated
encoding metadata is lost. When this same string is then returned from C
back to Ruby, an arbitrary, mismatched encoding is applied to replace
the lost one.

This means that a string becomes garbled in the round trip. The bits
don't change, but the encoding is lost.

The correct fix would be to preserve the encoding metadata in the C
layer.

The easier fix is to replace the lost encoding with a more likely match,
which is what I've done in this patch. When the C code returns a string,
we apply the Ruby runtime's current default encoding, which is highly likely to
be the encoding originally discarded.

12 years agoOTWO-1206 Updates SWIG bindings to Ruby 1.9.2
Robin Luckey [Sat, 7 Jan 2012 00:12:28 +0000 (16:12 -0800)] 
OTWO-1206 Updates SWIG bindings to Ruby 1.9.2

- Requires SWIG 2.0.4 (SWIG 1.3 is not compatible with Ruby 1.9.2)

This updates the SWIG bindings only. This code tree does not build:

- Build fails for me when using RVM Ruby 1.9.2 because 'ruby.h' and
  'config.h' headers cannot be found. I am currenty working around
  this by manually placing absolute paths in the build script.

- test/unit/ruby/source_file_test.rb is currently failing because the
  round trip from Ruby -> C -> Ruby causes the string encoding
  metadata to be lost. UTF-8 input strings are output with identical
  content bits, but are marked as ASCII-8BIT.

12 years agoOTWO-1137 Escapes single quotes in file paths
Robin Luckey [Wed, 21 Dec 2011 17:46:35 +0000 (09:46 -0800)] 
OTWO-1137 Escapes single quotes in file paths

12 years agoAdds additional comment styles for MS-DOS batch files
Robin Luckey [Fri, 16 Dec 2011 19:19:19 +0000 (11:19 -0800)] 
Adds additional comment styles for MS-DOS batch files

In addition to 'REM', we now accept '@REM' and '::'.

Note that test/expected_dir/bat1.bat should be tab-delimited (not
space-delimited), so this patch also corrects that.

12 years agoMerge branch 'master' of git://github.com/pfusik/ohcount
Robin Luckey [Thu, 15 Dec 2011 23:11:20 +0000 (15:11 -0800)] 
Merge branch 'master' of git://github.com/pfusik/ohcount

12 years agoCorrections to Logtalk unit tests
Robin Luckey [Thu, 15 Dec 2011 22:48:16 +0000 (14:48 -0800)] 
Corrections to Logtalk unit tests

12 years agoMerge branch 'master' of git://github.com/pmoura/ohcount
Robin Luckey [Thu, 15 Dec 2011 22:50:32 +0000 (14:50 -0800)] 
Merge branch 'master' of git://github.com/pmoura/ohcount

12 years agoFixes crash in disambiguate_r() when source file is empty
Robin Luckey [Thu, 15 Dec 2011 22:30:59 +0000 (14:30 -0800)] 
Fixes crash in disambiguate_r() when source file is empty

Thanks to ehsan for discovering this bug.

12 years agoEnable building on Mac, which lacks the strnlen function by using memchr instead...
Ehsan Akhgari [Sun, 9 Oct 2011 21:06:59 +0000 (17:06 -0400)] 
Enable building on Mac, which lacks the strnlen function by using memchr instead of it

12 years agoMerge pull request #6 from cmarcelo/qml
Robin Luckey [Thu, 15 Dec 2011 21:51:55 +0000 (13:51 -0800)] 
Merge pull request #6 from cmarcelo/qml

Add support for Qt's QML language

12 years agoMerge pull request #5 from koraktor/ruby
Robin Luckey [Thu, 15 Dec 2011 21:42:47 +0000 (13:42 -0800)] 
Merge pull request #5 from koraktor/ruby

Added more filenames and extensions for Ruby

12 years agoMerge pull request #4 from koraktor/mustache
Robin Luckey [Thu, 15 Dec 2011 21:42:33 +0000 (13:42 -0800)] 
Merge pull request #4 from koraktor/mustache

Treat Mustache templates as HTML

12 years agoAdd support for Qt's QML language
Caio Marcelo de Oliveira Filho [Sat, 22 Oct 2011 05:08:48 +0000 (02:08 -0300)] 
Add support for Qt's QML language

Reusing the JS parser, since QML is 'almost' JavaScript. The
approximation is good enough for the line counting purposes.

12 years agoCheck if *.def files are Modula-2.
Piotr Fusik [Mon, 29 Aug 2011 12:42:53 +0000 (14:42 +0200)] 
Check if *.def files are Modula-2.

12 years agoTreat Mustache templates as HTML
Sebastian Staudt [Thu, 11 Aug 2011 12:50:54 +0000 (14:50 +0200)] 
Treat Mustache templates as HTML

Mustache introduces only a small amount of additional syntax, so treating
its templates as pure HTML shouldn't hurt.

12 years agoAdded more filenames and extensions for Ruby
Sebastian Staudt [Thu, 11 Aug 2011 12:47:42 +0000 (14:47 +0200)] 
Added more filenames and extensions for Ruby

12 years agoMinor improvement for detecting Perl files.
Paulo Moura [Tue, 9 Aug 2011 16:11:04 +0000 (11:11 -0500)] 
Minor improvement for detecting Perl files.

12 years agoMerge branch 'ecere'
Robin Luckey [Tue, 9 Aug 2011 15:39:34 +0000 (08:39 -0700)] 
Merge branch 'ecere'

12 years agoCompletes eC parser
Robin Luckey [Tue, 9 Aug 2011 15:38:16 +0000 (08:38 -0700)] 
Completes eC parser

 - Adds parse_ec() to the list of parsers
 - Adds a test to ensure that line counter works

12 years agoAdd file extensions "asx" and "as8" - 6502 assembler.
Piotr Fusik [Thu, 15 Jul 2010 18:26:21 +0000 (20:26 +0200)] 
Add file extensions "asx" and "as8" - 6502 assembler.

12 years agoOTWO-922 Adds CoffeeScript parser
Robin Luckey [Mon, 8 Aug 2011 22:03:22 +0000 (15:03 -0700)] 
OTWO-922 Adds CoffeeScript parser

12 years agoMerge https://github.com/bytbox/ohcount into jam
Robin Luckey [Mon, 8 Aug 2011 20:19:06 +0000 (13:19 -0700)] 
Merge https://github.com/bytbox/ohcount into jam

12 years agoMerge branch 'adding_racket' of https://github.com/jbclements/ohcount into racket
Robin Luckey [Mon, 8 Aug 2011 20:12:02 +0000 (13:12 -0700)] 
Merge branch 'adding_racket' of https://github.com/jbclements/ohcount into racket

Conflicts:
src/hash/languages.gperf
src/hash/parsers.gperf
src/languages.h
test/unit/parser_test.h

12 years agoMerge branch 'master' of https://github.com/earl/ohcount
Robin Luckey [Mon, 8 Aug 2011 20:06:24 +0000 (13:06 -0700)] 
Merge branch 'master' of https://github.com/earl/ohcount

12 years agoMerge branch 'rebol' of https://github.com/earl/ohcount into rebol
Robin Luckey [Mon, 8 Aug 2011 20:02:06 +0000 (13:02 -0700)] 
Merge branch 'rebol' of https://github.com/earl/ohcount into rebol

12 years agoMerge https://github.com/ecere/ohcount into ecere
Robin Luckey [Mon, 8 Aug 2011 19:45:59 +0000 (12:45 -0700)] 
Merge https://github.com/ecere/ohcount into ecere

12 years agoAdded basic unit tests for Prolog parsing.
Paulo Moura [Sun, 7 Aug 2011 01:32:11 +0000 (02:32 +0100)] 
Added basic unit tests for Prolog parsing.

12 years agoAdded basic unit tests for Logtalk parsing.
Paulo Moura [Sun, 7 Aug 2011 00:29:14 +0000 (01:29 +0100)] 
Added basic unit tests for Logtalk parsing.

12 years agoAdded basic support for Logtalk and Prolog (missing parsers in previous commit\!).
Paulo Moura [Sat, 6 Aug 2011 23:39:39 +0000 (00:39 +0100)] 
Added basic support for Logtalk and Prolog (missing parsers in previous commit\!).

12 years agoAdded basic support for Logtalk and Prolog.
Paulo Moura [Sat, 6 Aug 2011 23:10:31 +0000 (00:10 +0100)] 
Added basic support for Logtalk and Prolog.

12 years agoadding racket, re-using lisp parser, following clojure's lead
John Clements [Wed, 6 Jul 2011 19:01:20 +0000 (12:01 -0700)] 
adding racket, re-using lisp parser, following clojure's lead

12 years agoOTWO-803 Fixes disambiguate_pp() performance sink
Robin Luckey [Mon, 20 Jun 2011 15:28:44 +0000 (11:28 -0400)] 
OTWO-803 Fixes disambiguate_pp() performance sink

disambiguate_pp() failed to execute in a reasonable time for extremely
large (1MB+) files.

The reason is that a regular expression is evaluated for each line of
the file, and this regular expression is scoped from the beginning of
the line to the end of the file. When the file is extremely large,
the regular expression evaluation runs away with the CPU.

By limiting the scope of the regular expression evaluation to no more
than 100 characters from its start point, we can avoid the runaway
performance sink. This is a reasonable change since the expression we
are looking to match should almost always fit within 100 chars anyway.

12 years agoFix filename in Go parser attribution line
Andreas Bolka [Wed, 1 Jun 2011 23:40:11 +0000 (01:40 +0200)] 
Fix filename in Go parser attribution line

Signed-off-by: Andreas Bolka <a@bolka.at>
12 years agoFix ragel include in parser example skeleton
Andreas Bolka [Wed, 1 Jun 2011 23:39:25 +0000 (01:39 +0200)] 
Fix ragel include in parser example skeleton

Signed-off-by: Andreas Bolka <a@bolka.at>
12 years agoImplement parsing of REBOL multi-line strings
Andreas Bolka [Wed, 1 Jun 2011 23:35:01 +0000 (01:35 +0200)] 
Implement parsing of REBOL multi-line strings

Signed-off-by: Andreas Bolka <a@bolka.at>
12 years agoAdd REBOL detection and (basic) parsing
Andreas Bolka [Wed, 1 Jun 2011 21:21:23 +0000 (23:21 +0200)] 
Add REBOL detection and (basic) parsing

Also adds a simple .r disambiguation to discern REBOL and R sources. R
is the default, REBOL is used if "rebol" is found anywhere in the
contents.

The REBOL parser currently does not handle multi-line strings ({...}),
which could (in rare cases) lead to string parts being classified as
comments.

Signed-off-by: Andreas Bolka <a@bolka.at>
12 years agoAdded missing detector test files
Jerome St-Louis [Sat, 21 May 2011 08:15:39 +0000 (04:15 -0400)] 
Added missing detector test files

12 years agoAdded support for the eC language (www.ecere.com)
Jerome St-Louis [Sat, 21 May 2011 08:00:54 +0000 (04:00 -0400)] 
Added support for the eC language (www.ecere.com)

13 years agoadd test cases for jam
Scott Lawrence [Mon, 18 Apr 2011 15:30:53 +0000 (11:30 -0400)] 
add test cases for jam

13 years agoAdding recognition and parser for perforce Jam (Jamfile/Jamrules), based on the parse...
Scott Lawrence [Mon, 18 Apr 2011 15:28:26 +0000 (11:28 -0400)] 
Adding recognition and parser for perforce Jam (Jamfile/Jamrules), based on the parser for shell

13 years agoMerge branch 'master' of https://github.com/bytbox/ohcount
Robin Luckey [Fri, 8 Apr 2011 15:51:18 +0000 (08:51 -0700)] 
Merge branch 'master' of https://github.com/bytbox/ohcount

13 years agoMerge branch 'master' of https://github.com/chris-morgan/ohcount
Robin Luckey [Fri, 8 Apr 2011 15:41:46 +0000 (08:41 -0700)] 
Merge branch 'master' of https://github.com/chris-morgan/ohcount

13 years agoOTWO-571 Fixed a bug where ohcount would follow symbolically linked directories,...
Robert Schultz [Mon, 4 Apr 2011 16:32:44 +0000 (12:32 -0400)] 
OTWO-571 Fixed a bug where ohcount would follow symbolically linked directories, causing problems/security concerns

13 years ago'build clean' should remove swig-generated file
Robin Luckey [Mon, 7 Feb 2011 21:55:54 +0000 (13:55 -0800)] 
'build clean' should remove swig-generated file

13 years agoFixes uninitialized data in tmp filename
Robin Luckey [Fri, 21 Jan 2011 15:46:45 +0000 (07:46 -0800)] 
Fixes uninitialized data in tmp filename

The filename string used for the detector's temporary file had an
uninitialized byte at its end. Usually this byte is 0, so it has no ill
effect. Occasionally it can be a garbage byte, which can cause the
temporary file write() to fail.

Because Ohcount had been failing to check write()'s return value, these
errors went unnoticed, and incorrect line counts were silently returned.

I have fixed the uninitialized byte, and the previous commit adds
the appropriate error checks.

All code counted prior to this fix should be recounted.

13 years agoFixes compiler warnings.
Robin Luckey [Fri, 21 Jan 2011 15:44:28 +0000 (07:44 -0800)] 
Fixes compiler warnings.

We were failing to check the return result on several system calls.

I've added the appropriate checks, with simple aborts in the case of
failure.

13 years agoAdded support for detecting certain bash scripts as shell scripts
Robert Schultz [Wed, 27 Oct 2010 18:50:15 +0000 (14:50 -0400)] 
Added support for detecting certain bash scripts as shell scripts

13 years agoAdded a parser for NSIS files (.nsi, .nsh).
Chris Morgan [Thu, 9 Sep 2010 03:33:11 +0000 (13:33 +1000)] 
Added a parser for NSIS files (.nsi, .nsh).

13 years agoupdated author information
Scott Lawrence [Fri, 23 Jul 2010 20:27:07 +0000 (16:27 -0400)] 
updated author information

13 years agoMerge branch 'golang'
Scott Lawrence [Fri, 23 Jul 2010 20:24:08 +0000 (16:24 -0400)] 
Merge branch 'golang'

13 years agomade README formatting consistent
Scott Lawrence [Fri, 23 Jul 2010 20:23:55 +0000 (16:23 -0400)] 
made README formatting consistent

13 years agoadded golang unit tests
Scott Lawrence [Fri, 23 Jul 2010 20:20:08 +0000 (16:20 -0400)] 
added golang unit tests

13 years agoadded golang detection and parsing, based on C
Scott Lawrence [Fri, 23 Jul 2010 20:09:18 +0000 (16:09 -0400)] 
added golang detection and parsing, based on C

13 years agoadded checks for gperf, erroring out if not found
Scott Lawrence [Fri, 23 Jul 2010 18:38:57 +0000 (14:38 -0400)] 
added checks for gperf, erroring out if not found

13 years agoadded check for ragel
Scott Lawrence [Fri, 23 Jul 2010 18:37:01 +0000 (14:37 -0400)] 
added check for ragel

13 years agoAdded support for the Puppet DSL from Puppetlabs.
Ken Barber [Tue, 4 May 2010 02:12:26 +0000 (03:12 +0100)] 
Added support for the Puppet DSL from Puppetlabs.

14 years agoRecognize .cu files as CUDA code; C parser for cuda files used
Jiri Matela [Thu, 15 Apr 2010 16:35:28 +0000 (09:35 -0700)] 
Recognize .cu files as CUDA code; C parser for cuda files used

14 years agoAdd support for ChaiScript - adding missing files from last commit
Jason Turner [Wed, 31 Mar 2010 18:10:29 +0000 (12:10 -0600)] 
Add support for ChaiScript - adding missing files from last commit

14 years agoAdd support for parsing/counting of ChaiScript. ChaiScript is based on closely on...
Jason Turner [Wed, 31 Mar 2010 18:01:38 +0000 (12:01 -0600)] 
Add support for parsing/counting of ChaiScript. ChaiScript is based on closely on support for JavaScript, as the langauges are similar in structure. All ChaiScript unit tests pass, but 1 or 2 (appears to be random) of the ruby diff tests fail.

14 years agoFIX - missing newline at end of languages.h
Robin Luckey [Tue, 30 Mar 2010 18:30:26 +0000 (11:30 -0700)] 
FIX - missing newline at end of languages.h

14 years agoMerge branch 'wirth'
Robin Luckey [Tue, 30 Mar 2010 17:53:10 +0000 (10:53 -0700)] 
Merge branch 'wirth'

14 years agoImplements Modula-2, Modula-3, Oberon
Robin Luckey [Tue, 30 Mar 2010 17:49:38 +0000 (10:49 -0700)] 
Implements Modula-2, Modula-3, Oberon

We recognize extensions m3, i3, mod, ob2, obn, def.

Ticket #30 requests that we also recognize extenions `m` and `d`.
That is not implemented here, because that requires disambiguation
from other languages, so ticket #30 remains open.

14 years agoFIX: Buffer overrun in emacs mode header logic
Robin Luckey [Mon, 29 Mar 2010 21:27:39 +0000 (14:27 -0700)] 
FIX: Buffer overrun in emacs mode header logic

If the emacs mode header is not well-formed (for example, if it is
missing a terminating "-*-"), then we run off the end of our buffer.

The emacs mode header parsing is a little complicated, and the
best answer is probably to clean up the parser. As an easier, quicker,
fix, I simply added a maximum string length check.

14 years ago[FIX] Emacs mode "C" improperly detected as C++
Robin Luckey [Fri, 26 Mar 2010 21:52:03 +0000 (14:52 -0700)] 
[FIX] Emacs mode "C" improperly detected as C++

detector.c uses the file extenstion map to convert emacs modes
to languages. Because the upper-case "C" file extension maps to
C++, this means that emacs mode "C" also mapped to C++, which was
incorrect.

I've added a special check in the code for this case. Emacs modes
"c" and "C" now correctly map to straight C code.

14 years agoTicket #60 - "build all" should build all
Robin Luckey [Mon, 15 Mar 2010 19:16:08 +0000 (12:16 -0700)] 
Ticket #60 - "build all" should build all

14 years agoTicket #59: Add unit test for *.m4 detection
Robin Luckey [Mon, 15 Mar 2010 18:11:56 +0000 (11:11 -0700)] 
Ticket #59: Add unit test for *.m4 detection

14 years agosrc/hash/extensions.gperf: recognize *.m4 files as containing GNU Autoconf code
Peter Simons [Sun, 7 Mar 2010 14:25:28 +0000 (15:25 +0100)] 
src/hash/extensions.gperf: recognize *.m4 files as containing GNU Autoconf code

The detection could be made more sophisticated, because there are other
uses of m4 than Autoconf, but for the vast majority of real-world cases
using the suffix to guess the language is going to be good enough.

14 years agosrc/parser.c: declare ohcount_hash_parser_from_language() to fix build error with...
Peter Simons [Sun, 7 Mar 2010 13:53:43 +0000 (14:53 +0100)] 
src/parser.c: declare ohcount_hash_parser_from_language() to fix build error with modern gcc versions

The function ohcount_hash_parser_from_language() was not declared,
resulting in the following compiler error with gcc 4.4.3:

  src/parser.c: In function ‘ohcount_parse’:
  src/parser.c:17: warning: implicit declaration of function ‘ohcount_hash_parser_from_language’
  src/parser.c:17: warning: initialization makes pointer from integer without a cast
  src/parser.c:22: error: dereferencing pointer to incomplete type

14 years agoMerge branch 'clojure' of git://github.com/abscondment/ohcount
Robin Luckey [Mon, 15 Mar 2010 17:48:50 +0000 (10:48 -0700)] 
Merge branch 'clojure' of git://github.com/abscondment/ohcount

14 years agoMerge branch 'master' of git://github.com/pshiryaev/ohcount
Robin Luckey [Mon, 15 Mar 2010 17:46:20 +0000 (10:46 -0700)] 
Merge branch 'master' of git://github.com/pshiryaev/ohcount

Conflicts:
test/unit/detector_test.h

14 years agoAdd support and tests for the Clojure language, a dialect of LISP.
abscondment [Mon, 8 Mar 2010 19:32:48 +0000 (11:32 -0800)] 
Add support and tests for the Clojure language, a dialect of LISP.

14 years ago[PATCH] Use pe pointer in disambiguate_st instead of p to
Pat Downey [Fri, 29 Jan 2010 22:42:02 +0000 (14:42 -0800)] 
[PATCH] Use pe pointer in disambiguate_st instead of p to
prevent ohcount from segfaulting when processing a .st file
that doesn't end in a new line.

14 years agoMerge commit 'kraj/doxygen_cleanup'
Andy Verprauskus [Thu, 28 Jan 2010 15:34:37 +0000 (07:34 -0800)] 
Merge commit 'kraj/doxygen_cleanup'

14 years agobuild: remove workaround (preprocessor define) for bug on centos/SF servers
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 08:03:32 +0000 (09:03 +0100)] 
build: remove workaround (preprocessor define) for bug on centos/SF servers

This is no longer needed due to commit a2903082b8e57657b37d636d18afb5ad8de296c7

14 years agoDoxygen: document how to build the Doxygen docs
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 07:51:28 +0000 (08:51 +0100)] 
Doxygen: document how to build the Doxygen docs

14 years agoDoxygen: document dependency to Bash
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 07:43:08 +0000 (08:43 +0100)] 
Doxygen: document dependency to Bash

14 years agoDoxygen: Point to SourceForge
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 07:38:12 +0000 (08:38 +0100)] 
Doxygen: Point to SourceForge

14 years agoMerge commit 'billiob/master'
Andy Verprauskus [Fri, 8 Jan 2010 16:55:55 +0000 (08:55 -0800)] 
Merge commit 'billiob/master'

14 years agoMOVE setup.py and mingw_setup.py to python/ dir
root [Fri, 8 Jan 2010 16:35:46 +0000 (16:35 +0000)] 
MOVE setup.py and mingw_setup.py to python/ dir

14 years agoChange README to mention build process for ruby and python
root [Fri, 8 Jan 2010 16:35:31 +0000 (16:35 +0000)] 
Change README to mention build process for ruby and python

14 years agoMerge remote branch 'balena/python_only' into python
root [Fri, 8 Jan 2010 00:52:26 +0000 (00:52 +0000)] 
Merge remote branch 'balena/python_only' into python

14 years agoBundle of modifications done to ohcount to support Python only (no dependencies made...
Guilherme Balena Versiani [Tue, 5 Jan 2010 22:12:52 +0000 (20:12 -0200)] 
Bundle of modifications done to ohcount to support Python only (no dependencies made to CMake, the building are done using default Python building using setup.py file). MinGW/MSYS and Windows compiling and fixes were applied too.

14 years ago[NEW] detect the WTF Public License
Boris 'billiob' Faure [Tue, 29 Dec 2009 17:55:10 +0000 (18:55 +0100)] 
[NEW] detect the WTF Public License

14 years ago[NEW] brainfuck++ parser
Boris 'billiob' Faure [Tue, 29 Dec 2009 17:15:43 +0000 (18:15 +0100)] 
[NEW] brainfuck++ parser

14 years ago[NEW] brainfuck parser
Boris 'billiob' Faure [Mon, 28 Dec 2009 19:33:05 +0000 (20:33 +0100)] 
[NEW] brainfuck parser

14 years ago[NEW] add brainfuck and brainfuck++ detectors
Boris 'billiob' Faure [Sun, 27 Dec 2009 17:43:11 +0000 (18:43 +0100)] 
[NEW] add brainfuck and brainfuck++ detectors

14 years ago[README] add gperf as dependency
Boris 'billiob' Faure [Sat, 26 Dec 2009 17:06:47 +0000 (18:06 +0100)] 
[README] add gperf as dependency

14 years agoMinGW/MSYS support (and probably for Cygwin too)
Guilherme Balena Versiani [Sun, 27 Dec 2009 04:58:19 +0000 (02:58 -0200)] 
MinGW/MSYS support (and probably for Cygwin too)

14 years agoUse of stat instead of d_type from dirent struct.
Guilherme Balena Versiani [Sun, 27 Dec 2009 04:37:18 +0000 (02:37 -0200)] 
Use of stat instead of d_type from dirent struct.

14 years ago[NEW] Add test that tmp files are found (mostly for centos)
Andy Verprauskus [Tue, 29 Dec 2009 20:06:54 +0000 (12:06 -0800)] 
[NEW] Add test that tmp files are found (mostly for centos)

14 years agoFIX: Allow disambiguate_h to parse keywords at BOL
Michael Wild [Tue, 15 Dec 2009 23:58:10 +0000 (15:58 -0800)] 
FIX: Allow disambiguate_h to parse keywords at BOL

14 years agoChanged ordering of tests:
Michael Wild [Tue, 15 Dec 2009 23:47:31 +0000 (15:47 -0800)] 
Changed ordering of tests:

- believe modeline
- use file-extension
- use file-name
- use UNIX 'file' command

The modeline parsing now allows for non-alphanumeric modes (e.g. C++)
and also queries the extension-table (e.g. C++ is not in the
name-table). It also tries find the lower-case mode name in both tables.

14 years ago[Ticket 3] print full path with ohcount -i
JK [Tue, 15 Dec 2009 23:15:45 +0000 (15:15 -0800)] 
[Ticket 3] print full path with ohcount -i

14 years ago[Ticket 54] Count files only; not directories
Robin Luckey [Tue, 15 Dec 2009 23:08:35 +0000 (15:08 -0800)] 
[Ticket 54] Count files only; not directories

In the course of fixing this problem I discovered that
the gestalt FilenameRule was comparing only to the base
filename, not the entire filepath. This has also been
fixed.

14 years ago[FIX] Ruby binding memory performance improvement
Robin Luckey [Tue, 15 Dec 2009 22:24:21 +0000 (14:24 -0800)] 
[FIX] Ruby binding memory performance improvement

This patch corrects the terrible memory thrashing that occurs when
Ohcount is called through the Ruby binding layer.

Each call into Ohcount is accompanied by an array of filenames. This
list of filenames is used for hinting in detector.c.

For each call into Ohcount, The Ruby binding layer allocated and then
freed a clone of this array of filenames two times -- once in the SWIG
layer, and once in sourcefile.c.

This is OK for small arrays, but in some cases we have thousands of
filenames. This caused a massive amount of heap churn and, eventually,
resulted in kernel OOM panics.

Ohcount no longer clones the list of filenames. Instead, we just use
pointers into the original Ruby strings. Presto: no more heap churn; a
huge boost in speed; and no need to force a Ruby GC after every call
into the library.

14 years ago[Ticket 51] Change license from GPL2 to GPL3
Robin Luckey [Tue, 24 Nov 2009 17:44:00 +0000 (09:44 -0800)] 
[Ticket 51] Change license from GPL2 to GPL3

14 years ago[Ticket 48] Rollback -- do not pclose() twice.
Robin Luckey [Thu, 12 Nov 2009 23:20:44 +0000 (15:20 -0800)] 
[Ticket 48] Rollback -- do not pclose() twice.

14 years ago[Ticket 48] crash on some OSX 10.6 machines; need to close a popen
Andy Verprauskus [Tue, 20 Oct 2009 22:19:51 +0000 (15:19 -0700)] 
[Ticket 48] crash on some OSX 10.6 machines; need to close a popen

14 years agoOH-81 Simplify ohcount.so loading path
Andy Verprauskus [Mon, 12 Oct 2009 20:07:24 +0000 (13:07 -0700)] 
OH-81 Simplify ohcount.so loading path

14 years ago[FIX] remove old file
Andy Verprauskus [Thu, 8 Oct 2009 00:46:03 +0000 (17:46 -0700)] 
[FIX] remove old file