From 91cae85c32022e4156be8b14487ce0fbc49814bc Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 1 Oct 1999 08:28:01 +0000 Subject: [PATCH] Optionally bracket all external declarations of init functions with "ifndef"s. --- Mac/Tools/macfreeze/macfreeze.py | 4 ++-- Mac/Tools/macfreeze/macgen_src.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mac/Tools/macfreeze/macfreeze.py b/Mac/Tools/macfreeze/macfreeze.py index 2f43e204d17..8c7a7da4508 100644 --- a/Mac/Tools/macfreeze/macfreeze.py +++ b/Mac/Tools/macfreeze/macfreeze.py @@ -38,7 +38,7 @@ def main(): if mustwait: sys.exit(1) -def process(gentype, program, output, modules=[], module_files=[], debug=0): +def process(gentype, program, output, modules=[], module_files=[], debug=0, with_ifdef=0): try: module_dict = macmodulefinder.process(program, modules, module_files, debug) except macmodulefinder.Missing, arg: @@ -54,7 +54,7 @@ def process(gentype, program, output, modules=[], module_files=[], debug=0): return 1 # So the user can inspect it elif gentype == 'source': import macgen_src - warnings = macgen_src.generate(output, module_dict, debug) + warnings = macgen_src.generate(output, module_dict, debug, with_ifdef) return warnings elif gentype == 'resource': import macgen_rsrc diff --git a/Mac/Tools/macfreeze/macgen_src.py b/Mac/Tools/macfreeze/macgen_src.py index 198d403b549..c3e45411e8f 100644 --- a/Mac/Tools/macfreeze/macgen_src.py +++ b/Mac/Tools/macfreeze/macgen_src.py @@ -15,7 +15,7 @@ PROJECT_TEMPLATE=os.path.join(TEMPLATEDIR, ':frozen.prj') CONFIG_TEMPLATE=os.path.join(TEMPLATEDIR, ':templatefrozenconfig.c') BUNDLE_TEMPLATE=os.path.join(TEMPLATEDIR, ':frozenbundle.rsrc') -def generate(output, module_dict, debug=0): +def generate(output, module_dict, debug=0, with_ifdef=0): problems = 0 output_created=0 if not os.path.exists(output): @@ -91,7 +91,7 @@ def generate(output, module_dict, debug=0): c_modules.append(module) ifp = open(CONFIG_TEMPLATE) ofp = open(config_name, 'w') - makeconfig.makeconfig(ifp, ofp, c_modules) + makeconfig.makeconfig(ifp, ofp, c_modules, with_ifdef) ifp.close() ofp.close() MacOS.SetCreatorAndType(config_name, 'CWIE', 'TEXT')