summaryrefslogtreecommitdiffstats
path: root/indenters/example.py
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-07-16 15:18:45 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-07-16 15:18:45 +0900
commitd017bd37253ae35b29d82e3277b9adcbb4517dd0 (patch)
treed884d5cf71c4dd350d1abcf752c438e117a872d5 /indenters/example.py
parenta0148cf62fc298126980a7dc27603b123e1d764c (diff)
downloaduniversal-indent-gui-tqt-d017bd37253ae35b29d82e3277b9adcbb4517dd0.tar.gz
universal-indent-gui-tqt-d017bd37253ae35b29d82e3277b9adcbb4517dd0.zip
Convert files to unix format. Convert C++ header names to C header names.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'indenters/example.py')
-rwxr-xr-xindenters/example.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/indenters/example.py b/indenters/example.py
index d6525aa..a975cb2 100755
--- a/indenters/example.py
+++ b/indenters/example.py
@@ -1,23 +1,23 @@
-#! /usr/bin/env python
-"Replace CRLF with LF in argument files. Print names of changed files."
-
-import sys, os
-
-def main():
- for filename in sys.argv[1:]:
- if os.path.isdir(filename):
- print filename, "Directory!"
- continue
- data = open(filename, "rb").read()
- if '\0' in data:
- print filename, "Binary!"
- continue
- newdata = data.replace("\r\n", "\n")
- if newdata != data:
- print filename
- f = open(filename, "wb")
- f.write(newdata)
- f.close()
-
-if __name__ == '__main__':
- main()
+#! /usr/bin/env python
+"Replace CRLF with LF in argument files. Print names of changed files."
+
+import sys, os
+
+def main():
+ for filename in sys.argv[1:]:
+ if os.path.isdir(filename):
+ print filename, "Directory!"
+ continue
+ data = open(filename, "rb").read()
+ if '\0' in data:
+ print filename, "Binary!"
+ continue
+ newdata = data.replace("\r\n", "\n")
+ if newdata != data:
+ print filename
+ f = open(filename, "wb")
+ f.write(newdata)
+ f.close()
+
+if __name__ == '__main__':
+ main()