1 #*************************************************************************
3 #* $Workfile: dbgxtor.awk
5 #* Ersterstellung JP 05.10.95
6 #* Letzte Aenderung $Author: hr $ $Date: 2000-09-18 17:14:27 $
7 #* $Revision: 1.1.1.1 $
9 #* $Logfile: T:/sw/inc/poolfmt.awv $
11 #* Copyright (c) 1990-1996, STAR DIVISION
13 #*************************************************************************
16 # Dieses awk-script generiert ein cxx-file, das alle PoolIds der Vorlage dumpt.
17 # wird fuer den HelpPI gebraucht.
18 # Aufruf: awk -f poolid.awk poolfmt.hxx > poolid.cxx
20 # poolid.exe > ???.hrc
24 print "// This is an outputfile of an awk-script: $Workfile: poolfmt.awk $"
25 print "#include <solar.h> "
27 print "#include <stdio.h>"
28 print "#include <stdlib.h>"
30 print "#pragma hdrstop"
32 print "#include <iostream.hxx> "
33 print "#include \"poolfmt.hxx\""
39 print "void main( int , char *[] ) {"
41 print " int nSize = (sizeof(ppPoolIds) / sizeof(PoolFmtIds)) - 1;"
42 print " for( int n = 0; n < nSize; n++ )"
43 print " printf( \"" sStr
" %s\\t%8d\\n\", ppPoolIds[ n ].pStr, ppPoolIds[ n ].nId );"
47 function TableHead
() {
49 print "struct PoolFmtIds { int nId; const char* pStr; };"
50 print "static PoolFmtIds ppPoolIds[] = {"
53 function TableTail
() {
63 /^
[ \t]*RES_
/ && !
index( $
1, "_BEGIN" ) && !
index( $
1, "_END" ) && !
index( $
1, "_POOL_" ) {
65 split( $
1, sStr
, "," );
66 print " " sStr
[1] ", \"" sStr
[1] "\","