aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/f2c.py
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /build/scripts/f2c.py
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/f2c.py')
-rw-r--r--build/scripts/f2c.py64
1 files changed, 32 insertions, 32 deletions
diff --git a/build/scripts/f2c.py b/build/scripts/f2c.py
index 7021e1391f..9775895d3b 100644
--- a/build/scripts/f2c.py
+++ b/build/scripts/f2c.py
@@ -3,31 +3,31 @@ import subprocess
import argparse
import os
-
-header = '''\
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wmissing-braces"
-#pragma GCC diagnostic ignored "-Wuninitialized"
-#pragma GCC diagnostic ignored "-Wreturn-type"
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#endif
-
-'''
-
-footer = '''
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
-'''
-
-
-def mkdir_p(directory):
- if not os.path.exists(directory):
- os.makedirs(directory)
-
-
+
+header = '''\
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wmissing-braces"
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
+'''
+
+footer = '''
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+'''
+
+
+def mkdir_p(directory):
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
+
if __name__ == '__main__':
parser = argparse.ArgumentParser()
@@ -36,12 +36,12 @@ if __name__ == '__main__':
parser.add_argument('-o', '--output')
args = parser.parse_args()
- tmpdir = args.output + '.f2c'
- mkdir_p(tmpdir)
+ tmpdir = args.output + '.f2c'
+ mkdir_p(tmpdir)
# should parse includes, really
- p = subprocess.Popen(
- [args.tool, '-w', '-R', '-a', '-I' + os.path.dirname(args.input), '-T' + tmpdir],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
+ p = subprocess.Popen(
+ [args.tool, '-w', '-R', '-a', '-I' + os.path.dirname(args.input), '-T' + tmpdir],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdout, stderr = p.communicate(input=open(args.input).read())
ret = p.wait()
@@ -53,6 +53,6 @@ if __name__ == '__main__':
print >>sys.stderr, stderr
with open(args.output, 'w') as f:
- f.write(header)
+ f.write(header)
f.write(stdout)
- f.write(footer)
+ f.write(footer)