diff options
| author | Klaatu Sverige <[email protected]> | 2015-08-05 21:31:21 +0000 |
|---|---|---|
| committer | Klaatu Sverige <[email protected]> | 2015-08-05 21:31:21 +0000 |
| commit | 86f0721bd904d8163c5f8f2472b78169146cc67d (patch) | |
| tree | cf9e61bd495c73ece45b96242e6f575af228d01d /riemann.fmi.uni-sofia.bg/ngetty/ngetty-1.1/get_headers | |
| parent | 75a501d32dff3c1c1ee9a2a3dc6d5b704cc7c6d1 (diff) | |
added website data, because it had heaps of good tutorials and info
Diffstat (limited to 'riemann.fmi.uni-sofia.bg/ngetty/ngetty-1.1/get_headers')
| -rwxr-xr-x | riemann.fmi.uni-sofia.bg/ngetty/ngetty-1.1/get_headers | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/riemann.fmi.uni-sofia.bg/ngetty/ngetty-1.1/get_headers b/riemann.fmi.uni-sofia.bg/ngetty/ngetty-1.1/get_headers new file mode 100755 index 0000000..a18b474 --- /dev/null +++ b/riemann.fmi.uni-sofia.bg/ngetty/ngetty-1.1/get_headers @@ -0,0 +1,25 @@ +#!/bin/sh +[ $# -lt 2 ] && exit 1 + +export PATH=/bin:/usr/bin +name=`echo $1 | sed -e 's/\./__DOT__/g' -e 's/\//__SLASH__/g'` +shift + +echo '#ifndef' AUTO_FILE__$$__$name +echo '#define' AUTO_FILE__$$__$name +echo '/* '`date`' */' + +while test $# -gt 0; do + case $1 in + -L*) echo $1 | sed -e 's/^../#include "/' -e 's/$/"/' ; shift;; + -G*) echo $1 | sed -e 's/^../#include </' -e 's/$/>/' ; shift;; + -I*) echo $1 | sed -e 's/^../#include /'; shift;; + *) break;; + esac +done + +if [ $# -gt 0 ] ; then + sed -n -e 's/\(.*\) \/\*EXTRACT_INCL\*\/.*/extern \1;/p' \ + -e 's/ \/\*EXTRACT_UNMOD\*\/.*//p' $@ +fi +echo '#endif' |
