2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* This file is part of NetSurf, http://netsurf.sourceforge.net/
|
|
|
|
* Licensed under the GNU General Public License,
|
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
|
|
|
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
2002-04-22 13:24:35 +04:00
|
|
|
*/
|
|
|
|
|
2003-02-09 15:58:15 +03:00
|
|
|
#ifndef _NETSURF_UTILS_UTILS_H_
|
|
|
|
#define _NETSURF_UTILS_UTILS_H_
|
2002-08-12 03:04:02 +04:00
|
|
|
|
2003-11-08 02:47:55 +03:00
|
|
|
#include <stdbool.h>
|
2002-08-12 03:04:02 +04:00
|
|
|
#include <stdlib.h>
|
2003-12-27 23:15:23 +03:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <regex.h>
|
2003-04-12 01:06:51 +04:00
|
|
|
#include "libxml/encoding.h"
|
2002-08-12 03:04:02 +04:00
|
|
|
|
2002-04-22 13:24:35 +04:00
|
|
|
void die(const char * const error);
|
|
|
|
char * strip(char * const s);
|
|
|
|
int whitespace(const char * str);
|
|
|
|
void * xcalloc(const size_t n, const size_t size);
|
|
|
|
void * xrealloc(void * p, const size_t size);
|
2003-01-08 02:15:23 +03:00
|
|
|
void xfree(void* p);
|
2002-04-22 13:24:35 +04:00
|
|
|
char * xstrdup(const char * const s);
|
|
|
|
char * load(const char * const path);
|
2002-05-22 01:27:29 +04:00
|
|
|
char * squash_whitespace(const char * s);
|
2003-04-12 01:06:51 +04:00
|
|
|
char * tolat1(xmlChar * s);
|
2003-10-08 01:34:39 +04:00
|
|
|
char * tolat1_pre(xmlChar * s);
|
2003-04-12 01:06:51 +04:00
|
|
|
char *squash_tolat1(xmlChar *s);
|
2003-12-26 03:17:55 +03:00
|
|
|
char *url_join(char *rel_url, char *base_url);
|
2003-10-25 23:20:13 +04:00
|
|
|
char *get_host_from_url(char* url);
|
2003-11-08 02:47:55 +03:00
|
|
|
bool is_dir(const char *path);
|
2003-12-27 23:15:23 +03:00
|
|
|
void regcomp_wrapper(regex_t *preg, const char *regex, int cflags);
|
2002-05-22 01:27:29 +04:00
|
|
|
|
2002-08-12 03:04:02 +04:00
|
|
|
#endif
|