aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile (renamed from src/Makefile)9
-rw-r--r--btasktd.13
-rw-r--r--btasktd.c (renamed from src/btasktd.c)15
-rw-r--r--cliflags.c (renamed from src/cliflags.c)0
-rw-r--r--cliflags.h (renamed from src/cliflags.h)0
-rw-r--r--db.c (renamed from src/db.c)0
-rw-r--r--db.h (renamed from src/db.h)0
-rwxr-xr-xdist.sh7
8 files changed, 17 insertions, 17 deletions
diff --git a/src/Makefile b/Makefile
index c09b5a5..6def93e 100644
--- a/src/Makefile
+++ b/Makefile
@@ -15,6 +15,11 @@ DEBUG =
STATIC = -static -s
# STATIC =
+PROG_NAME=btasktd
+VER=0.0.0
+DIST_NAME=$(PROG_NAME)-$(VER)
+
+
MAINBINARIES = btasktd
.SUFFIXES:
@@ -22,6 +27,10 @@ MAINBINARIES = btasktd
all: $(MAINBINARIES)
+dist:
+ git archive --format=tar --prefix=$(DIST_NAME)/ HEAD | \
+ bzip2 > $(DIST_NAME).tar.bz2
+
clean:
rm -f $(MAINBINARIES) *.o *.test
diff --git a/btasktd.1 b/btasktd.1
index e354724..d7ee07c 100644
--- a/btasktd.1
+++ b/btasktd.1
@@ -27,11 +27,12 @@ Show help message
.It Fl p Ar port
Set port for server to listen to
.It Fl u Ar users
-Set max clients count
+Set max connected clients count
.El
.
.Sh AUTHORS
.An Mr. Goblin
+.Aq Lk http://mrgoblin.net
.
.Sh LICENSE
.Nm
diff --git a/src/btasktd.c b/btasktd.c
index 9878a3d..81100bf 100644
--- a/src/btasktd.c
+++ b/btasktd.c
@@ -42,14 +42,10 @@
#include "cliflags.h"
#define BTASKTD_HELP_STR \
+ "Copyright (c) 2026 Mr. Goblin\n" \
"btasktd - task tracking TCP-server\n" \
- "flags:\n" \
- " -p PORT\n" \
- " sets the port server should listen to\n" \
- " -h\n" \
- " prints the help message (the server won't start!)\n" \
- " -V\n" \
- " prints version (the server won't start!)\n"
+ "Usage: btasktd [-Vh] [-p port] [-u users]\n" \
+ "For more info read program's man page\n"
#define BTASKTD_VERSION_STR \
"0.0.0"
@@ -124,8 +120,8 @@ main(int argc, char **argv)
# endif
break;
case fvr_ok:
- users = int_res.data;
- if (users > 0)
+ users_cnt = int_res.data;
+ if (users_cnt > 0)
break;
/* fallthrough */
case fvr_invalid:
@@ -135,6 +131,7 @@ main(int argc, char **argv)
}
if (!passed_flags) {
+ fputs("-\n", stderr);
fprint_help(stderr);
return 1;
}
diff --git a/src/cliflags.c b/cliflags.c
index e3ff7f2..e3ff7f2 100644
--- a/src/cliflags.c
+++ b/cliflags.c
diff --git a/src/cliflags.h b/cliflags.h
index 5bf251b..5bf251b 100644
--- a/src/cliflags.h
+++ b/cliflags.h
diff --git a/src/db.c b/db.c
index c547013..c547013 100644
--- a/src/db.c
+++ b/db.c
diff --git a/src/db.h b/db.h
index ebb42c5..ebb42c5 100644
--- a/src/db.h
+++ b/db.h
diff --git a/dist.sh b/dist.sh
deleted file mode 100755
index cb05b36..0000000
--- a/dist.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-PROG_NAME="btasktd"
-VER="0.0.0"
-DIST_NAME="$PROG_NAME-$VER"
-
-git archive --format=tar --prefix="$DIST_NAME/" HEAD | bzip2 > "$DIST_NAME.tar.bz2"