Fri, 19 Mar 2004 17:34:33 +0000
[gaim-migrate @ 9206]
" You can once again show how evil you are by typing >:)
and getting it to render in spite of escaped HTML.
This patch changes around the parsing code to catch
smileys before eating just any HTML entity we bump into
on the street. We try to catch entities at the
beginning of smileys first, and if we're sure they're
not smileys, then we eat them for breakfast. The patch
also deals with eating any subsequent entities that may
appear in any smileys (like :-&) so we don't end up
with trailing leftovers. This patch description is
making me hungry.
FYI, I know this gtkimhtml is supposed to be not gaim
dependent, but both the gaim_* functions that were
preexisting and newly used in gtkimhtml code are all
non-gaim dependent utility functions from util.c, so I felt
their use was justified and acceptable." --Kevin Stange
committer: Luke Schierer <lschiere@pidgin.im>
| 5872 | 1 | /** |
| 2 | * @file internal.h Internal definitions and includes | |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
3 | * @ingroup core |
| 5872 | 4 | * |
| 5 | * gaim | |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 5872 | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 25 | #ifndef _GAIM_INTERNAL_H_ | |
| 26 | #define _GAIM_INTERNAL_H_ | |
| 27 | ||
| 28 | #ifdef HAVE_CONFIG_H | |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
29 | # include <config.h> |
| 5872 | 30 | #endif |
| 31 | ||
| 32 | #ifdef ENABLE_NLS | |
| 33 | # include <libintl.h> | |
| 34 | # define _(x) gettext(x) | |
| 35 | # ifdef gettext_noop | |
| 36 | # define N_(String) gettext_noop (String) | |
| 37 | # else | |
| 38 | # define N_(String) (String) | |
| 39 | # endif | |
| 40 | #else | |
| 41 | # define N_(String) (String) | |
| 42 | # define _(x) (x) | |
|
5976
1b3c677b3d0a
[gaim-migrate @ 6423]
Mark Doliner <markdoliner@pidgin.im>
parents:
5912
diff
changeset
|
43 | # define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural)) |
| 5872 | 44 | #endif |
|
5976
1b3c677b3d0a
[gaim-migrate @ 6423]
Mark Doliner <markdoliner@pidgin.im>
parents:
5912
diff
changeset
|
45 | /* |
|
1b3c677b3d0a
[gaim-migrate @ 6423]
Mark Doliner <markdoliner@pidgin.im>
parents:
5912
diff
changeset
|
46 | * The Singular/Plural/Number ngettext define above was taken from |
|
1b3c677b3d0a
[gaim-migrate @ 6423]
Mark Doliner <markdoliner@pidgin.im>
parents:
5912
diff
changeset
|
47 | * an email to the texinfo mailing list by Manuel Guerrero. Thank |
|
1b3c677b3d0a
[gaim-migrate @ 6423]
Mark Doliner <markdoliner@pidgin.im>
parents:
5912
diff
changeset
|
48 | * you Manuel, and thank you Alex's good friend Google. |
|
1b3c677b3d0a
[gaim-migrate @ 6423]
Mark Doliner <markdoliner@pidgin.im>
parents:
5912
diff
changeset
|
49 | */ |
| 5872 | 50 | |
| 51 | #ifdef HAVE_ENDIAN_H | |
| 52 | # include <endian.h> | |
| 53 | #endif | |
| 54 | ||
| 55 | #define MSG_LEN 2048 | |
| 56 | /* The above should normally be the same as BUF_LEN, | |
| 57 | * but just so we're explictly asking for the max message | |
| 58 | * length. */ | |
| 59 | #define BUF_LEN MSG_LEN | |
| 60 | #define BUF_LONG BUF_LEN * 2 | |
| 61 | ||
| 62 | #include <sys/stat.h> | |
| 63 | #include <sys/time.h> | |
| 64 | #include <sys/types.h> | |
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
65 | #ifndef _WIN32 |
| 5872 | 66 | #include <sys/wait.h> |
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
67 | #endif |
| 5872 | 68 | #include <ctype.h> |
| 69 | #include <errno.h> | |
| 70 | #include <fcntl.h> | |
| 71 | #include <math.h> | |
| 72 | #include <stdio.h> | |
| 73 | #include <stdlib.h> | |
| 74 | #include <string.h> | |
| 75 | #include <time.h> | |
| 76 | ||
| 77 | #ifdef HAVE_ICONV | |
| 78 | #include <iconv.h> | |
| 79 | #endif | |
| 80 | ||
| 81 | #ifdef HAVE_LANGINFO_CODESET | |
| 82 | #include <langinfo.h> | |
| 83 | #endif | |
| 84 | ||
| 85 | #ifdef GAIM_PLUGINS | |
| 86 | # include <gmodule.h> | |
| 87 | # ifndef _WIN32 | |
| 88 | # include <dlfcn.h> | |
| 89 | # endif | |
| 90 | #endif | |
| 91 | ||
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
92 | #ifndef _WIN32 |
| 5872 | 93 | # include <netinet/in.h> |
| 94 | # include <sys/socket.h> | |
| 6170 | 95 | # include <arpa/inet.h> |
| 5872 | 96 | # include <sys/un.h> |
| 97 | # include <sys/utsname.h> | |
| 98 | # include <netdb.h> | |
| 99 | # include <signal.h> | |
| 100 | # include <unistd.h> | |
| 101 | #endif | |
| 102 | ||
| 103 | #ifndef MAXPATHLEN | |
| 104 | # define MAXPATHLEN 1024 | |
| 105 | #endif | |
| 106 | ||
| 107 | #ifndef HOST_NAME_MAX | |
| 108 | # define HOST_NAME_MAX 255 | |
| 109 | #endif | |
| 110 | ||
| 111 | #define PATHSIZE 1024 | |
| 112 | ||
| 113 | #include <glib.h> | |
| 114 | ||
|
5912
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
115 | #ifdef _WIN32 |
|
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
116 | #include "win32dep.h" |
|
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
117 | #endif |
|
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
118 | |
|
32619a71edd2
[gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents:
5872
diff
changeset
|
119 | |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
120 | #define GAIM_WEBSITE "http://gaim.sourceforge.net/" |
| 5872 | 121 | |
| 122 | #endif /* _GAIM_INTERNAL_H_ */ |