]> arthur.barton.de Git - bup.git/commitdiff
Rename datagen.c to randomgen.c, to better reflect its purpose.
authorAvery Pennarun <apenwarr@gmail.com>
Thu, 31 Dec 2009 19:45:04 +0000 (14:45 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 31 Dec 2009 19:45:04 +0000 (14:45 -0500)
.gitignore
Makefile
datagen.c [deleted file]
randomgen.c [new file with mode: 0644]

index c80ee66be1be4ca4a0b0e30558be9d16ee899cbf..7b336d5051d0e6939c2fd5bfb554cd142ac80520 100644 (file)
@@ -1,7 +1,7 @@
 bup
 bup-split
 bup-join
-datagen
+randomgen
 *.o
 *.so
 *~
index b07f7d07a78729b3c5ea577f38957d4857b06447..1ecc388bef85e459538b7cb085fe1477ee6647f7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,9 @@ CFLAGS=-Wall -g -O2 -Werror -I/usr/include/python2.5 -g -fPIC
 
 default: all
 
-all: bup-split bup-join bup datagen hashsplit.so
+all: bup-split bup-join bup randomgen hashsplit.so
 
-datagen: datagen.o
+randomgen: randomgen.o
 
 hashsplit.so: hashsplitmodule.o
        $(CC) -shared -o $@ $<
@@ -40,5 +40,5 @@ bup-%: cmd-%.sh
 
 clean:
        rm -f *.o *.so *~ .*~ *.pyc \
-               bup bup-split bup-join datagen \
+               bup bup-split bup-join randomgen \
                out[12] tags[12]
diff --git a/datagen.c b/datagen.c
deleted file mode 100644 (file)
index 946f7c4..0000000
--- a/datagen.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-int main(int argc, char **argv)
-{
-    if (argc != 2)
-    {
-       fprintf(stderr, "usage: %s <kbytes>\n", argv[0]);
-       return 1;
-    }
-    
-    int kbytes = atoi(argv[1]);
-    uint32_t buf[1024/4];
-    int i;
-    
-    for (; kbytes > 0; kbytes--)
-    {
-       for (i = 0; i < sizeof(buf)/sizeof(buf[0]); i++)
-           buf[i] = random();
-       write(1, buf, sizeof(buf));
-       if (!(kbytes%1024))
-           fprintf(stderr, ".");
-    }
-    
-    return 0;
-}
diff --git a/randomgen.c b/randomgen.c
new file mode 100644 (file)
index 0000000..946f7c4
--- /dev/null
@@ -0,0 +1,28 @@
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+int main(int argc, char **argv)
+{
+    if (argc != 2)
+    {
+       fprintf(stderr, "usage: %s <kbytes>\n", argv[0]);
+       return 1;
+    }
+    
+    int kbytes = atoi(argv[1]);
+    uint32_t buf[1024/4];
+    int i;
+    
+    for (; kbytes > 0; kbytes--)
+    {
+       for (i = 0; i < sizeof(buf)/sizeof(buf[0]); i++)
+           buf[i] = random();
+       write(1, buf, sizeof(buf));
+       if (!(kbytes%1024))
+           fprintf(stderr, ".");
+    }
+    
+    return 0;
+}