Copyright (C) 2003 W. Michael Petullo <mike@flyn.org>

pedansee is A program which checks C source files for style

= OVERVIEW =================================================================
	
Pedansee checks C source files for compliance with a particular 
programming style. The style is currently defined by the pedansee 
source code in the form of functions which walk each source file's 
syntax tree. You can modify some aspects of this style through the 
use of regular expressions.

= BUILDING =================================================================

To build, cross your fingers and try:

 1. ./configure
 2. make
 3. make install

Read the ``INSTALL'' file for generic detailed information on installing
this program.
	
= DETAILS ==================================================================
	
Consider the following silly program stored at silly.c:


#include <stdio.h>
#include <glib.h>

float pi = 3.14;

static void foo(void)
{
}

int main(int argc, char *argv)
{
	foo();
	g_print("Hello, world!\n");
}


Running pedansee in the following way would produce the indicated effect:


$ pedansee silly.c -- -I/usr/include/glib-2.0/ -I/usr/lib64/glib-2.0/include/
silly.c:4:7 id pi does not start with silly_
silly.c:6:13 static id silly does not start with '_'
silly.c:6:13 function silly name not on column one
silly.c:10:5 function main name not on column one


Note that pedansee will pass options which follow "--" along to the 
Clang engine which parses the source file. We pass some additional 
header paths in the example above.

Pedansee prefers that silly.c instead contain:


#include <stdio.h>
#include <glib.h>

float silly_pi = 3.14;

static void
_foo(void)
{
}

int
main(int argc, char *argv)
{
	_foo();
	g_print("Hello, world!\n");
}


Pedansee supports configuration files which allow you to configure 
some aspects of its style. For example, the following pedansee.conf 
defines the form static, constant, and exported symbols must follow:


[regex]
        const = [A-Za-z_]*
        static = _[A-Za-z_]*
        exported = [^_][A-Za-z_]*


