Rename input.h to bitsource.h (and friends).
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 3 Jan 2009 10:15:43 +0000 (11:15 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 3 Jan 2009 10:15:43 +0000 (11:15 +0100)
Makefile
bitsource.c [moved from input.c with 98% similarity]
bitsource.h [moved from input.h with 97% similarity]
bitsource_test.c [moved from input_test.c with 99% similarity]
dehuff.h

index 2adef55..4784dce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,11 +8,11 @@ UNSTUFF_TEST_OBJS=unstuff.o unstuff_test.o
 unstuff_test: $(UNSTUFF_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(UNSTUFF_TEST_OBJS)
 
-INPUT_TEST_OBJS=input.o input_test.o
-input_test: $(INPUT_TEST_OBJS)
-       $(CC) $(LDFLAGS) -o $@ $(INPUT_TEST_OBJS)
+BITSOURCE_TEST_OBJS=bitsource.o bitsource_test.o
+bitsource_test: $(BITSOURCE_TEST_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(BITSOURCE_TEST_OBJS)
 
-DEHUFF_TEST_OBJS=dehuff.o input.o dehuff_test.o
+DEHUFF_TEST_OBJS=dehuff.o bitsource.o dehuff_test.o
 dehuff_test: $(DEHUFF_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(DEHUFF_TEST_OBJS)
 
@@ -20,15 +20,15 @@ BYTESOURCE_TEST_OBJS=bytesource.o choice.o unstuff.o bytesource_test.o
 bytesource_test: $(BYTESOURCE_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(BYTESOURCE_TEST_OBJS)
 
-tests: unstuff_test input_test dehuff_test bytesource_test
+tests: unstuff_test bitsource_test dehuff_test bytesource_test
 clean:
        $(RM) $(UNSTUFF_TEST_OBJS) unstuff_test
-       $(RM) $(INPUT_TEST_OBJS) input_test
+       $(RM) $(BITSOURCE_TEST_OBJS) bitsource_test
        $(RM) $(DEHUFF_TEST_OBJS) dehuff_test
        $(RM) $(DEHUFF_TEST_OBJS) bytesource_test
 
 test: tests
        ./unstuff_test
-       ./input_test
+       ./bitsource_test
        ./dehuff_test
        ./bytesource_test
similarity index 98%
rename from input.c
rename to bitsource.c
index 6c4630f..72b143b 100644 (file)
--- a/input.c
@@ -3,7 +3,7 @@
 #include <stdbool.h>
 #include <string.h>
 
-#include "input.h"
+#include "bitsource.h"
 
 #define MARKER_CHAR 0xff
 #define STUFF_MARKER 0x00
similarity index 97%
rename from input.h
rename to bitsource.h
index 19315e5..e5bdd28 100644 (file)
--- a/input.h
@@ -1,5 +1,5 @@
-#ifndef _INPUT_H
-#define _INPUT_H 1
+#ifndef _BITSOURCE_H
+#define _BITSOURCE_H 1
 
 #include <assert.h>
 #include <stddef.h>
@@ -93,4 +93,4 @@ static inline unsigned peek_bits(struct bit_source* source, unsigned num_bits)
        return (source->bits >> (BITRESERVOIR_SIZE - num_bits));
 }
 
-#endif /* !defined(_INPUT_H) */
+#endif /* !defined(_BITSOURCE_H) */
similarity index 99%
rename from input_test.c
rename to bitsource_test.c
index 57fae74..2b5217f 100644 (file)
@@ -4,7 +4,7 @@
 #include <time.h>
 #include <sys/time.h>
 
-#include "input.h"
+#include "bitsource.h"
 
 struct custom_read_userdata {
        uint8_t* bytes;
index 3d3d8c5..728c623 100644 (file)
--- a/dehuff.h
+++ b/dehuff.h
@@ -6,7 +6,7 @@
 #include <sys/types.h>
 
 #include "bytesource.h"
-#include "input.h"
+#include "bitsource.h"
 
 // About 99% of all Huffman codes are <= 8 bits long (see codelen.txt),
 // and it's what libjpeg uses. Thus, it seems like a reasonable size.