aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-runserver/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-04-05 22:35:25 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-04-05 22:35:35 +0200
commitc43b487246fdfd2ddc5c794763b18255ac6a318e (patch)
treec5b2b5ef837e9e796842155a6f7943745c61d135 /src/blogc-runserver/main.c
parent0a7f6a2659b363e1d68202b9fd863b57f7420f4f (diff)
downloadblogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.tar.gz
blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.tar.bz2
blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.zip
*: use squareball
yeah, changed my mind again :)
Diffstat (limited to 'src/blogc-runserver/main.c')
-rw-r--r--src/blogc-runserver/main.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/blogc-runserver/main.c b/src/blogc-runserver/main.c
index b9b831a..318652d 100644
--- a/src/blogc-runserver/main.c
+++ b/src/blogc-runserver/main.c
@@ -13,7 +13,8 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include "../common/utils.h"
+#include <squareball.h>
+
#include "httpd.h"
@@ -66,9 +67,9 @@ main(int argc, char **argv)
char *endptr;
char *tmp_host = getenv("BLOGC_RUNSERVER_DEFAULT_HOST");
- char *default_host = bc_strdup(tmp_host != NULL ? tmp_host : "127.0.0.1");
+ char *default_host = sb_strdup(tmp_host != NULL ? tmp_host : "127.0.0.1");
char *tmp_port = getenv("BLOGC_RUNSERVER_DEFAULT_PORT");
- char *default_port = bc_strdup(tmp_port != NULL ? tmp_port : "8080");
+ char *default_port = sb_strdup(tmp_port != NULL ? tmp_port : "8080");
size_t args = 0;
@@ -83,15 +84,15 @@ main(int argc, char **argv)
goto cleanup;
case 't':
if (argv[i][2] != '\0')
- host = bc_strdup(argv[i] + 2);
+ host = sb_strdup(argv[i] + 2);
else
- host = bc_strdup(argv[++i]);
+ host = sb_strdup(argv[++i]);
break;
case 'p':
if (argv[i][2] != '\0')
- port = bc_strdup(argv[i] + 2);
+ port = sb_strdup(argv[i] + 2);
else
- port = bc_strdup(argv[++i]);
+ port = sb_strdup(argv[++i]);
break;
case 'm':
if (argv[i][2] != '\0')
@@ -120,7 +121,7 @@ main(int argc, char **argv)
goto cleanup;
}
args++;
- docroot = bc_strdup(argv[i]);
+ docroot = sb_strdup(argv[i]);
}
}