handling no arguments, renamed header
This commit is contained in:
parent
40607b98aa
commit
0925ff5f83
6 changed files with 71 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
#include "moxerver_include.h"
|
||||
#include "moxerver.h"
|
||||
#include <unistd.h> /* getopt() */
|
||||
|
||||
|
||||
|
@ -24,7 +24,12 @@ int main(int argc, char *argv[]) {
|
|||
struct timeval tv;
|
||||
|
||||
|
||||
/* grab argumments */
|
||||
/* grab arguments */
|
||||
if (argc == 1) {
|
||||
fprintf(stderr, "error parsing arguments\n");
|
||||
usage();
|
||||
return 0;
|
||||
}
|
||||
while ((ret = getopt(argc, argv, ":p:h")) != -1) {
|
||||
switch (ret) {
|
||||
/* get server port number */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue