remove some historical artifacts * pretty.build: build system is already pretty baroque and we are not using this anywhere in CI etc. * rename.sh: only used for internal renaming. can be retrieved from git history if needed again. * tombc/grammer.txt: ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
diff --git a/makefile b/makefile
index f013a59..8c3f992 100644
--- a/makefile
+++ b/makefile
@@ -120,9 +120,6 @@ coveralls: lcov
docdvi poster docs mandvi manual:
$(MAKE) -C doc/ $@ V=$(V)
-pretty:
- perl pretty.build
-
.PHONY: pre_gen
pre_gen:
mkdir -p pre_gen
diff --git a/pretty.build b/pretty.build
deleted file mode 100644
index a708b8a..0000000
--- a/pretty.build
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/perl -w
-#
-# Cute little builder for perl
-# Total waste of development time...
-#
-# This will build all the object files and then the archive .a file
-# requires GCC, GNU make and a sense of humour.
-#
-# Tom St Denis
-use strict;
-
-my $count = 0;
-my $starttime = time;
-my $rate = 0;
-print "Scanning for source files...\n";
-foreach my $filename (glob "*.c") {
- ++$count;
-}
-print "Source files to build: $count\nBuilding...\n";
-my $i = 0;
-my $lines = 0;
-my $filesbuilt = 0;
-foreach my $filename (glob "*.c") {
- printf("Building %3.2f%%, ", (++$i/$count)*100.0);
- if ($i % 4 == 0) { print "/, "; }
- if ($i % 4 == 1) { print "-, "; }
- if ($i % 4 == 2) { print "\\, "; }
- if ($i % 4 == 3) { print "|, "; }
- if ($rate > 0) {
- my $tleft = ($count - $i) / $rate;
- my $tsec = $tleft%60;
- my $tmin = ($tleft/60)%60;
- my $thour = ($tleft/3600)%60;
- printf("%2d:%02d:%02d left, ", $thour, $tmin, $tsec);
- }
- my $cnt = ($i/$count)*30.0;
- my $x = 0;
- print "[";
- for (; $x < $cnt; $x++) { print "#"; }
- for (; $x < 30; $x++) { print " "; }
- print "]\r";
- my $tmp = $filename;
- $tmp =~ s/\.c/".o"/ge;
- if (open(SRC, "<$tmp")) {
- close SRC;
- } else {
- !system("make $tmp > /dev/null 2>/dev/null") or die "\nERROR: Failed to make $tmp!!!\n";
- open( SRC, "<$filename" ) or die "Couldn't open $filename for reading: $!";
- ++$lines while (<SRC>);
- close SRC or die "Error closing $filename after reading: $!";
- ++$filesbuilt;
- }
-
- # update timer
- if (time != $starttime) {
- my $delay = time - $starttime;
- $rate = $i/$delay;
- }
-}
-
-# finish building the library
-printf("\nFinished building source (%d seconds, %3.2f files per second).\n", time - $starttime, $rate);
-print "Compiled approximately $filesbuilt files and $lines lines of code.\n";
-print "Doing final make (building archive...)\n";
-!system("make > /dev/null 2>/dev/null") or die "\nERROR: Failed to perform last make command!!!\n";
-print "done.\n";
\ No newline at end of file
diff --git a/rename.sh b/rename.sh
deleted file mode 100755
index e09e833..0000000
--- a/rename.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-function rename {
- old_file=$1
- new_file=$2
- old_name=$3
- new_name=$4
- grep $old_name "tommath_private.h" | perl -p -e "s/^(.*)$old_name(.*)/MP_DEPRECATED($new_name) \\1$old_name\\2/" >> deprecated.h
- echo "#ifdef ${old_file^^}_C" >> bn_deprecated.c
- grep $old_name "tommath_private.h" \
- | perl -p -e "s/^int $old_name(.*);/\$b=\$1;\$x=\$1;\$x =~ s#(const *)?mp_int *\* *|(int|mp_digit|unsigned char *\*) *##g;\"int $old_name\$b { return $new_name\$x; }\"/e" \
- | perl -p -e "s/^void $old_name(.*);/\$b=\$1;\$x=\$1;\$x =~ s#(const *)?mp_int *\* *|(int|mp_digit|unsigned char *\*) *##g;\"void $old_name\$b { $new_name\$x; }\"/e" >> bn_deprecated.c
- echo "#endif" >> bn_deprecated.c
- git mv $old_file.c $new_file.c
- git ls-files | grep -v rename.sh | grep -v changes.txt | xargs sed -E -i "s/$old_name([^\.])/$new_name\1/g"
- git ls-files | grep -v rename.sh | grep -v changes.txt | xargs sed -E -i "s/$old_file\./$new_file./g"
- git ls-files | grep -v rename.sh | grep -v changes.txt | xargs sed -E -i "s/${old_file^^}/${new_file^^}/g"
-}
-
-echo -n > deprecated.h
-echo "#define MP_DEPRECATED(n)" >> bn_deprecated.c
-echo "#include <tommath_private.h>" > bn_deprecated.c
-
-rename bn_fast_mp_invmod bn_s_mp_invmod_fast fast_mp_invmod s_mp_invmod_fast
-rename bn_fast_mp_montgomery_reduce bn_s_mp_montgomery_reduce_fast fast_mp_montgomery_reduce s_mp_montgomery_reduce_fast
-rename bn_fast_s_mp_mul_digs bn_s_mp_mul_digs_fast fast_s_mp_mul_digs s_mp_mul_digs_fast
-rename bn_fast_s_mp_mul_high_digs bn_s_mp_mul_high_digs_fast fast_s_mp_mul_high_digs s_mp_mul_high_digs_fast
-rename bn_fast_s_mp_sqr bn_s_mp_sqr_fast fast_s_mp_sqr s_mp_sqr_fast
-rename bn_mp_balance_mul bn_s_mp_balance_mul mp_balance_mul s_mp_balance_mul
-rename bn_mp_exptmod_fast bn_s_mp_exptmod_fast mp_exptmod_fast s_mp_exptmod_fast
-rename bn_mp_invmod_slow bn_s_mp_invmod_slow mp_invmod_slow s_mp_invmod_slow
-rename bn_mp_karatsuba_mul bn_s_mp_karatsuba_mul mp_karatsuba_mul s_mp_karatsuba_mul
-rename bn_mp_karatsuba_sqr bn_s_mp_karatsuba_sqr mp_karatsuba_sqr s_mp_karatsuba_sqr
-rename bn_mp_toom_mul bn_s_mp_toom_mul mp_toom_mul s_mp_toom_mul
-rename bn_mp_toom_sqr bn_s_mp_toom_sqr mp_toom_sqr s_mp_toom_sqr
-rename bn_reverse bn_s_mp_reverse bn_reverse s_mp_reverse
-
-deprecated=$(cat deprecated.h)
-rm deprecated.h
-perl -pi -e "s/\/\* deprecated functions \*\/\n/\/* deprecated functions *\/\n$deprecated\n/g" tommath_private.h
-
-git ls-files | grep makefile | xargs sed -E -i "s/bn_error.o/bn_deprecated.o bn_error.o/g"
diff --git a/tombc/grammar.txt b/tombc/grammar.txt
deleted file mode 100644
index a780e75..0000000
--- a/tombc/grammar.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-program := program statement | statement | empty
-statement := { statement } |
- identifier = numexpression; |
- identifier[numexpression] = numexpression; |
- function(expressionlist); |
- for (identifer = numexpression; numexpression; identifier = numexpression) { statement } |
- while (numexpression) { statement } |
- if (numexpresion) { statement } elif |
- break; |
- continue;
-
-elif := else statement | empty
-function := abs | countbits | exptmod | jacobi | print | isprime | nextprime | issquare | readinteger | exit
-expressionlist := expressionlist, expression | expression
-
-// LR(1) !!!?
-expression := string | numexpression
-numexpression := cmpexpr && cmpexpr | cmpexpr \|\| cmpexpr | cmpexpr
-cmpexpr := boolexpr < boolexpr | boolexpr > boolexpr | boolexpr == boolexpr |
- boolexpr <= boolexpr | boolexpr >= boolexpr | boolexpr
-boolexpr := shiftexpr & shiftexpr | shiftexpr ^ shiftexpr | shiftexpr \| shiftexpr | shiftexpr
-shiftexpr := addsubexpr << addsubexpr | addsubexpr >> addsubexpr | addsubexpr
-addsubexpr := mulexpr + mulexpr | mulexpr - mulexpr | mulexpr
-mulexpr := expr * expr | expr / expr | expr % expr | expr
-expr := -nexpr | nexpr
-nexpr := integer | identifier | ( numexpression ) | identifier[numexpression]
-
-identifier := identifer digits | identifier alpha | alpha
-alpha := a ... z | A ... Z
-integer := hexnumber | digits
-hexnumber := 0xhexdigits
-hexdigits := hexdigits hexdigit | hexdigit
-hexdigit := 0 ... 9 | a ... f | A ... F
-digits := digits digit | digit
-digit := 0 ... 9