parser.add_option("--mode", type="choice", metavar="<FUNCTIONS|S3PROTO|LIBPROTO|PARAMDEFS|PARAMTABLE>",
choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS", "PARAMTABLE"], default="FUNCTIONS")
parser.add_option("--scope", metavar="<GLOBAL|LOCAL>",
- choices = ["GLOBAL", "LOCAL"], default="GLOBAL")
+ choices=["GLOBAL", "LOCAL"], default="GLOBAL")
(options, args) = parser.parse_args()
if options.output is None:
parser.error("No output file specified")
+
def iterate_all(path):
"""Iterate and yield all the parameters.
"ustring" : "_STRING",
}
+
def generate_functions(path_in, path_out):
f = open(path_out, 'w')
try:
'ustring' : 'char *',
}
+
def make_s3_param_proto(path_in, path_out):
file_out = open(path_out, 'w')
try:
else:
raise Exception(parameter['name'] + " has an invalid param type " + parameter['type'])
-
file_out.write(output_string)
finally:
file_out.close()
+
def get_header(path):
header = os.path.basename(path).upper()
header = header.replace(".", "_").replace("\\", "_").replace("-", "_")
return "__%s__" % header
+
def make_param_defs(path_in, path_out, scope):
file_out = open(path_out, 'w')
try:
"ustring" : "P_USTRING",
}
+
def make_param_table(path_in, path_out):
file_out = open(path_out, 'w')
try: