#include "system.h"
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include "string16.h"
#include "stdio16.h"
#include "url.h"
Go to the source code of this file.
|
#define | _POSIX_SOURCE |
|
#define | LT_ERROR(err, format) fprintf(stderr, format) |
|
#define | LT_ERROR1(err, format, arg) fprintf(stderr, format, arg) |
|
#define | LT_ERROR2(err, format, arg1, arg2) fprintf(stderr, format, arg1, arg2) |
|
#define | LT_ERROR3(err, format, arg1, arg2, arg3) fprintf(stderr, format, arg1, arg2, arg3) |
|
#define | WARN(err, format) fprintf(stderr, format) |
|
#define | WARN1(err, format, arg) fprintf(stderr, format, arg) |
|
#define | Strerror() strerror(errno) |
|
#define | CWDBS 1025 |
|
#define | GETWD(buf) getcwd(buf,CWDBS) |
|
#define | NSCHEME (sizeof(schemes) / sizeof(schemes[0])) |
|
|
char * | default_base_url (void) |
|
char * | url_merge (const char *url, const char *base, char **_scheme, char **_host, int *_port, char **_path) |
|
FILE16 * | url_open (const char *url, const char *base, const char *type, char **merged_url) |
|
|
struct { |
char * scheme |
|
FILE16 *(* open )(const char *, const char
*, int, const char *, const
char *) |
|
} | schemes [] |
|
Definition at line 15 of file url.c.
#define LT_ERROR |
( |
|
err, |
|
|
|
format |
|
) |
| fprintf(stderr, format) |
Definition at line 35 of file url.c.
#define LT_ERROR1 |
( |
|
err, |
|
|
|
format, |
|
|
|
arg |
|
) |
| fprintf(stderr, format, arg) |
Definition at line 36 of file url.c.
#define LT_ERROR2 |
( |
|
err, |
|
|
|
format, |
|
|
|
arg1, |
|
|
|
arg2 |
|
) |
| fprintf(stderr, format, arg1, arg2) |
Definition at line 37 of file url.c.
#define LT_ERROR3 |
( |
|
err, |
|
|
|
format, |
|
|
|
arg1, |
|
|
|
arg2, |
|
|
|
arg3 |
|
) |
| fprintf(stderr, format, arg1, arg2, arg3) |
Definition at line 38 of file url.c.
#define WARN |
( |
|
err, |
|
|
|
format |
|
) |
| fprintf(stderr, format) |
Definition at line 39 of file url.c.
#define WARN1 |
( |
|
err, |
|
|
|
format, |
|
|
|
arg |
|
) |
| fprintf(stderr, format, arg) |
Definition at line 40 of file url.c.
#define Strerror |
( |
| ) |
strerror(errno) |
Definition at line 42 of file url.c.
Definition at line 47 of file url.c.
#define GETWD |
( |
|
buf | ) |
getcwd(buf,CWDBS) |
Definition at line 50 of file url.c.
char* default_base_url |
( |
void |
| ) |
|
char* url_merge |
( |
const char * |
url, |
|
|
const char * |
base, |
|
|
char ** |
_scheme, |
|
|
char ** |
_host, |
|
|
int * |
_port, |
|
|
char ** |
_path |
|
) |
| |
FILE16* url_open |
( |
const char * |
url, |
|
|
const char * |
base, |
|
|
const char * |
type, |
|
|
char ** |
merged_url |
|
) |
| |
FILE16*(* open) (const char *, const char *, int, const char *, const char *) |
Initial value:= {
{(char *)"http", http_open},
{(char *)"file", file_open},
}