Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_url_safe.c File Reference
#include "nilorea/n_log.h"
#include "nilorea/n_url_safe.h"
#include <string.h>
Include dependency graph for ex_url_safe.c:

Go to the source code of this file.

Macros

#define CHECK(cond, msg)

Functions

int main (void)
static int uparse (const char *s, n_url_safe *out)

Variables

static int failures = 0

Macro Definition Documentation

◆ CHECK

#define CHECK ( cond,
msg )
Value:
do { \
if (!(cond)) { \
n_log(LOG_ERR, "FAIL: %s", (msg)); \
failures++; \
} \
} while (0)
static int failures
Definition ex_atlas.c:51
#define LOG_ERR
error conditions
Definition n_log.h:100

Definition at line 35 of file ex_url_safe.c.

Function Documentation

◆ main()

int main ( void )

x", &u), "empty host rejected");

Definition at line 47 of file ex_url_safe.c.

References CHECK, failures, h(), n_url_safe::host, n_url_safe::https, LOG_ERR, LOG_NOTICE, n_log, n_url_safe_find(), n_url_safe_head_parse(), N_URL_SAFE_MAX, n_url_safe_resolve(), n_url_safe::path, n_url_safe::port, set_log_level(), and uparse().

Here is the call graph for this function:

◆ uparse()

int uparse ( const char * s,
n_url_safe * out )
static
Examples
ex_url_safe.c.

Definition at line 43 of file ex_url_safe.c.

References n_url_safe_parse().

Referenced by main().

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

Variable Documentation

◆ failures

int failures = 0
static

Definition at line 33 of file ex_url_safe.c.