File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ for i in * .c; do git mv $i ${i/ bn_/ } ; done
3
+
4
+ git mv cutoffs.c mp_cutoffs.c
5
+ git mv deprecated.c mp_deprecated.c
6
+ git mv prime_tab.c mp_prime_tab.c
7
+ sed -E -i " s/CUTOFFS_C/MP_CUTOFFS_C/g" tommath_class.h tommath_superclass.h mp_cutoffs.c
8
+ sed -E -i " s/DEPRECATED_C/MP_DEPRECATED_C/g" tommath_class.h tommath_superclass.h mp_deprecated.c
9
+ sed -E -i " s/PRIME_TAB_C/MP_PRIME_TAB_C/g" tommath_class.h tommath_superclass.h mp_prime_tab.c
10
+
11
+ sed -E -i ' s/BN_([_A-Z0-9]*_C)/\1/g' * .c * /* .c etc/* .c * .h
12
+ sed -E -i " s/bn_([_a-z0-9]*\.c)/\1/g" * .c * /* .c
13
+
14
+ sed -E -i " s/'BN_' \. //g" helper.pl
15
+ sed -E -i " s/BN_//g" helper.pl
16
+ sed -E -i " s/bn\*.c/*mp_*.c/g" helper.pl
17
+ sed -E -i " s/bn\*.c/*mp_*.c/g" gen.pl
18
+
19
+ sed -E -i " s/bn_//g" doc/bn.tex
20
+ sed -E -i ' s/BN\\_//g' doc/bn.tex
21
+
22
+ sed -E -i " s/BN_H_/TOMMATH_H_/g" tommath.h
23
+ sed -E -i " s/TOMMATH_PRIV_H_/TOMMATH_PRIVATE_H_/g" tommath_private.h
24
+ sed -E -i ' s/BN_##//' tommath_private.h
25
+ sed -E -i " s/BN_MP_DIV_SMALL/MP_DIV_SMALL/g" * .c * .h
26
+
27
+ sed -E -i ' s/LTM_ERR/LBL_ERR/g' * .c * /* .c
28
+
29
+ ./helper.pl -u
30
+
31
+ git rm move.sh
32
+ git add .
33
+ git commit -m ' Execute move.sh - Rename files from bn_* to match the function names.
34
+
35
+ * git blame <renamed-file> is not affected
36
+ * git log --follow <renamed-file> can be used to show log across renames'
37
+
38
+ ./helper.pl -a
You can’t perform that action at this time.
0 commit comments