X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=tools%2Fremove_cpp_comands.perl;h=0e17c1afd2d7a21d775511265866f2d90d504c7b;hb=d9d692950167a1fa39d9c13f28aa6f16cb36c2ec;hp=a6b8022b05e6b43bf4cfcaaf5e8e2c0be04cc53c;hpb=dec2afe6e87b4be39ac7393a9dd97a2308aac685;p=libfirm diff --git a/tools/remove_cpp_comands.perl b/tools/remove_cpp_comands.perl index a6b8022b0..0e17c1afd 100644 --- a/tools/remove_cpp_comands.perl +++ b/tools/remove_cpp_comands.perl @@ -1,4 +1,18 @@ #!/usr/local/bin/perl + +# +# Project: libFIRM +# File name: ir/tools/remove_cpp_commands.perl +# Purpose: +# Author: Goetz Lindenmaier +# Modified by: +# Created: 8.2002 +# CVS-ID: $Id$ +# Copyright: (c) 2002-2003 Universität Karlsruhe +# Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. +# + +# This is necessary until CRECODER is integrated with the preprocessor. # # Take a C header file and remove all preprocessor commands. # Wrap all typedefs with a preprocessor guard, @@ -33,7 +47,11 @@ print TDF "#ifndef MYTYPEDEFS\n#define MYTYPEDEFS\n"; print TDF "typedef unsigned long size_t;\n"; #print TDF "typedef enum { false = 0, true = 1 } bool;\n"; geht nicht, false und true JAVA Schluesselwoerter print TDF "typedef int bool;\n"; -print TDF "#endif\n"; +# Some typedefs we need because of wrond order resultion by this script +print TDF "#ifndef _ENTITY_TYPEDEF_\n#define _ENTITY_TYPEDEF_\ntypedef struct entity entity;\n#endif\n"; +# Some typedefs we need because we do not include the according header files +print TDF "typedef struct dbg_info dbg_info;\n"; +print TDF "#endif /* MYTYPEDEFS */ \n"; #to collect typedefs $openbracket = 0;