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
|
2004-03-02 21:02:41 +03:00
|
|
|
* Copyright 2004 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-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);
|
2003-12-28 05:35:46 +03:00
|
|
|
void clean_cookiejar(void);
|
2003-12-29 03:38:59 +03:00
|
|
|
void unicode_transliterate(unsigned int c, char **r);
|
2004-04-25 15:40:05 +04:00
|
|
|
char *human_friendly_bytesize(unsigned long bytesize);
|
2004-06-11 00:41:26 +04:00
|
|
|
void warn_user(const char *warning, const char *detail);
|
2002-05-22 01:27:29 +04:00
|
|
|
|
2002-08-12 03:04:02 +04:00
|
|
|
#endif
|