Commit Graph

13 Commits

Author SHA1 Message Date
dhiebert 1a623bb733 Resolved compiler warnings with gcc-4.2.1 compiler.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@747 c5d04d22-be80-434c-894e-aa346cc9e8e8
2009-11-06 02:33:37 +00:00
elliotth 81a577defd trunk/ctags.1: (Bug #1745301) clarify the "--options" option.
trunk/lregex.c: 
trunk/options.c: 
trunk/parse.c: improve the "unknown language" error messages.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@576 c5d04d22-be80-434c-894e-aa346cc9e8e8
2007-06-30 04:16:23 +00:00
elliotth 5770338e98 trunk/lregex.c:
trunk/read.c: avoid more warnings about freeing/deleting null pointers by adding more special cases. "make test" doesn't spot any of these, but by varying your command line you can cause failures.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@544 c5d04d22-be80-434c-894e-aa346cc9e8e8
2007-06-04 02:14:45 +00:00
elliotth 9e399dbf18 trunk/lregex.c: fix a compiler warning on systems that don't have regular expression support, and make it clear that regex.h is a system header.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@538 c5d04d22-be80-434c-894e-aa346cc9e8e8
2007-06-02 06:27:57 +00:00
elliotth 7d841621f4 trunk/args.c:
trunk/asm.c: 
trunk/beta.c: 
trunk/eiffel.c: 
trunk/fortran.c: 
trunk/jscript.c: 
trunk/lregex.c: 
trunk/main.c: 
trunk/options.c: 
trunk/pascal.c: 
trunk/read.c: 
trunk/routines.c: 
trunk/routines.h: 
trunk/sml.c: 
trunk/sql.c: fix almost all our current memory leaks. Based on a patch from Dmitry Antipov, but also using his vString leak detector and valgrind(1) to find new ones and ones he missed. Three known leaks remain. The first is in parseLongOption. There's also one in "fortran.c" and another in "sql.c":

helium:~/Projects/ctags/trunk$ valgrind --leak-check=full --show-reachable=yes ./dctags -f - Test/*
==3056== Memcheck, a memory error detector.
==3056== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==3056== Using LibVEX rev 1658, a library for dynamic binary translation.
==3056== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==3056== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework.
==3056== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==3056== For more details, rerun with: -v
==3056== 
.
.
.
==3056== 
==3056== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 13 from 1)
==3056== malloc/free: in use at exit: 708 bytes in 22 blocks.
==3056== malloc/free: 36,126 allocs, 36,104 frees, 1,584,216 bytes allocated.
==3056== For counts of detected errors, rerun with: -v
==3056== searching for pointers to 22 not-freed blocks.
==3056== checked 68,184 bytes.
==3056== 
==3056== 68 bytes in 2 blocks are definitely lost in loss record 1 of 2
==3056==    at 0x4021620: malloc (vg_replace_malloc.c:149)
==3056==    by 0x806347E: eMalloc (routines.c:238)
==3056==    by 0x8065B68: newToken (sql.c:347)
==3056==    by 0x80662BB: parseSubProgram (sql.c:688)
==3056==    by 0x8067867: parseSqlFile (sql.c:1782)
==3056==    by 0x8067934: findSqlTags (sql.c:1810)
==3056==    by 0x8060760: createTagsForFile (parse.c:618)
==3056==    by 0x8060810: createTagsWithFallback (parse.c:640)
==3056==    by 0x80608DC: parseFile (parse.c:667)
==3056==    by 0x805B7D6: createTagsForEntry (main.c:303)
==3056==    by 0x805B811: createTagsForArgs (main.c:348)
==3056==    by 0x805BD6F: makeTags (main.c:494)
==3056== 
==3056== 
==3056== 640 bytes in 20 blocks are still reachable in loss record 2 of 2
==3056==    at 0x4021620: malloc (vg_replace_malloc.c:149)
==3056==    by 0x806347E: eMalloc (routines.c:238)
==3056==    by 0x806AEE2: vStringNew (vstring.c:116)
==3056==    by 0x80542C0: newToken (fortran.c:419)
==3056==    by 0x8054309: newTokenFrom (fortran.c:429)
==3056==    by 0x80562E5: parseInterfaceBlock (fortran.c:1709)
==3056==    by 0x805661D: parseDeclarationConstruct (fortran.c:1834)
==3056==    by 0x805679F: parseSpecificationPart (fortran.c:1901)
==3056==    by 0x80569F5: parseModule (fortran.c:1990)
==3056==    by 0x8056E05: parseProgramUnit (fortran.c:2142)
==3056==    by 0x8056F37: findFortranTags (fortran.c:2183)
==3056==    by 0x806077A: createTagsForFile (parse.c:620)
==3056== 
==3056== LEAK SUMMARY:
==3056==    definitely lost: 68 bytes in 2 blocks.
==3056==      possibly lost: 0 bytes in 0 blocks.
==3056==    still reachable: 640 bytes in 20 blocks.
==3056==         suppressed: 0 bytes in 0 blocks.

I think they're both awkward longjmp(3)/setjmp(3)-related leaks, and I don't currently have a good solution. ("eiffel.c" cunningly only calls newToken once, before calling setjmp(3).)


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@536 c5d04d22-be80-434c-894e-aa346cc9e8e8
2007-06-02 06:09:00 +00:00
elliotth 5d188ab6e2 trunk/lregex.c: give more informative and easier to search for errors when regcomp(3) fails.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@535 c5d04d22-be80-434c-894e-aa346cc9e8e8
2007-06-01 05:49:44 +00:00
darren 923467510f Reformatted code for independence of tab stop setting.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@443 c5d04d22-be80-434c-894e-aa346cc9e8e8
2006-05-30 04:37:13 +00:00
darren 74e1bb9ea3 Moved __unused__ attributes for compatibility with gcc-3.2.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@338 c5d04d22-be80-434c-894e-aa346cc9e8e8
2003-07-11 01:21:54 +00:00
darren 66f16b6564 Updated copyright dates.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@316 c5d04d22-be80-434c-894e-aa346cc9e8e8
2003-04-01 04:55:28 +00:00
darren 6e5aadba1f Removed indenting of output for --list-kinds when one language is desired.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@275 c5d04d22-be80-434c-894e-aa346cc9e8e8
2003-02-23 18:38:12 +00:00
darren 6a7e3ae45b Added support for new options: --list-languages, --list-kinds, and --list-maps.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@273 c5d04d22-be80-434c-894e-aa346cc9e8e8
2003-02-23 18:23:10 +00:00
darren 026a29d467 Changed return value of matchRegex().
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@224 c5d04d22-be80-434c-894e-aa346cc9e8e8
2002-10-17 21:08:40 +00:00
darren 6a0c1ddba2 Renamed regex.c module to lregex.c.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@169 c5d04d22-be80-434c-894e-aa346cc9e8e8
2002-07-11 01:18:13 +00:00