Import of historical isdn4linux CVS tree ('isdn' module)
Go to file
Kai Germaschewski 8c6c17493c patches from 2.4.0-test12-6
o remove unneeded includes
o flags needs to be long for set/test_..._bit
2000-12-06 16:58:01 +00:00
Documentation add Ovislink ISDN sc100-p card 2000-09-19 14:43:55 +00:00
drivers/isdn patches from 2.4.0-test12-6 2000-12-06 16:58:01 +00:00
include/linux Added new PCI device from Abocom/Magitek 2000-12-04 22:34:58 +00:00
.config Cosmetic stuff, adds for diehl 1998-06-17 22:17:59 +00:00
Makefile Na? 1999-08-31 23:52:57 +00:00
README.preparser add preparser tool see README.preparser 1999-09-12 16:36:44 +00:00
Rules.make Changed install target to modules_install 1997-03-24 23:04:49 +00:00
capi2kern scripts to check capi stuff against a kernel. 2000-11-01 14:02:37 +00:00
capidiff scripts to check capi stuff against a kernel. 2000-11-01 14:02:37 +00:00
do_indent make it a little bit foolprof 1999-10-11 22:12:52 +00:00
patch_isdnbits_linux-2.4.0-test9 add new netfilter target ISDNDIAL (natfilter/Postrouting). 2000-10-28 19:31:13 +00:00
preparser if only a ";" is left, remove the whole line 1999-10-11 22:14:14 +00:00
stackcheck Bugfix. 1999-04-12 14:52:28 +00:00
std2kern compatibility cleanup - final part for the time being 2000-11-25 17:01:02 +00:00
stddiff Modifications for new eicon driver. 2000-04-02 22:00:49 +00:00
v2.2.14.ctrl copies of v2.2.17.ctrl - if you need lower versions, just copy it yourself. 2000-11-30 08:29:42 +00:00
v2.2.15.ctrl copies of v2.2.17.ctrl - if you need lower versions, just copy it yourself. 2000-11-30 08:29:42 +00:00
v2.2.16.ctrl copies of v2.2.17.ctrl - if you need lower versions, just copy it yourself. 2000-11-30 08:29:42 +00:00
v2.2.17.ctrl *** empty log message *** 2000-11-28 11:28:39 +00:00
v2.2.18.ctrl *** empty log message *** 2000-11-28 11:28:39 +00:00
v2.4.ctrl more compatibility cleanup 2000-11-19 17:41:04 +00:00

README.preparser

"preparser" is a little tool to resolve special macros and conditional 
preprocessor code in C files. 

The special marcro and conditions are given in a control file.

The control file use the same syntax like the C preprocessor directives
"#define" and "#undef" plus a "#delete" command.
You can also use C-Comments in it.
Here are 2 implicit conditional defines in "preparser" for "#if 0"
and "#if 1" code segments.

Control file syntax:

#delete <item to delete>
#define <name> <value>
#undef <name>

<name> maybe also a function. 

/* example control file */
#delete #include <linux/isdn_compat.h>
#define GET_USER get_user
#define PUT_USER put_user
#define idev_kfree_skb(a,b) dev_kfree_skb(a)
#define COMPAT_HAS_NEW_SYMTAB
#undef COMPAT_HAS_NEW_SETUP
/* end of example control file */

What does the Programm ?
1. It copies a input file into a output file (or stdout) 
2. While copying it deletes all items given in #delete (exact string
   matching).
3. While copying it resolve the marcros given in the control file.
4. It resolve any "#ifdef" "#ifndef" "#if" related to the marcros given in
   the control file. Note: in the moment it don't calculate a value after
   an "#if" directive, if here is a "#define" in the control file for
   the string after "#if" and the value of that "#define" is empty, "#if" is
   handled as false, if a value is given it is handled as true. 
5. All items inside "strings" or C comments are not modified. 

Usage

   ./preparser [options] <input file> [output file]

     Valid options are:

  -d                  increase debug level
  -c,-C <controlfile> Use control file
  -?                  Usage ; printout this information


"preparser" was written to write Linux portable Linux kernel code (portable
in the sense "portable between various kernel versions") and to remove
experimental code from C files. This avoid that contructs based on
KERNELVERSION are going into standard kernel.


Karsten Keil
keil@isdn4linux.de

PS: If you like to get the source, request it by mail.