2003-06-30 12:44:03 +00: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 18:02:41 +00:00
|
|
|
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
2004-07-05 20:19:52 +00:00
|
|
|
* Copyright 2004 John Tytgat <John.Tytgat@aaug.net>
|
2002-04-22 09:24:35 +00:00
|
|
|
*/
|
|
|
|
|
2003-02-09 12:58:15 +00:00
|
|
|
#ifndef _NETSURF_UTILS_UTILS_H_
|
|
|
|
#define _NETSURF_UTILS_UTILS_H_
|
2002-08-11 23:04:02 +00:00
|
|
|
|
2003-11-07 23:47:55 +00:00
|
|
|
#include <stdbool.h>
|
2004-07-05 20:19:52 +00:00
|
|
|
#include <stddef.h>
|
2002-08-11 23:04:02 +00:00
|
|
|
#include <stdlib.h>
|
2003-12-27 20:15:23 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <regex.h>
|
2003-04-11 21:06:51 +00:00
|
|
|
#include "libxml/encoding.h"
|
2002-08-11 23:04:02 +00:00
|
|
|
|
2002-04-22 09:24:35 +00:00
|
|
|
void die(const char * const error);
|
|
|
|
char * strip(char * const s);
|
|
|
|
int whitespace(const char * str);
|
2002-05-21 21:27:29 +00:00
|
|
|
char * squash_whitespace(const char * s);
|
2004-07-05 20:19:52 +00:00
|
|
|
char *cnv_space2nbsp(const char *s);
|
2004-07-19 20:29:47 +00:00
|
|
|
char *cnv_local_enc_str(const char *s, size_t length);
|
2004-07-05 20:19:52 +00:00
|
|
|
char *cnv_str_local_enc(const char *s);
|
2005-01-02 03:58:21 +00:00
|
|
|
char *cnv_strn_local_enc(const char *s, int length,
|
|
|
|
const ptrdiff_t **back_mapPP);
|
2003-11-07 23:47:55 +00:00
|
|
|
bool is_dir(const char *path);
|
2003-12-27 20:15:23 +00:00
|
|
|
void regcomp_wrapper(regex_t *preg, const char *regex, int cflags);
|
2003-12-28 02:35:46 +00:00
|
|
|
void clean_cookiejar(void);
|
2003-12-29 00:38:59 +00:00
|
|
|
void unicode_transliterate(unsigned int c, char **r);
|
2004-04-25 11:40:05 +00:00
|
|
|
char *human_friendly_bytesize(unsigned long bytesize);
|
2004-06-10 20:41:26 +00:00
|
|
|
void warn_user(const char *warning, const char *detail);
|
2002-05-21 21:27:29 +00:00
|
|
|
|
2002-08-11 23:04:02 +00:00
|
|
|
#endif
|