annotate dpi/dpiutil.h @ 2048:5060d415a85a

clickable menu items (even those introducing submenus) MUST have callbacks I clicked on the "Panel size" item itself instead of any of the options in its submenu, and: Segfault!
author corvid <corvid@lavabit.com>
date Thu, 26 May 2011 02:51:18 +0000
parents cea7268ebb05
children
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 /*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2 * File: dpiutil.h
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
3 *
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
4 * Copyright 2004-2005 Jorge Arellano Cid <jcid@dillo.org>
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
5 *
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
1031
b06377790b00 fix up license versions/names
corvid <corvid@lavabit.com>
parents: 306
diff changeset
8 * the Free Software Foundation; either version 3 of the License, or
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
9 * (at your option) any later version.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
10 *
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
11 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
12
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
13 /*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
14 * This file contains common functions used by dpi programs.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
15 * (i.e. a convenience library).
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
16 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
17
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
18 #ifndef __DPIUTIL_H__
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
19 #define __DPIUTIL_H__
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
20
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
21 #include <stdio.h>
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 #include "d_size.h"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 #include "../dlib/dlib.h"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
24
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
25
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
26 #ifdef __cplusplus
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
27 extern "C" {
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
28 #endif /* __cplusplus */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
29
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
30
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
31 /*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
32 * Escape URI characters in 'esc_set' as %XX sequences.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
33 * Return value: New escaped string.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
34 */
306
7a76f872ce73 - Eliminated gcc 4.2.3 warnings on 64bit OS.
jcid
parents: 0
diff changeset
35 char *Escape_uri_str(const char *str, const char *p_esc_set);
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
36
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
37 /*
1305
29b4740d571e Fixed URL unescaping in the datauri DPI
Jorge Arellano Cid <jcid@dillo.org>
parents: 1031
diff changeset
38 * Unescape %XX sequences in a string.
29b4740d571e Fixed URL unescaping in the datauri DPI
Jorge Arellano Cid <jcid@dillo.org>
parents: 1031
diff changeset
39 * Return value: a new unescaped string
29b4740d571e Fixed URL unescaping in the datauri DPI
Jorge Arellano Cid <jcid@dillo.org>
parents: 1031
diff changeset
40 */
29b4740d571e Fixed URL unescaping in the datauri DPI
Jorge Arellano Cid <jcid@dillo.org>
parents: 1031
diff changeset
41 char *Unescape_uri_str(const char *str);
29b4740d571e Fixed URL unescaping in the datauri DPI
Jorge Arellano Cid <jcid@dillo.org>
parents: 1031
diff changeset
42
29b4740d571e Fixed URL unescaping in the datauri DPI
Jorge Arellano Cid <jcid@dillo.org>
parents: 1031
diff changeset
43 /*
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
44 * Escape unsafe characters as html entities.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
45 * Return value: New escaped string.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
46 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
47 char *Escape_html_str(const char *str);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
48
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
49 /*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
50 * Unescape a few HTML entities (inverse of Escape_html_str)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
51 * Return value: New unescaped string.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
52 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
53 char *Unescape_html_str(const char *str);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
54
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
55 /*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
56 * Filter an SMTP hack with a FTP URI
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
57 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
58 char *Filter_smtp_hack(char *url);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
59
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
60
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
61 #ifdef __cplusplus
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
62 }
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
63 #endif /* __cplusplus */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
64
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
65 #endif /* __DPIUTIL_H__ */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
66