Lines Matching +full:open +full:- +full:source
5 def count_enclosed_functions (source): argument
9 for ch in source:
18 return -1
21 def find_function_prototype (source, proto_name): argument
22 proto_re = "(^[a-zA-Z_ \t]+\s+%s[^a-zA-Z0-9_]\s*\([^\)]+\)\s+;\n)" % (proto_name)
23 proto_result = re.search (proto_re, source, re.MULTILINE | re.DOTALL)
29 def find_function_definition (source, func_name): argument
30 func_re = "(\n[a-zA-Z_ \t]+\n%s[^a-zA-Z0-9_].* /\* %s \*/\n)" % (func_name, func_name)
31 func_result = re.search (func_re, source, re.MULTILINE | re.DOTALL)
43 def find_include (source, inc_name): argument
45 inc_result = re.search (inc_re, source, re.MULTILINE | re.DOTALL)
51 def find_assign_statement (source, var_name): argument
53 var_result = re.search (var_re, source, re.MULTILINE | re.DOTALL)
59 #--------------------------------------------------------------------------------
61 def remove_include (source, inc_name): argument
62 inc_text = find_include (source, inc_name)
67 source = string.replace (source, inc_text, "")
68 return source
70 def remove_assign (source, assign_name): argument
71 assign_text = find_assign (source, inc_name)
76 source = string.replace (source, inc_text, "")
77 return source
79 def remove_prototype (source, proto_name): argument
80 proto_text = find_function_prototype (source, proto_name)
85 source = string.replace (source, proto_text, "")
86 return source
88 def remove_function (source, func_name): argument
89 func_text = find_function_definition (source, func_name)
94 source = string.replace (source, func_text, "/* Function %s() removed here. */\n" % func_name)
95 return source
97 def remove_all_assignments (source, var): argument
100 assign_text = find_assign_statement (source, var)
107 source = string.replace (source, assign_text, "")
109 return source
113 #----------------------------------------------------------------
116 source_code = open (filename, 'r').read ()
121 open (filename, 'w').write (source_code)
124 source_code = open (filename, 'r').read ()
128 open (filename, 'w').write (source_code)
131 source_code = open (filename, 'r').read ()
135 open (filename, 'w').write (source_code)
138 source_code = open (filename, 'r').read ()
142 open (filename, 'w').write (source_code)
145 source_code = open (filename, 'r').read ()
149 open (filename, 'w').write (source_code)
152 source_code = open (filename, 'r').read ()
160 source_code = source_code [:start_index-1] + source_code [end_index:] ;
162 open (filename, 'w').write (source_code)
165 file_text = open (filename, 'r').read ()
168 open (filename, 'w').write (file_text)
171 file_text = open (filename, 'r').read ()
173 open (filename, 'w').write (file_text)
176 file_text = open (filename, 'r').read ()
179 open (filename, 'w').write (file_text)
185 file = open (filename)
200 data = open (filename, 'r').read ()
203 file = open (filename, 'w')
210 tar_gz_file = "%s-%s.tar.gz" % (package, version)
227 package_version = "%s-%s" % (conf_package, conf_version)
228 lite_version = "%s_lite-%s" % (conf_package, conf_version)
230 os.system ("rm -rf %s%s.tar.gz" % (source_dir, package_version))
239 os.system ("rm -rf %s" % package_version)
245 os.system ("rm -rf %s" % lite_version)
251 print "Removing un-neeed directories."
255 os.system ("rm -rf %s" % dir_name)
257 print "Removing un-needed files."
277 #----------------------------------------------------------------------------
294 #----------------------------------------------------------------------------
308 #----------------------------------------------------------------------------
340 'psf-\>write_float', 'psf\-\>write_double',
341 'psf-\>read_float', 'psf\-\>read_double' ])
343 #----------------------------------------------------------------------------
353 'psf-\>write_float', 'psf\-\>write_double',
354 'psf-\>read_float', 'psf\-\>read_double' ])
356 #----------------------------------------------------------------------------
367 'psf-\>write_float', 'psf\-\>write_double',
368 'psf-\>read_float', 'psf\-\>read_double' ])
370 #----------------------------------------------------------------------------
379 'psf-\>write_float', 'psf\-\>write_double',
380 'psf-\>read_float', 'psf\-\>read_double' ])
382 #----------------------------------------------------------------------------
400 #----------------------------------------------------------------------------
416 #----------------------------------------------------------------------------
441 'paf-tests', 'svx-tests', 'nist-tests', 'ircam-tests', 'voc-tests',
442 'mat4-tests', 'mat5-tests', 'pvf-tests', 'xi-tests', 'htk-tests',
443 'sds-tests'
465 #----------------------------------------------------------------------------
470 print "Building and testing source."
471 # Try --disable-shared --disable-gcc-opt
472 if os.system ("./reconfigure.mk && ./configure --disable-shared --disable-gcc-opt && make check"):
473 os.system ('PS1="FIX > " bash --norc')
478 os.system ('PS1="FIX > " bash --norc')
484 os.system ('PS1="FIX > " bash --norc')
489 os.system ("rm -rf /tmp/%s" % lite_version)