diff --git a/.gitignore b/.gitignore index 36f971e..8082911 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ bin/* + +*.txt diff --git a/bit.txt b/bit.txt deleted file mode 100644 index 038a8a3..0000000 --- a/bit.txt +++ /dev/null @@ -1 +0,0 @@ -010010000110010101101100011011000110111100001010 \ No newline at end of file diff --git a/jabber.c b/jabber.c index f70057b..4f09567 100644 --- a/jabber.c +++ b/jabber.c @@ -59,13 +59,15 @@ void jabber( FILE *ifp, FILE *ofp ) { int index = 0; int bits = 0; - for (int i = 0; i < sz; ++i) { + int i; + for (i = 0; i < sz; ++i) { char c = buffer[i]; if (c == '0') { if (cursor -> zero == NULL) { // Print index - for (int j = bits - 1; j >= 0; --j) { + int j; + for (j = bits - 1; j >= 0; --j) { fputc('0' + ((cursor -> index >> j) & 1), ofp); } @@ -82,7 +84,8 @@ void jabber( FILE *ifp, FILE *ofp ) { } else if (c == '1') { if (cursor -> one == NULL) { // Print index - for (int j = bits - 1; j >= 0; --j) { + int j; + for (j = bits - 1; j >= 0; --j) { fputc('0' + ((cursor -> index >> j) & 1), ofp); } @@ -110,13 +113,16 @@ void jabber( FILE *ifp, FILE *ofp ) { } // Final index - for (int j = bits - 1; j >= 0; --j) { + int j; + for (j = bits - 1; j >= 0; --j) { fputc('0' + ((cursor -> index >> j) & 1), ofp); } //printTree(root, 0); } + +int rec[1]; //int rec[1000000]; void printTree(node * curr, int depth) { diff --git a/kapow.txt b/kapow.txt deleted file mode 100644 index c6bc86f..0000000 Binary files a/kapow.txt and /dev/null differ diff --git a/out.txt b/out.txt deleted file mode 100644 index e965047..0000000 --- a/out.txt +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/wocky.c b/wocky.c index c7c04b2..9c71c0d 100644 --- a/wocky.c +++ b/wocky.c @@ -66,7 +66,8 @@ void wocky ( FILE *ifp, FILE *ofp ) { int read = 0; // Number of bits currently read char c; - for (int i = 0; i <= sz; ++i) { + int i; + for (i = 0; i <= sz; ++i) { c = buffer[i]; if (read == length) { // Print prefix at index @@ -76,7 +77,8 @@ void wocky ( FILE *ifp, FILE *ofp ) { if (t_length == t_capacity) { // Double capacity element ** new_table = malloc(2 * t_capacity * sizeof(element*)); - for (int j = 0; j < t_capacity; ++j) { + int j; + for (j = 0; j < t_capacity; ++j) { new_table[j] = table[j]; } free(table); diff --git a/zap.txt b/zap.txt deleted file mode 100644 index 7aa160c..0000000 --- a/zap.txt +++ /dev/null @@ -1 +0,0 @@ -0010101000110010101110011100011001001111101001010101101010100100100001 \ No newline at end of file