| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/python | |
| 2 # | |
| 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 # | |
| 7 | |
| 8 """ | |
| 9 Some common boilerplates and helper functions for source code generation | |
| 10 in files dgen_test_output.py and dgen_decode_output.py. | |
| 11 """ | |
| 12 | |
| 13 HEADER_BOILERPLATE =""" | |
| 14 /* | |
| 15 * Copyright 2012 The Native Client Authors. All rights reserved. | |
| 16 * Use of this source code is governed by a BSD-style license that can | |
| 17 * be found in the LICENSE file. | |
| 18 */ | |
| 19 | |
| 20 // DO NOT EDIT: GENERATED CODE | |
| 21 """ | |
| 22 | |
| 23 NOT_TCB_BOILERPLATE=""" | |
| 24 #ifndef NACL_TRUSTED_BUT_NOT_TCB | |
| 25 #error This file is not meant for use in the TCB | |
| 26 #endif | |
| 27 | |
| 28 """ | |
| 29 | |
| 30 def ifdef_name(filename): | |
| 31 """ Generates the ifdef name to use for the given filename""" | |
| 32 return filename.replace("/", "_").replace(".", "_").upper() + "_" | |
| OLD | NEW |