diff options
author | 諏訪子 <suwako@076.moe> | 2024-06-21 23:46:01 +0900 |
---|---|---|
committer | 諏訪子 <suwako@076.moe> | 2024-06-21 23:46:01 +0900 |
commit | fab26582abedc53175117287ac925bb88e3b5ff3 (patch) | |
tree | dbb84f31a0a357c8574c426626306a6a5fa22d38 /main.c | |
parent | 51a5f8f818df25e8595e9ff5a95d6d349ef6cb9f (diff) |
おちんちん
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -23,13 +23,26 @@ #include "src/storage.h" const char *sofname = "farfetch"; -const char *version = "0.0.1"; +const char *version = "0.1.0"; +const char *avalopt = "s"; + +void usage() { + printf("%s-%s\nusage: %s [-%s]\n", sofname, version, sofname, avalopt); +} int main(int argc, char *argv[]) { int lc = 0; int issmall = 0; - if (argc == 2 && strncmp(argv[1], "-s", strlen("-s")) == 0) { - issmall = 1; + if (argc == 2) { + if (strncmp(argv[1], "-s", 2) == 0) { + issmall = 1; + } else { + usage(); + return 1; + } + } else if (argc > 2) { + usage(); + return 1; } #if defined(__OpenBSD__) #include "src/logo/openbsd.h" |