From 8ff60bb782024d609a0b916459a0a81f50ada93c Mon Sep 17 00:00:00 2001 From: nishi Date: Fri, 7 Jun 2024 09:39:42 +0000 Subject: [PATCH] added help git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@176 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- Client/client.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Client/client.c b/Client/client.c index 18a2969..30662e6 100644 --- a/Client/client.c +++ b/Client/client.c @@ -94,6 +94,19 @@ int main(int argc, char** argv) { } else if(option(argv[i], "f", "file")) { fprog = argv[i + 1]; i++; + } else if(option(argv[i], "h", "help")) { + printf("DataWorks version %s %s %s\n", dataworks_get_version(), dataworks_get_compile_date(), dataworks_get_platform()); + printf("\n"); + printf("Usage: %s [options] database\n", argv[0]); + printf("You can use double-dash or slash for long-format flag, and single-dash or slash for short-foramt flag.\n"); + printf("Options:\n"); + printf("\t-V --version Show the version\n"); + printf("\t-NC --noclear Do not clear the screen on the startup\n"); + printf("\t-NB --nobanner Do not show the banner on the startup\n"); + printf("\t-NL --nolog Do not show the log\n"); + printf("\t-q --quiet Same with -NC -NB -NL\n"); + printf("\t-f --file [path] Run the [path] as the script file\n"); + return 0; } else { fprintf(stderr, "%s: %s: invalid option\n", argv[0], argv[i]); return 1; -- 2.43.0