Import of historical isdn4linux CVS tree ('isdn' module)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Martin Bachem 3a24517201 obsolete interface for HFC-S USB driver, use hisax_if.h for loadable HiSax drivers instead 18 years ago
Documentation implement Ringing and Proceeding status display in ttyI 21 years ago
drivers/isdn obsolete interface for HFC-S USB driver, use hisax_if.h for loadable HiSax drivers instead 18 years ago
include/linux implement Ringing and Proceeding status display in ttyI 21 years ago
.config Cosmetic stuff, adds for diehl 25 years ago
Makefile Na? 23 years ago
README.preparser add preparser tool see README.preparser 23 years ago
Rules.make Changed install target to modules_install 26 years ago
capi2kern scripts to check capi stuff against a kernel. 22 years ago
capidiff scripts to check capi stuff against a kernel. 22 years ago
do_indent make it a little bit foolprof 23 years ago
preparser if only a ";" is left, remove the whole line 23 years ago
stackcheck Bugfix. 24 years ago
std2kern also compare md5sums.asc 21 years ago
stddiff compatibility changes from KERNEL_2_4 22 years ago
v2.2.14.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.2.15.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.2.16.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.2.17.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.2.18.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.2.19.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.2.20.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago
v2.4.ctrl isapnp_driver is now part of <linux/isapnp.h> (since 2.4.15) 21 years ago

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.