diff options
| author | Mr. Goblin <mrgoblin@mrgoblin.net> | 2026-09-19 19:09:11 +0300 |
|---|---|---|
| committer | Mr. Goblin <mrgoblin@mrgoblin.net> | 2026-09-19 19:09:11 +0300 |
| commit | 01438bd1be578c3b43c9ad29b0a2d6707ee122b8 (patch) | |
| tree | d3e8dfd3b6482e1dac32837d0d57847f0d67ed2c | |
| parent | 2cba815df5713fbadecc86e373ec5f6c8a07ced5 (diff) | |
all files are in root; changed help message
| -rw-r--r-- | Makefile (renamed from src/Makefile) | 9 | ||||
| -rw-r--r-- | btasktd.1 | 3 | ||||
| -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-x | dist.sh | 7 |
8 files changed, 17 insertions, 17 deletions
@@ -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 @@ -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/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" |
