Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_http_mime.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "nilorea/n_common.h"
#include "nilorea/n_http_mime.h"
#include "nilorea/n_log.h"
Include dependency graph for ex_http_mime.c:

Go to the source code of this file.

Functions

static void expect_type (const char *path, const char *want)
 path maps to want (NULL: no type)
int main (int argc, char **argv)
 run the checks
static int process_args (int argc, char **argv)
 read -V

Variables

static int failures = 0
 failed checks
static int log_level = 3
 log level from -V

Function Documentation

◆ expect_type()

void expect_type ( const char * path,
const char * want )
static

path maps to want (NULL: no type)

Parameters
paththe path
wantexpected type or NULL
Examples
ex_http_mime.c.

Definition at line 63 of file ex_http_mime.c.

References failures, LOG_ERR, n_http_mime_type(), and n_log.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )

run the checks

Parameters
argcargument count
argvarguments
Returns
0 when every check passes

Definition at line 75 of file ex_http_mime.c.

References expect_type(), failures, LOG_ERR, log_level, LOG_NOTICE, n_http_mime_table_check(), n_http_mime_type(), n_log, process_args(), and set_log_level().

Here is the call graph for this function:

◆ process_args()

int process_args ( int argc,
char ** argv )
static

read -V

Parameters
argcargument count
argvarguments
Returns
0, or -1 on a bad argument

Definition at line 47 of file ex_http_mime.c.

References log_level.

Variable Documentation

◆ failures

int failures = 0
static

failed checks

Definition at line 41 of file ex_http_mime.c.

◆ log_level

int log_level = 3
static

log level from -V

Definition at line 39 of file ex_http_mime.c.