Scott Lawrence [Mon, 18 Apr 2011 15:30:53 +0000 (11:30 -0400)]
add test cases for jam
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
Robin Luckey [Fri, 8 Apr 2011 15:51:18 +0000 (08:51 -0700)]
Merge branch 'master' of https://github.com/bytbox/ohcount
Robin Luckey [Fri, 8 Apr 2011 15:41:46 +0000 (08:41 -0700)]
Merge branch 'master' of https://github.com/chris-morgan/ohcount
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
Robin Luckey [Mon, 7 Feb 2011 21:55:54 +0000 (13:55 -0800)]
'build clean' should remove swig-generated file
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.
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.
Robert Schultz [Wed, 27 Oct 2010 18:50:15 +0000 (14:50 -0400)]
Added support for detecting certain bash scripts as shell scripts
Chris Morgan [Thu, 9 Sep 2010 03:33:11 +0000 (13:33 +1000)]
Added a parser for NSIS files (.nsi, .nsh).
Scott Lawrence [Fri, 23 Jul 2010 20:27:07 +0000 (16:27 -0400)]
updated author information
Scott Lawrence [Fri, 23 Jul 2010 20:24:08 +0000 (16:24 -0400)]
Merge branch 'golang'
Scott Lawrence [Fri, 23 Jul 2010 20:23:55 +0000 (16:23 -0400)]
made README formatting consistent
Scott Lawrence [Fri, 23 Jul 2010 20:20:08 +0000 (16:20 -0400)]
added golang unit tests
Scott Lawrence [Fri, 23 Jul 2010 20:09:18 +0000 (16:09 -0400)]
added golang detection and parsing, based on C
Scott Lawrence [Fri, 23 Jul 2010 18:38:57 +0000 (14:38 -0400)]
added checks for gperf, erroring out if not found
Scott Lawrence [Fri, 23 Jul 2010 18:37:01 +0000 (14:37 -0400)]
added check for ragel
Ken Barber [Tue, 4 May 2010 02:12:26 +0000 (03:12 +0100)]
Added support for the Puppet DSL from Puppetlabs.
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
Jason Turner [Wed, 31 Mar 2010 18:10:29 +0000 (12:10 -0600)]
Add support for ChaiScript - adding missing files from last commit
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.
Robin Luckey [Tue, 30 Mar 2010 18:30:26 +0000 (11:30 -0700)]
FIX - missing newline at end of languages.h
Robin Luckey [Tue, 30 Mar 2010 17:53:10 +0000 (10:53 -0700)]
Merge branch 'wirth'
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.
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.
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.
Robin Luckey [Mon, 15 Mar 2010 19:16:08 +0000 (12:16 -0700)]
Ticket #60 - "build all" should build all
Robin Luckey [Mon, 15 Mar 2010 18:11:56 +0000 (11:11 -0700)]
Ticket #59: Add unit test for *.m4 detection
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.
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
Robin Luckey [Mon, 15 Mar 2010 17:48:50 +0000 (10:48 -0700)]
Merge branch 'clojure' of git://github.com/abscondment/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
abscondment [Mon, 8 Mar 2010 19:32:48 +0000 (11:32 -0800)]
Add support and tests for the Clojure language, a dialect of LISP.
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.
Andy Verprauskus [Thu, 28 Jan 2010 15:34:37 +0000 (07:34 -0800)]
Merge commit 'kraj/doxygen_cleanup'
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
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 07:51:28 +0000 (08:51 +0100)]
Doxygen: document how to build the Doxygen docs
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 07:43:08 +0000 (08:43 +0100)]
Doxygen: document dependency to Bash
Kovarththanan Rajaratnam [Tue, 26 Jan 2010 07:38:12 +0000 (08:38 +0100)]
Doxygen: Point to SourceForge
Andy Verprauskus [Fri, 8 Jan 2010 16:55:55 +0000 (08:55 -0800)]
Merge commit 'billiob/master'
root [Fri, 8 Jan 2010 16:35:46 +0000 (16:35 +0000)]
MOVE setup.py and mingw_setup.py to python/ dir
root [Fri, 8 Jan 2010 16:35:31 +0000 (16:35 +0000)]
Change README to mention build process for ruby and python
root [Fri, 8 Jan 2010 00:52:26 +0000 (00:52 +0000)]
Merge remote branch 'balena/python_only' into python
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.
Boris 'billiob' Faure [Tue, 29 Dec 2009 17:55:10 +0000 (18:55 +0100)]
[NEW] detect the WTF Public License
Boris 'billiob' Faure [Tue, 29 Dec 2009 17:15:43 +0000 (18:15 +0100)]
[NEW] brainfuck++ parser
Boris 'billiob' Faure [Mon, 28 Dec 2009 19:33:05 +0000 (20:33 +0100)]
[NEW] brainfuck parser
Boris 'billiob' Faure [Sun, 27 Dec 2009 17:43:11 +0000 (18:43 +0100)]
[NEW] add brainfuck and brainfuck++ detectors
Boris 'billiob' Faure [Sat, 26 Dec 2009 17:06:47 +0000 (18:06 +0100)]
[README] add gperf as dependency
Guilherme Balena Versiani [Sun, 27 Dec 2009 04:58:19 +0000 (02:58 -0200)]
MinGW/MSYS support (and probably for Cygwin too)
Guilherme Balena Versiani [Sun, 27 Dec 2009 04:37:18 +0000 (02:37 -0200)]
Use of stat instead of d_type from dirent struct.
Andy Verprauskus [Tue, 29 Dec 2009 20:06:54 +0000 (12:06 -0800)]
[NEW] Add test that tmp files are found (mostly for centos)
Michael Wild [Tue, 15 Dec 2009 23:58:10 +0000 (15:58 -0800)]
FIX: Allow disambiguate_h to parse keywords at BOL
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.
JK [Tue, 15 Dec 2009 23:15:45 +0000 (15:15 -0800)]
[Ticket 3] print full path with ohcount -i
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.
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.
Robin Luckey [Tue, 24 Nov 2009 17:44:00 +0000 (09:44 -0800)]
[Ticket 51] Change license from GPL2 to GPL3
Robin Luckey [Thu, 12 Nov 2009 23:20:44 +0000 (15:20 -0800)]
[Ticket 48] Rollback -- do not pclose() twice.
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
Andy Verprauskus [Mon, 12 Oct 2009 20:07:24 +0000 (13:07 -0700)]
OH-81 Simplify ohcount.so loading path
Andy Verprauskus [Thu, 8 Oct 2009 00:46:03 +0000 (17:46 -0700)]
[FIX] remove old file
Andy Verprauskus [Thu, 8 Oct 2009 00:35:48 +0000 (17:35 -0700)]
[FIX] load new centos/ubuntu differentiated binaries and clean them
properly
Andy Verprauskus [Wed, 7 Oct 2009 23:30:37 +0000 (16:30 -0700)]
Merge branch 'master' of ssh://averprauskus@ohcount.git.sourceforge.net/gitroot/ohcount/ohcount
Andy Verprauskus [Fri, 2 Oct 2009 04:39:59 +0000 (21:39 -0700)]
Merge branch 'master' of ssh://averprauskus@ohcount.git.sourceforge.net/gitroot/ohcount/ohcount
Andy Verprauskus [Fri, 2 Oct 2009 04:38:19 +0000 (21:38 -0700)]
[NEW] create separate binaries based on distro
Robin Luckey [Thu, 1 Oct 2009 22:44:21 +0000 (15:44 -0700)]
Merge branch 'master' into prune
Robin Luckey [Thu, 1 Oct 2009 22:43:42 +0000 (15:43 -0700)]
[FIX] Null dereference error in disambiguate_in()
Robin Luckey [Thu, 1 Oct 2009 21:33:10 +0000 (14:33 -0700)]
Merge branch 'master' into prune
Robin Luckey [Thu, 1 Oct 2009 21:32:16 +0000 (14:32 -0700)]
[FIX] Avoid null dereference in disambiguate_inc()
Andy Verprauskus [Wed, 30 Sep 2009 17:38:55 +0000 (10:38 -0700)]
[README] add min gcc version
Robin Luckey [Tue, 22 Sep 2009 23:26:42 +0000 (16:26 -0700)]
[CHANGE] Remove unused .NET-related platforms
Robin Luckey [Tue, 22 Sep 2009 23:06:47 +0000 (16:06 -0700)]
[CHANGE] Remove java_jar, java_import
We aren't using these results, and they generate tons of data.
Can restore later if we need them.
Robin Luckey [Wed, 16 Sep 2009 21:30:36 +0000 (14:30 -0700)]
[NEW] Add .ml4 to the list of OCaml extensions
Andy Verprauskus [Mon, 14 Sep 2009 23:12:14 +0000 (16:12 -0700)]
Merge branch 'master' of ssh://averprauskus@ohcount.git.sourceforge.net/gitroot/ohcount/ohcount
Robin Luckey [Fri, 11 Sep 2009 23:01:05 +0000 (16:01 -0700)]
Merge branch 'master' of ssh://robinluckey@ohcount.git.sourceforge.net/gitroot/ohcount/ohcount
Robin Luckey [Fri, 11 Sep 2009 22:45:33 +0000 (15:45 -0700)]
[CHANGE] Downcase all platform names
Robin Luckey [Fri, 11 Sep 2009 22:14:41 +0000 (15:14 -0700)]
OH-13: Refine Jaspersoft gestalt definitions
Expand definitions to include any use of Jasper brand names in code.
I had to "enhance" the KeywordRule class. Previously, this rule
required a specific language as a parameter. You can now use the rule
with a +nil+ language, and it will match any language.
Andy Verprauskus [Thu, 10 Sep 2009 18:29:05 +0000 (11:29 -0700)]
[FIX] unknown compiler flags are preceeded with -D to pass on to the
source code
Andy Verprauskus [Wed, 9 Sep 2009 21:54:35 +0000 (14:54 -0700)]
[CHANGE] remove bin/ohcount; it should be built by users with ./build
pshiryaev [Mon, 7 Sep 2009 14:46:46 +0000 (18:46 +0400)]
written by
pshiryaev [Mon, 7 Sep 2009 14:30:44 +0000 (18:30 +0400)]
add support for F#
Andy Verprauskus [Fri, 4 Sep 2009 22:26:01 +0000 (15:26 -0700)]
[CHANGE] workaround: $self not working on centos with swig 1.3.29, use
'self'; doesn't seem to affect other platforms
pshiryaev [Mon, 7 Sep 2009 14:46:46 +0000 (18:46 +0400)]
written by
pshiryaev [Mon, 7 Sep 2009 14:30:44 +0000 (18:30 +0400)]
add support for F#
Andy Verprauskus [Fri, 4 Sep 2009 22:07:43 +0000 (15:07 -0700)]
[FIX] non-directory files in /tmp on CentOS have d_type of DT_UNKNOWN
instead of DT_REG
Andy Verprauskus [Wed, 2 Sep 2009 23:37:26 +0000 (16:37 -0700)]
[CHANGE] Add support for FreeBSD (submitted by eg)
Robin Luckey [Wed, 2 Sep 2009 23:11:59 +0000 (16:11 -0700)]
[FIX] Spelling correction for Objective-C
Andy Verprauskus [Tue, 1 Sep 2009 21:50:27 +0000 (14:50 -0700)]
[FIX] exit is a function; why no error/warning on MAC?
Benjamin Kramer [Tue, 1 Sep 2009 17:25:18 +0000 (19:25 +0200)]
[FIX] We really need those null bytes
Benjamin Kramer [Tue, 1 Sep 2009 16:33:26 +0000 (18:33 +0200)]
[FIX] another off-by-one (forgot \0)
Benjamin Kramer [Tue, 1 Sep 2009 15:32:28 +0000 (17:32 +0200)]
[FIX] work around some off-by-one errors
Benjamin Kramer [Tue, 1 Sep 2009 15:31:25 +0000 (17:31 +0200)]
[FIX] line was being used uninitialized
Benjamin Kramer [Tue, 1 Sep 2009 15:29:25 +0000 (17:29 +0200)]
[FIX] sourcefile: detect errors from fread(3)
Andy Verprauskus [Tue, 1 Sep 2009 18:16:33 +0000 (11:16 -0700)]
[FIX] large files crashed during license detection; allocate buffer on
heap, not stack
Andy Verprauskus [Tue, 1 Sep 2009 18:15:48 +0000 (11:15 -0700)]
[FIX] Allocate large buffer on heap, not stack.
Andy Verprauskus [Fri, 28 Aug 2009 23:27:39 +0000 (16:27 -0700)]
[FIX] change git url
Andy Verprauskus [Fri, 28 Aug 2009 22:22:01 +0000 (15:22 -0700)]
[NEW] commit documentation files to repository
I hate to do this, since they are built. And commiting
built files to a source control system is an anti-pattern.
The thing is: not everyone has doxygen installed and
prospective users might want to check out the docs
before deciding whether to dive into ohcount development.
Andy Verprauskus [Fri, 28 Aug 2009 19:36:42 +0000 (12:36 -0700)]
[FIX] crash handling empty file with no file suffix
also fixed possible NULL dereferences in disambiguate cs and pro files
Andy Verprauskus [Sat, 22 Aug 2009 07:22:50 +0000 (00:22 -0700)]
Merge branch 'master' of ssh://averprauskus@ohcount.git.sourceforge.net/gitroot/ohcount/ohcount