It has been designed to work with ANSI C, incorporating K&R, and most popular GNU extensions.
(The cxref program only works for C not C++, I have no plans to produce a C++ version.)
The documentation for the program is produced from comments in the code that are appropriately formatted. The cross referencing comes from the code itself and requires no extra work.
The documentation is produced for each of the following:
- A comment that applies to the whole file.
- A comment for the function, including a description of each of the arguments and the return value.
- A comment for each of a group of variables and/or individual variables.
- A comment for each included file.
- A comment for each pre-processor symbol definition, and for macro arguments.
- Type definitions
- A comment for each defined type and for each element of a structure or union type.
As an example, the file README.c has been put through cxref to give HTML output.
The cross referencing is performed for the following items
- The files that the current file is included in (even when included via other files).
- Files included in the current file.
- Files included by these files etc.
- The location of the definition of external variables.
- The files that have visibility of global variables.
- The files / functions that use the variable.
- The file that the function is prototyped in.
- The functions that the function calls.
- The functions that call the function.
- The files and functions that reference the function.
- The variables that are used in the function.
A much more extensive example of the output of the program can be seen in the cxref output for the cxref source code itself.
These pages were generated by using the cxref command on each source file using the following command line (for cxref.c):
cxref -Oexample -Ncxref -html-src cxref.cThe same command line format was used for each file in turn and the whole set of commands run twice to first collect cross references then produce the output. The full set of output was generated by running make docs on the cxref source code.
To help with problems encountered in using the program, there is a FAQ.
Probably only useful for historical interest is a web page that describes how cxref was used with the Linux kernel source code many years ago.
- Bug Fixes:
- Updated for latest version of autoconf.
Allow structure initialisers to have multiple components (e.g. a.b=1).
Remove gcc warning messages.
Change Makefile for better comptibility with FreeBSD.
The full version history is in the NEWS file.
Version 1.6c of cxref released on Mon May 31 2010
Version 1.6b of cxref released on Fri Feb 16 2007
Version 1.6a of cxref released on Sun May 1 2005
Version 1.6 of cxref released on Sun Sep 26 2004
Version 1.5g of cxref released on Sat Feb 14 2004
Version 1.5f of cxref released on Sat Feb 14 2004
Version 1.5e of cxref released on Sun June 29 2003
Version 1.5d of cxref released on Sun May 5 2002
Version 1.5c of cxref released on Sat Apr 28 2001
Version 1.5b of cxref released on Sun Sep 26 1999
Version 1.5a of cxref released on Fri Jun 18 1999
Version 1.5 of cxref released on Sun Feb 21 1999
Version 1.4b of cxref released on Sat Apr 18 1998
Version 1.4a of cxref released on Thu Nov 20 1997
Version 1.4 of cxref released on Sat Jul 5 1997
Version 1.3 of cxref released on Sun Dec 8 1996
Version 1.2b of cxref released on Sun Oct 5 1996
Version 1.2a of cxref released on Sat Aug 17 1996
Version 1.2 of cxref released on Sat Jul 6 1996
Version 1.1 of cxref released on Wed May 22 1996
Version 1.0 of cxref released on Sat Feb 24 1996
The source code for the latest and a few older versions can be found in the download directory on my new web site (follow the banner link at the top of the page).
Starting in 2013 there will be two types of software releases (if needed):
Formal releases which are the traditional method used for this software with version numbers like 1.6d. These will continue to be released when there are major changes or important bug fixes and each release includes full updates for release documentation. For these releases announcements will be made in the following locations:
- On this web page.
- With a new file in the download directory.
- On the equivalent web page on my new web site (see banner link at the top of the page).
- With a new file in the download directory on the new web site which includes an RSS feed for notification of new files.
- By an announcement on freecode.com (formerly known as freshmeat.net) which offers an RSS feed for each project.
Informal, intermediate, releases which have not previously been used for this software and will have version numbers like 1.6d-svnxyz. These will be used for small bug fixes or minor improvements to functionality. For these releases there will only be the software and directly related documentation changes, not a complete release documentation update. These informal versions will only be available from my new web site download directory and included in the RSS feed found there.