Edinburgh Speech Tools  2.1-release
url.c File Reference
#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"
Include dependency graph for url.c:

Go to the source code of this file.

Macros

#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]))
 

Functions

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)
 

Variables

struct {
   char *   scheme
 
   FILE16 *(*   open )(const char *, const char
      *, int, const char *, const
      char *)
 
schemes []
 

Macro Definition Documentation

#define _POSIX_SOURCE

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.

#define CWDBS   1025

Definition at line 47 of file url.c.

#define GETWD (   buf)    getcwd(buf,CWDBS)

Definition at line 50 of file url.c.

#define NSCHEME   (sizeof(schemes) / sizeof(schemes[0]))

Definition at line 112 of file url.c.

Function Documentation

char* default_base_url ( void  )

Definition at line 116 of file url.c.

char* url_merge ( const char *  url,
const char *  base,
char **  _scheme,
char **  _host,
int _port,
char **  _path 
)

Definition at line 188 of file url.c.

FILE16* url_open ( const char *  url,
const char *  base,
const char *  type,
char **  merged_url 
)

Definition at line 385 of file url.c.

Variable Documentation

char* scheme

Definition at line 106 of file url.c.

FILE16*(* open) (const char *, const char *, int, const char *, const char *)

Definition at line 107 of file url.c.

struct { ... } schemes[]
Initial value:
= {
{(char *)"http", http_open},
{(char *)"file", file_open},
}