--- ncc-2.8.orig/Makefile +++ ncc-2.8/Makefile @@ -2,7 +2,7 @@ # these are set by config CC = g++ DESTDIR ?= /usr -LCFLAGS = -g -O2 +LCFLAGS = -g -O2 -Wno-write-strings BINDIR = ${DESTDIR}/bin MANDIR = ${DESTDIR}/share/man INCLUDEDIR = ${DESTDIR}/include @@ -13,32 +13,32 @@ CFLAGS = $(LCFLAGS) -c -tout: objdir/ncc nccnav/nccnav +tout: objdir/nccgen nccnav/nccnav @echo Salut. install: tout - cp objdir/ncc $(BINDIR)/ncc + cp objdir/nccgen $(BINDIR)/nccgen cp scripts/nccstrip2.py $(BINDIR)/nccstrip2.py - ln -sf $(BINDIR)/ncc $(BINDIR)/nccar - ln -sf $(BINDIR)/ncc $(BINDIR)/nccld - ln -sf $(BINDIR)/ncc $(BINDIR)/nccc++ - ln -sf $(BINDIR)/ncc $(BINDIR)/nccg++ + ln -sf $(BINDIR)/nccgen $(BINDIR)/nccar + ln -sf $(BINDIR)/nccgen $(BINDIR)/nccld + ln -sf $(BINDIR)/nccgen $(BINDIR)/nccc++ + ln -sf $(BINDIR)/nccgen $(BINDIR)/nccg++ cp nccnav/nccnav $(BINDIR)/nccnav ln -fs $(BINDIR)/nccnav $(BINDIR)/nccnavi - cp ncc.1 $(MANDIR)/man1 + cp ncc.1 $(MANDIR)/man1/nccgen.1 cp nccnav/nccnav.1 $(MANDIR)/man1 cp doc/nognu $(INCLUDEDIR) uninstall: - rm -f $(BINDIR)/ncc $(BINDIR)/nccnav $(BINDIR)/nccnavi $(MANDIR)/man1/ncc.1 $(INCLUDEDIR)/nognu + rm -f $(BINDIR)/nccgen $(BINDIR)/nccnav $(BINDIR)/nccnavi $(MANDIR)/man1/nccgen.1 $(INCLUDEDIR)/nognu rm -f $(BINDIR)/nccar $(BINDIR)/nccld $(BINDIR)/nccc++ $(BINDIR)/nccg++ nccnav/nccnav: nccnav/nccnav.C @echo Compiling nccnav viewer. @cd nccnav && make -objdir/ncc: objdir/dbstree.o objdir/inttree.o objdir/lex.o objdir/space.o objdir/cexpand.o objdir/cdb.o objdir/parser.o objdir/ccexpr.o objdir/preproc.o objdir/usage.o main.C - $(CC) $(LCFLAGS) main.C objdir/*.o -o objdir/ncc +objdir/nccgen: objdir/dbstree.o objdir/inttree.o objdir/lex.o objdir/space.o objdir/cexpand.o objdir/cdb.o objdir/parser.o objdir/ccexpr.o objdir/preproc.o objdir/usage.o main.C + $(CC) $(LCFLAGS) main.C objdir/*.o -o objdir/nccgen objdir/cexpand.o: cexpand.C $(CC) $(CFLAGS) cexpand.C @@ -87,5 +87,5 @@ rm -f objdir/*.o distclean: - rm -f objdir/* objdir/ncc + rm -f objdir/* objdir/nccgen @cd nccnav && make clean --- ncc-2.8.orig/ncc.1 +++ ncc-2.8/ncc.1 @@ -1,10 +1,10 @@ -.TH ncc 1 "8 Mar 2003" "Linux" "ncc" +.TH nccgen 1 "8 Mar 2003" "Linux" "nccgen" .SH NAME -ncc \- source code analysis +nccgen \- source code analysis .SH SYNOPSIS -ncc file.c +nccgen \fIfile.c\fR .SH DESCRIPTION -.B ncc +.B nccgen is a program that can help you hack/study the source code of C programs. It will report which functions call which other functions, which functions are called by other functions and what global variables and members of @@ -12,7 +12,7 @@ a program and eventually hack it. .SH USAGE To use -.B ncc +.B nccgen find the .B Makefile of the program you want to analyse. In the @@ -21,7 +21,7 @@ usually something like .B CC = gcc and you must change it to -.B CC = ncc -ncgcc -ncld -ncfabs. +.B CC = nccgen -ncgcc -ncld -ncfabs. Then compile the application. It may be useful to also replace .B AR = ar with @@ -32,7 +32,7 @@ .B LD = nccld to link nccout object files. .SH OUTPUT -.B ncc +.B nccgen will produce a file with .B nccout extension for every C file analysed. --- ncc-2.8.orig/preproc.C +++ ncc-2.8/preproc.C @@ -47,7 +47,7 @@ if (!f) return; char *c = (char*) alloca (strlen (f) + sizeof OUTPUT_EXT); report_stream = fopen (strcat (strcpy (c, f), OUTPUT_EXT), mode); - fprintf (stderr, "ncc: output file is ["COLS"%s"COLE"]\n", c); + fprintf (stderr, "nccgen: output file is ["COLS"%s"COLE"]\n", c); } static void stripout (char *f) @@ -86,7 +86,7 @@ strcat (strcpy (ncobj, obj [i]), OUTPUT_EXT); load_file L (ncobj); if (L.success == ZC_OK) { - fprintf (stderr, "ncc: Linking object file ["COLS"%s"COLE"] (%i bytes)\n", + fprintf (stderr, "nccgen: Linking object file ["COLS"%s"COLE"] (%i bytes)\n", ncobj, L.len); PRINTF (NCCOBJ"%s\n", ncobj); CATFILE (L.data, L.len, report_stream); @@ -157,7 +157,7 @@ n [strlen (n) - 1] = 0; if (OUTF) fclose (OUTF); OUTF = fopen (n, "w"); - fprintf (stderr, "ncc: extract ["COLS"%s"COLE"]\n", n); + fprintf (stderr, "nccgen: extract ["COLS"%s"COLE"]\n", n); } if (OUTF) fputs (tmp, OUTF); @@ -459,11 +459,11 @@ LINK (objfiles, objfileno); if (ofile) stripout (ofile); - } else fprintf (stderr, "ncc: No C source file\n"); + } else fprintf (stderr, "nccgen: No C source file\n"); exit (0); } if (dontdoit) { - fprintf (stderr, "ncc: '-E'. Won't do it...\n"); + fprintf (stderr, "nccgen: '-E'. Won't do it...\n"); exit (0); } if (spp) { --- ncc-2.8.orig/nccnav/Makefile +++ ncc-2.8/nccnav/Makefile @@ -1,12 +1,12 @@ CC = g++ LCFLAGS = -Wall -g -CFLAGS = $(LCFLAGS) -c -g +CFLAGS = $(LCFLAGS) -c -g -Wno-write-strings OBJDIR = ../objdir $(OBJDIR)/nccnav: nccnav.C $(OBJDIR)/dbstree.o $(OBJDIR)/inttree.o - $(CC) -g nccnav.C -I.. -lncurses -o nccnav $(OBJDIR)/dbstree.o $(OBJDIR)/inttree.o + $(CC) -g -Wno-write-strings nccnav.C -I.. -lncurses -o nccnav $(OBJDIR)/dbstree.o $(OBJDIR)/inttree.o $(OBJDIR)/dbstree.o: ../dbstree.[Ch] $(CC) $(CFLAGS) ../dbstree.C -c --- ncc-2.8.orig/nccnav/nccnav.1 +++ ncc-2.8/nccnav/nccnav.1 @@ -16,7 +16,7 @@ .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME -nccnav, nccnavi \- explore the output of ncc on a text-mode console +nccnav, nccnavi \- explore the output of nccgen on a text-mode console .SH SYNOPSIS .B nccnav .RI [ Code.map ] @@ -26,7 +26,7 @@ .SH DESCRIPTION This manual page documents briefly the .B nccnav -command which can be used to browse the output generated by ncc +command which can be used to browse the output generated by nccgen on a set of C / C++ files. .SH COMMANDS (Mode 1) @@ -113,7 +113,7 @@ -ncfabs is rather useful. Note that if a function reports to be defined in more than one - files, this will probably fail. This happens because ncc does + files, this will probably fail. This happens because nccgen does not distinguish different static functions with the same name. They are considered the same thing and their resources are mixed in nccnav. Currently, if nccnav detects more than one @@ -155,7 +155,7 @@ with the UP/DOWN arrows. or RIGHT will expand a new pop-up for the current function. -'q' or LEFT will close the current pop-up and activate the previous one. +\fBq\fR or LEFT will close the current pop-up and activate the previous one. SPACE is available to view the source code. BACKSPACE will close all the popups and return to MODE 2. @@ -169,19 +169,19 @@ key will exit the HISTORY MODE. .SH EXAMPLE -Supposing you've compiled the linux kernel with ncc. +Supposing you've compiled the linux kernel with nccgen. Collecting all the .nccout files can be done with : .TP .B -find . -name \*.nccout | xargs cat > kernel.map +find . -name \\*.nccout | xargs cat > kernel.map .TP You can use pathremover to truncate long paths in `kernel.map'. .TP .B -find . -name \*.nccout | xargs cat | pathremover /mnt/src/hacks/linux-2.4.10/ > kernel.map +find . -name \\*.nccout | xargs cat | pathremover /mnt/src/hacks/linux-2.4.10/ > kernel.map .TP Then, that's viewed with: @@ -191,15 +191,12 @@ nccnav kernel.map .TP -For more information on using ncc on the Linux kernel, please refer to: +For more information on using nccgen on the Linux kernel, please refer to: .TP .B /usr/share/doc/ncc/hacking.LINUX-KERNEL .SH SEE ALSO -.BR ncc (1), -.BR gengraph.py (1), -.BR nccstrip.py (1), -.BR pathremover (1), +.BR nccgen (1) .SH AUTHOR nccnav was written by Stelios Xanthakis . --- ncc-2.8.orig/debian/compat +++ ncc-2.8/debian/compat @@ -0,0 +1 @@ +5 --- ncc-2.8.orig/debian/rules +++ ncc-2.8/debian/rules @@ -0,0 +1,78 @@ +#!/usr/bin/make -f + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + rm -f debian/ncc.substvars + rm -f debian/files + + [ ! -f Makefile ] || $(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install DESTDIR=$(CURDIR)/debian/ncc/usr + + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs -k doc/CHANGES + dh_installdocs -Xdoc/LICENSE -Xdoc/nognu -Xdoc/dbstree.aux \ + -Xdoc/dbstree.dvi -Xdoc/dbstree.log -Xdoc/farg.c \ + -Xdoc/fptr.c README.1.8.rw doc/* scripts + dh_installexamples doc/fptr.c doc/farg.c + dh_installman + dh_link usr/bin/nccgen usr/bin/nccar + dh_link usr/bin/nccgen usr/bin/nccld + dh_link usr/bin/nccgen usr/bin/nccc++ + dh_link usr/bin/nccgen usr/bin/nccg++ + dh_link usr/bin/nccnav usr/bin/nccnavi + dh_link usr/share/man/man1/nccgen.1.gz usr/share/man/man1/nccar.1.gz + dh_link usr/share/man/man1/nccgen.1.gz usr/share/man/man1/nccld.1.gz + dh_link usr/share/man/man1/nccgen.1.gz usr/share/man/man1/nccc++.1.gz + dh_link usr/share/man/man1/nccgen.1.gz usr/share/man/man1/nccg++.1.gz + dh_link usr/share/man/man1/nccnav.1.gz usr/share/man/man1/nccnavi.1.gz + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- ncc-2.8.orig/debian/copyright +++ ncc-2.8/debian/copyright @@ -0,0 +1,17 @@ +This package was debianized by Anuradha Weeraman on +Sat, 9 Sep 2006 10:32:38 +0600. + +It was downloaded from http://students.ceid.upatras.gr/~sxanth/ncc + +Copyright Holder: Stelios Xanthakis + +Program written & Copyright (C) Stelios Xanthakis 2002, 2003, 2004, 2005 + +gengraph.py was written by Jose Vasconcellos +and can be distributed under the terms of GPL. + +You are free to distribute this software under the terms of the +Artistic License. + +On Debian systems, the complete text of the Artistic License +can be found in the file `/usr/share/common-licenses/Artistic'. --- ncc-2.8.orig/debian/control +++ ncc-2.8/debian/control @@ -0,0 +1,19 @@ +Source: ncc +Section: devel +Priority: optional +Maintainer: Anuradha Weeraman +Build-Depends: debhelper (>= 5.0.0), libncurses5-dev +Standards-Version: 3.8.4 +Uploaders: NIIBE Yutaka +Homepage: http://students.ceid.upatras.gr/~sxanth/ncc/ +DM-Upload-Allowed: yes + +Package: ncc +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, python +Description: C source code analyzer + A small, extensible tool that provides program analysis data of C + source code. This data can be used to analyze the function call flow + of programs with tools such as graphviz and springgraph. Included + with this distribution is nccnav that can be used to study the call + hierarchy of C source code on a text-mode console. --- ncc-2.8.orig/debian/dirs +++ ncc-2.8/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/share/man/man1 +usr/include --- ncc-2.8.orig/debian/watch +++ ncc-2.8/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://students.ceid.upatras.gr/~sxanth/ncc/ncc-(.*)\.tar\.gz --- ncc-2.8.orig/debian/README.Debian +++ ncc-2.8/debian/README.Debian @@ -0,0 +1,10 @@ +ncc for Debian +-------------- + +Since ncc-2.7-2, /usr/bin/ncc has been renamed to /usr/bin/nccgen to prevent +conflict with nemerle as identified by RC bug #407405. This is a Debian specific +change as upstream continues to keep the existing name. + +Apologies to existing users of ncc for the inconvenience caused. + +-- Anuradha Weeraman (anu) Sat, 15 Dec 2007 23:18:18 -0500 --- ncc-2.8.orig/debian/changelog +++ ncc-2.8/debian/changelog @@ -0,0 +1,84 @@ +ncc (2.8-1) unstable; urgency=low + + * New upstream release. + * debian/control (Depends): Added python and ${misc:Depends}. + (Standards-Version): Conforms to 3.8.4. + + -- NIIBE Yutaka Mon, 08 Feb 2010 11:25:55 +0900 + +ncc (2.7-3) unstable; urgency=low + + * Lintian cleanups + * Changed maintainer uid + * Added DM-Upload-Allowed to debian/control + + -- Anuradha Weeraman Thu, 22 May 2008 00:33:05 -0400 + +ncc (2.7-2) unstable; urgency=medium + + * Upgraded to Standard-Version 3.7.3 + * Renamed /usr/bin/ncc to /usr/bin/nccgen (Closes: #407405) + * Urgency medium because this fixes RC bug + * Removed "Conflict: nemerle" from debian/control + * Added README.Debian + + -- Anuradha Weeraman (anu) Sat, 15 Dec 2007 23:18:18 -0500 + +ncc (2.7-1) unstable; urgency=low + + * New upstream release + * Added -Wno-write-strings to compiler flags + * Moved gengraph.py to /usr/share/doc/scripts (Closes: #411134) + * Removed dependency on Python + * Fixed lintian warning + + -- Anuradha Weeraman (anu) Sat, 01 Dec 2007 14:50:09 -0500 + +ncc (2.6-5) unstable; urgency=low + + * Added gengraph.py and man page to /usr/bin (Closes: #411134) + + -- Anuradha Weeraman (anu) Wed, 30 May 2007 23:49:52 -0400 + +ncc (2.6-4) unstable; urgency=low + + * Conflicts with nemerle. Updated control file (Closes: #407405) + * Typo in Uploader field + + -- Anuradha Weeraman (anu) Fri, 19 Jan 2007 20:38:29 -0500 + +ncc (2.6-3) unstable; urgency=low + + * Updated changelog (Closes: #387415) + + -- Anuradha Weeraman (anu) Sat, 30 Dec 2006 15:27:24 -0500 + +ncc (2.6-2) unstable; urgency=low + + * Updated debian/control + + -- Anuradha Weeraman (anu) Sat, 30 Dec 2006 15:19:03 -0500 + +ncc (2.6-1) unstable; urgency=low + + * New upstream release. + * Updated debhelper compatibility level + * Added NIIEBE Yutaka as the uploader + * Added NCC homepage to debian/control + * Updated Standards-version to 3.7.2 + * Added debian/watch file + * Updated Build-depends + + -- Anuradha Weeraman (anu) Sat, 30 Dec 2006 13:03:46 -0500 + +ncc (2.5-2) unstable; urgency=low + + * Fixed debian/control. + + -- Anuradha Weeraman (anu) Tue, 26 Dec 2006 14:56:44 -0500 + +ncc (2.5-1) unstable; urgency=low + + * Initial release. + + -- Anuradha Weeraman (anu) Fri, 22 Dec 2006 14:47:14 -0500