~ubuntu-branches/ubuntu/warty/lynx/warty-security

« back to all changes in this revision

Viewing changes to WWW/Library/Implementation/UCMap.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-16 12:14:10 UTC
  • Revision ID: james.westby@ubuntu.com-20040916121410-cz1gu92c4nqfeyrg
Tags: upstream-2.8.5
ImportĀ upstreamĀ versionĀ 2.8.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef UCMAP_H
 
2
#define UCMAP_H
 
3
 
 
4
#ifndef HTUTILS_H
 
5
#include <HTUtils.h>
 
6
#endif
 
7
 
 
8
typedef long UCode_t;
 
9
 
 
10
extern int UCTransUniChar PARAMS((
 
11
        UCode_t         unicode,
 
12
        int             charset_out));
 
13
extern int UCTransUniCharStr PARAMS((
 
14
        char *          outbuf,
 
15
        int             buflen,
 
16
        UCode_t         unicode,
 
17
        int             charset_out,
 
18
        int             chk_single_flag));
 
19
extern int UCTransChar PARAMS((
 
20
        char            ch_in,
 
21
        int             charset_in,
 
22
        int             charset_out));
 
23
extern int UCReverseTransChar PARAMS((
 
24
        char            ch_out,
 
25
        int             charset_in,
 
26
        int             charset_out));
 
27
extern int UCTransCharStr PARAMS((
 
28
        char *          outbuf,
 
29
        int             buflen,
 
30
        char            ch_in,
 
31
        int             charset_in,
 
32
        int             charset_out,
 
33
        int             chk_single_flag));
 
34
extern UCode_t UCTransToUni PARAMS((
 
35
        char            ch_in,
 
36
        int             charset_in));
 
37
extern int UCGetRawUniMode_byLYhndl PARAMS((
 
38
        int             i));
 
39
extern int UCGetLYhndl_byMIME PARAMS((
 
40
        CONST char *    p)); /* returns -1 if name not recognized */
 
41
extern int safeUCGetLYhndl_byMIME PARAMS((
 
42
        CONST char *    p)); /* returns LATIN1 if name not recognized */
 
43
 
 
44
#ifdef EXP_LOCALE_CHARSET
 
45
extern void LYFindLocaleCharset NOPARAMS;
 
46
#endif
 
47
 
 
48
extern int UCLYhndl_for_unspec;
 
49
extern int UCLYhndl_for_unrec;
 
50
extern int UCLYhndl_HTFile_for_unspec;
 
51
extern int UCLYhndl_HTFile_for_unrec;
 
52
 
 
53
/* easy to type: */
 
54
extern int LATIN1;     /* UCGetLYhndl_byMIME("iso-8859-1") */
 
55
extern int US_ASCII;   /* UCGetLYhndl_byMIME("us-ascii")   */
 
56
extern int UTF8_handle; /* UCGetLYhndl_byMIME("utf-8")      */
 
57
 
 
58
#undef TRANSPARENT      /* defined on Solaris in <sys/stream.h> */
 
59
extern int TRANSPARENT; /* UCGetLYhndl_byMIME("x-transparent")  */
 
60
 
 
61
/*
 
62
In general, Lynx translates letters from document charset to display charset.
 
63
If document charset is not specified or not recognized by Lynx, we fall back
 
64
to different assumptions below, read also lynx.cfg for info.
 
65
 
 
66
UCLYhndl_for_unspec -  assume this as charset for documents that don't
 
67
                       specify a charset parameter in HTTP headers or via META
 
68
                       this corresponds to "assume_charset"
 
69
 
 
70
UCLYhndl_HTFile_for_unspec -  assume this as charset of local file
 
71
                       this corresponds to "assume_local_charset"
 
72
 
 
73
UCLYhndl_for_unrec  -  in case a charset parameter is not recognized;
 
74
                       this corresponds to "assume_unrec_charset"
 
75
 
 
76
UCLYhndl_HTFile_for_unrec  - the same but only for local files,
 
77
                             currently not used.
 
78
 
 
79
 
 
80
current_char_set  -     this corresponds to "display charset",
 
81
                        declared in LYCharSets.c and really important.
 
82
 
 
83
All external charset information is available in so called MIME format.
 
84
For internal needs Lynx uses charset handlers as integers
 
85
from UCGetLYhndl_byMIME().  However, there is no way to recover
 
86
from user's error in configuration file lynx.cfg or command line switches,
 
87
those unrecognized MIME names are assumed as LATIN1 (via safeUCGetLYhndl...).
 
88
*/
 
89
 
 
90
 
 
91
#define UCTRANS_NOTFOUND (-4)
 
92
 
 
93
#endif /* UCMAP_H */