# # Complete and useful programs # *char: char.c Convert 8 bit integer arguments into characters and print them. *errno: errno.c Print error descriptions for errno value(s). *isascii: isascii.c Print character classification table. *lsm-genstruct.awk: Helper tool for bootstrapping and maintaining Linux Security Modules. Generates a file containing a struct security_operations from an appropriate kernels security.h include file. This file can (and should) be kept truly generic, which means it can simply be regenerated if the module is to be ported to a new kernel version. *lsm-skeleton.awk: Helper tool for bootstrapping Linux Security Modules. Generates a file containing a stub function for every hook defined in security.h as well as some supporting functions. The generated code supports LSM stacking, i.e. another LSM can be registered with this module. Bugs: some stub functions may need editing as the script doesn't recognize trailing comments in argument lists. As of kernel 2.4.26 and 2.6.6 this applies to task_post_setuid(). *odiff: odiff.c Binary (aka octal) diff. Print differences of binary files in hex, octal decimal as well as ascii, if appropriate. *pathconf: pathconf.c Print runtime path limits accessible via pathconf() for filesystems specified by path names. *psf: Extremly tiny process listing command for Linux with output similar to 'ps axf'. *sizeof: Print size of different C data types to standard output. *sysconf: sysconf.c Print runtime system limits accessible via sysconf(). tidytex: Clean out temporary TeX files. *xc: xc.c Print possible error descriptions for exit codes. *xor: xor.c Calculate exclusive or of program arguments. # # Other useful stuff # berlinos_debug.h: Header file defining macros for flexible handling of error, informational and debugging messages for C programs. Uses the standard NDEBUG macro to avoid including debugging related output functions in release state binaries. Output can go to stderr or (and) syslog. While debugging output includes filenames and line numbers, warnings, as well as error and info messages, don't. Error, warning and debug messages are prefixed with an appropriate string. buildpkg.mk: Makefile for generating standard software packages (deb, rpm, etc) Uses EPM (currently) to build the packages. EPM generates all necessary control files (debian/rules, RPM spec-files). *epmhelper: Helper program used by buildpkg.mk. *pcapstats.awk: pcapstats.awk pcapstats Print statistics about packets captured by tcpdump. This shows how to use sort from within an awk script to get partially sorted output. # # Occasionally useful but no developed code # *elfdump: elfdump.c Print some infromation from ELF binary files. Needs libelf. # # Stub programs that can be used to bootstrap other programs # *lock.sh: Mutual exclusive execution lockfile handling for (bourne) shells. # # Code for demonstrating the usage of things # dingbats.dvi dingbats.ps dingbats.pdf: dingbats.tex Cheatsheet for using Zapf Dingbats fonts with LaTeX. *Linux-prctl: Linux-prctl.c Show usage of Linux prctl system call to have a child process terminate when parent exits. Note that this is the opposite effect of SIGCHLD. *printfx: printfx.c Shows the effect of different options with hexadecimal printf format specs. *rangepat.awk: Demonstrate the usage of pattern range matching in awk scripts. This code also shows how to open a standard input file in the BEGIN block so that it does not need to be specified on the command line. *sizeof: sizeof.c - sizeof on arrays - sizeof compared to strlen - sizes of common data types as reported by sizeof(). *staticInit: staticInit.c Shows the effect of explicit initializers with static variables.