diff options
author | June McEnroe <june@causal.agency> | 2020-07-10 11:54:33 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-10 11:54:33 -0400 |
commit | dffae725026a5f19303c36d5250779cf5e8523ab (patch) | |
tree | 6b4bc6a0172cd0e8e9a6d26fa1f01176d7153a17 /server.c | |
parent | Move search help to footer (diff) | |
download | scooper-dffae725026a5f19303c36d5250779cf5e8523ab.tar.gz scooper-dffae725026a5f19303c36d5250779cf5e8523ab.zip |
Add -l and -r options
Diffstat (limited to '')
-rw-r--r-- | server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server.c b/server.c index ac8fc4f..4955524 100644 --- a/server.c +++ b/server.c @@ -47,6 +47,7 @@ const struct kvalid Keys[KeysLen] = { bool pagePublic; int pageLimit = 100; +int pageRecent = 500; static const char CSS[] = { #include "default.css.h" @@ -77,11 +78,13 @@ int main(int argc, char *argv[]) { bool fastCGI = false; bool test = false; - for (int opt; 0 < (opt = getopt(argc, argv, "cfps:"));) { + for (int opt; 0 < (opt = getopt(argc, argv, "cfl:pr:s:"));) { switch (opt) { break; case 'c': test = true; break; case 'f': fastCGI = true; + break; case 'l': pageLimit = strtol(optarg, NULL, 10); break; case 'p': pagePublic = true; + break; case 'r': pageRecent = strtol(optarg, NULL, 10); break; case 's': htmlStylesheet = optarg; break; default: return EX_USAGE; } |