quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

commit c3d007756edeb8d1b5554a959785e49470432909
parent dfd68c48be0fb999f59dc7950e1c449d91925048
Author: FRIGN <dev@frign.de>
Date:   Mon, 28 Jul 2014 13:42:26 +0200

Add arg-parser and move copyright-info to LICENSE

Diffstat:
MLICENSE | 2++
Mquark.c | 12++++++------
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -2,6 +2,8 @@ MIT/X Consortium License © 2009-2011 Anselm R Garbe <anselm@garbe.us> © 2011 Szabolcs Nagy <nszabolcs@gmail.com> +© 2014 Hiltjo Posthuma <hiltjo@codemadness.org> +© 2014 Laslo Hunhold <dev@frign.de> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/quark.c b/quark.c @@ -541,12 +541,12 @@ main(int argc, char *argv[]) { struct group *gpwd; int i; - /* arguments */ - for(i = 1; i < argc; i++) - if(!strcmp(argv[i], "-v")) - die("quark-"VERSION", © 2009-2011 Anselm R Garbe\n"); - else - die("usage: quark [-v]\n"); + ARGBEGIN { + case 'v': + die("quark-"VERSION"\n"); + default: + die("usage: %s [-v]\n", argv0); + } ARGEND; /* sanity checks */ if(user)