The Cxref Homepage


C Cross Referencing & Documenting tool

Cxref is a program that will produce documentation (in LaTeX, HTML, RTF or SGML) including cross-references from C program source code.
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:

Files
A comment that applies to the whole file.
Functions
A comment for the function, including a description of each of the arguments and the return value.
Variables
A comment for each of a group of variables and/or individual variables.
#include
A comment for each included file.
#define
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.
Any or all of these comments can be present in suitable places in the source code.
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

Each of these items is cross referenced in the output.

Detailed Information

The program comes with more detailed information. There is a README, which contains an example of the output of the program.

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.c
The 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.

Version Status

The latest released version available is version 1.6d.

Recent Changes

The most recent changes in version 1.6d are listed below.
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.

Full History

Version 1.6d of cxref released on Mon Oct 3 2011
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

Download

The source code for the latest and a few recent versions are in the download directory.

Mailing List

There is a mailing list available for announcements about new versions of Cxref. This will only be used by me to send announcements about new versions of Cxref, it is not for Cxref discussions.

To subscribe to this list send an e-mail to cxref-announce-request "at" gedanken.demon.co.uk with subscribe in the body.

Feedback

I am happy to answer questions that you have about the program. Please just drop me an email to <amb "at" gedanken.demon.co.uk> don't forget to put cxref in the subject so that it ends up in the right mailbox.