Dillo v3.1.1-99-gf3103cc4
Loading...
Searching...
No Matches
misc.h
Go to the documentation of this file.
1#ifndef __DILLO_MISC_H__
2#define __DILLO_MISC_H__
3
4#include <stddef.h> /* for size_t */
5
6
7#ifdef __cplusplus
8extern "C" {
9#endif /* __cplusplus */
10
11#define d_isascii(c) (((c) & ~0x7f) == 0)
12
13char *a_Misc_escape_chars(const char *str, const char *esc_set);
14int a_Misc_expand_tabs(char **start, char *end, char *buf, int buflen);
15int a_Misc_get_content_type_from_data(void *Data, size_t Size,const char **PT);
16int a_Misc_content_type_check(const char *EntryType, const char *DetectedType);
17void a_Misc_parse_content_type(const char *str, char **major, char **minor,
18 char **charset);
19int a_Misc_content_type_cmp(const char* ct1, const char *ct2);
20int a_Misc_parse_geometry(char *geom, int *x, int *y, int *w, int *h);
21int a_Misc_parse_search_url(char *source, char **label, char **urlstr);
22char *a_Misc_encode_base64(const char *in);
23Dstr *a_Misc_file2dstr(const char *filename);
24
25#ifdef __cplusplus
26}
27#endif /* __cplusplus */
28
29#endif /* __DILLO_MISC_H__ */
30
int a_Misc_parse_search_url(char *source, char **label, char **urlstr)
Parse dillorc's search_url string ([<label> ]<url>) Return value: -1 on error, 0 on success (and labe...
Definition misc.c:391
int a_Misc_content_type_check(const char *EntryType, const char *DetectedType)
Check the server-supplied 'Content-Type' against our detected type.
Definition misc.c:321
void a_Misc_parse_content_type(const char *str, char **major, char **minor, char **charset)
Parse Content-Type string, e.g., "text/html; charset=utf-8".
Definition misc.c:210
int a_Misc_expand_tabs(char **start, char *end, char *buf, int buflen)
Takes a string and converts any tabs to spaces.
Definition misc.c:54
Dstr * a_Misc_file2dstr(const char *filename)
Load a local file into a dStr.
Definition misc.c:464
char * a_Misc_encode_base64(const char *in)
Encodes string using base64 encoding.
Definition misc.c:425
char * a_Misc_escape_chars(const char *str, const char *esc_set)
Escape characters as XX sequences.
Definition misc.c:26
int a_Misc_parse_geometry(char *geom, int *x, int *y, int *w, int *h)
Parse a geometry string.
Definition misc.c:360
int a_Misc_content_type_cmp(const char *ct1, const char *ct2)
Compare two Content-Type strings.
Definition misc.c:274
int a_Misc_get_content_type_from_data(void *Data, size_t Size, const char **PT)
Detects 'Content-Type' from a data stream sample.
Definition misc.c:136
Definition dlib.h:102