diff --git a/network/http.c b/network/http.c index 14e7e68..2342785 100644 --- a/network/http.c +++ b/network/http.c @@ -41,7 +41,7 @@ mime_type types[] = { {".", "text/plain"} }; -void format_size(char *buf, struct stat *stat) { +static void format_size(char *buf, struct stat *stat) { bzero(buf, strlen(buf)); if (S_ISDIR(stat->st_mode)) { sprintf(buf, "%s", "DIR"); @@ -58,12 +58,12 @@ void format_size(char *buf, struct stat *stat) { } } -void error(char *msg) { +static void error(char *msg) { perror(msg); exit(1); } -void cerror(FILE *stream, char *cause, char *errno, char *shortm, char *longm) { +static void cerror(FILE *stream, char *cause, char *errno, char *shortm, char *longm) { fprintf(stream, "HTTP/1.1 %s %s\n", errno, shortm); fprintf(stream, "Content-Type: text/html\n"); fprintf(stream, "\n"); @@ -75,9 +75,11 @@ void cerror(FILE *stream, char *cause, char *errno, char *shortm, char *longm) { fprintf(stream, "