Skip to content

Commit

Permalink
TOOLS/{file2string,matroska}: drop unneeded stdout output
Browse files Browse the repository at this point in the history
This was originally for the waf build, and then later writing the output
to a file was added for meson. Since the waf build is no longer around
anymore, remove the dead code.
  • Loading branch information
Dudemanguy committed Oct 28, 2023
1 parent 891efca commit e76660c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 1 addition & 5 deletions TOOLS/file2string.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ def file2string(infilename, infile, outfile):
outfile.write('"' + ''.join(conv[c] for c in line) + '"\n')

if __name__ == "__main__":
if len(sys.argv) < 2:
outfile = sys.stdout
else:
outfile = open(sys.argv[2], "w")

outfile = open(sys.argv[2], "w")
with open(sys.argv[1], 'rb') as infile:
file2string(sys.argv[1], infile, outfile)
9 changes: 2 additions & 7 deletions TOOLS/matroska.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,15 +463,10 @@ def parse_one(s, depth, parent, maxlen):
def parse_toplevel(s):
parse_one(s, 0, None, 1 << 63)

if len(sys.argv) < 3:
outfile = sys.stdout
else:
outfile = open(sys.argv[2], "w")

if sys.argv[1] == '--generate-header':
generate_C_header(outfile)
generate_C_header(open(sys.argv[2], "w"))
elif sys.argv[1] == '--generate-definitions':
generate_C_definitions(outfile)
generate_C_definitions(open(sys.argv[2], "w"))
else:
s = open(sys.argv[1], "rb")
while 1:
Expand Down

0 comments on commit e76660c

Please sign in to comment.