commit 7574f53a653835bc062ed42281dc93406b01b22c
parent 241d708b99db0dacbf9a06c6d8275b2151eeb44b
Author: sin <sin@2f30.org>
Date: Sat, 19 Dec 2015 11:08:05 +0000
Rename to storrent
Diffstat:
7 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/Makefile b/Makefile
@@ -8,21 +8,21 @@ LDFLAGS =
OBJ =\
ben.o\
- sbtd.o\
sha1.o\
sock.o\
+ storrent.o\
torrent.o\
tracker.o\
util.o
-BIN = sbtd
+BIN = storrent
all: $(BIN)
$(BIN): $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS)
-$(OBJ): queue.h sbtd.h sha1.h
+$(OBJ): queue.h sha1.h storrent.h
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
diff --git a/ben.c b/ben.c
@@ -6,7 +6,7 @@
#include <stdlib.h>
#include <string.h>
-#include "sbtd.h"
+#include "storrent.h"
static char *parse(char *, char *, struct ben **);
diff --git a/sbtd.c b/sbtd.c
@@ -1,27 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "sbtd.h"
-
-static void
-usage(char *argv0)
-{
- fprintf(stderr, "usage: %s torrent\n", argv0);
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- struct torrent *t;
-
- if (argc != 2)
- usage(argv[0]);
- if (!(t = loadtorrent(argv[1])))
- exit(1);
- dumptorrent(t);
- unloadtorrent(t);
- exit(0);
-}
diff --git a/storrent.c b/storrent.c
@@ -0,0 +1,27 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "storrent.h"
+
+static void
+usage(char *argv0)
+{
+ fprintf(stderr, "usage: %s torrent\n", argv0);
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ struct torrent *t;
+
+ if (argc != 2)
+ usage(argv[0]);
+ if (!(t = loadtorrent(argv[1])))
+ exit(1);
+ dumptorrent(t);
+ unloadtorrent(t);
+ exit(0);
+}
diff --git a/sbtd.h b/storrent.h
diff --git a/torrent.c b/torrent.c
@@ -5,8 +5,8 @@
#include <stdlib.h>
#include <string.h>
-#include "sbtd.h"
#include "sha1.h"
+#include "storrent.h"
static void
calcinfohash(struct torrent *t)
diff --git a/util.c b/util.c
@@ -10,8 +10,8 @@
#include <string.h>
#include <unistd.h>
-#include "sbtd.h"
#include "sha1.h"
+#include "storrent.h"
void *
emalloc(size_t size)