summaryrefslogtreecommitdiff
path: root/src/usage.c
diff options
context:
space:
mode:
authorJakub Sławiński2006-02-05 15:14:03 +0100
committerJoshua Judson Rosen2014-07-17 21:15:02 +0200
commitb457fec36399c1f7de093d5e92bb4fa453b79c86 (patch)
tree2084c9a78d40213015e6f10e3e9e01bc4c0c51f1 /src/usage.c
parentUpdate copyright statements. (diff)
downloadapf-b457fec36399c1f7de093d5e92bb4fa453b79c86.tar.gz
v0.8
- Fixed: infinite loop after buffering message - Fixed: corrupt packets after closing connections in the stopped state - Fixed: bug in mapping user numbers between afclient and afserver - Fixed: premature close of the service connection - Fixed: invalid buffering when the connection is closing - Added: Multiple tunnels in one afclient<->afserver connection
Diffstat (limited to 'src/usage.c')
-rw-r--r--src/usage.c38
1 files changed, 33 insertions, 5 deletions
diff --git a/src/usage.c b/src/usage.c
index 900495a..2241228 100644
--- a/src/usage.c
+++ b/src/usage.c
@@ -19,25 +19,39 @@
*/
#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
#include "usage.h"
#include "network.h"
-#include <stdio.h>
-#include <stdlib.h>
+/*
+ * Function name: server_short_usage
+ * Description: Prints the short usage of the afserver.
+ * Arguments: info - the text printed in the first line
+ */
- void
+void
server_short_usage(char* info)
{
+ assert(info != NULL);
printf("\n%s\n\n\n", info);
printf("Try `afserver --help' for more information.\n");
exit(1);
}
- void
+/*
+ * Function name: server_long_usage
+ * Description: Prints the long usage of the afserver.
+ * Arguments: info - the text printed in the first line
+ */
+
+void
server_long_usage(char* info)
{
+ assert(info != NULL);
printf("\n%s\n\n\n", info);
printf(" Basic options:\n\n");
printf(" -n, --hostname - it's used when creating listening sockets\n");
@@ -103,18 +117,32 @@ server_long_usage(char* info)
exit(0);
}
- void
+/*
+ * Function name: client_short_usage
+ * Description: Prints the short usage of the afclient.
+ * Arguments: info - the text printed in the first line
+ */
+
+void
client_short_usage(char* info)
{
+ assert(info != NULL);
printf("\n%s\n\n\n", info);
printf("Try `afclient --help' for more information.\n");
exit(1);
}
+/*
+ * Function name: client_long_usage
+ * Description: Prints the long usage of the afclient.
+ * Arguments: info - the text printed in the first line
+ */
+
void
client_long_usage(char* info)
{
+ assert(info != NULL);
printf("\n%s\n\n\n", info);
printf(" Basic options:\n\n");
printf(" -n, --servername - where the second part of the active\n");