add svn:ignore (*.str)
[parrot.git] / include / parrot / encoding.h
blob842308d0f242ac7df5864afc2a3b84fd1c03c604
1 /* encoding.h
2 * Copyright (C) 2004-2007, Parrot Foundation.
3 * SVN Info
4 * $Id$
5 * Overview:
6 * This is the header for the generic encoding functions
7 * Data Structure and Algorithms:
8 * History:
9 * Notes:
10 * References:
13 #ifndef PARROT_ENCODING_H_GUARD
14 #define PARROT_ENCODING_H_GUARD
16 #include "parrot/parrot.h"
18 PARROT_DATA STR_VTABLE *Parrot_ascii_encoding_ptr;
19 PARROT_DATA STR_VTABLE *Parrot_latin1_encoding_ptr;
20 PARROT_DATA STR_VTABLE *Parrot_binary_encoding_ptr;
21 PARROT_DATA STR_VTABLE *Parrot_utf8_encoding_ptr;
22 PARROT_DATA STR_VTABLE *Parrot_utf16_encoding_ptr;
23 PARROT_DATA STR_VTABLE *Parrot_ucs2_encoding_ptr;
24 PARROT_DATA STR_VTABLE *Parrot_ucs4_encoding_ptr;
26 PARROT_DATA STR_VTABLE *Parrot_default_encoding_ptr;
28 /* HEADERIZER BEGIN: src/string/encoding.c */
29 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
31 PARROT_EXPORT
32 PARROT_PURE_FUNCTION
33 PARROT_WARN_UNUSED_RESULT
34 PARROT_CANNOT_RETURN_NULL
35 const STR_VTABLE * Parrot_default_encoding(SHIM_INTERP);
37 PARROT_EXPORT
38 PARROT_PURE_FUNCTION
39 PARROT_WARN_UNUSED_RESULT
40 PARROT_CAN_RETURN_NULL
41 const char * Parrot_encoding_c_name(SHIM_INTERP, INTVAL number_of_encoding);
43 PARROT_EXPORT
44 PARROT_PURE_FUNCTION
45 PARROT_WARN_UNUSED_RESULT
46 PARROT_CAN_RETURN_NULL
47 STRING* Parrot_encoding_name(SHIM_INTERP, INTVAL number_of_encoding);
49 PARROT_EXPORT
50 PARROT_PURE_FUNCTION
51 PARROT_WARN_UNUSED_RESULT
52 INTVAL Parrot_encoding_number(PARROT_INTERP,
53 ARGIN(const STRING *encodingname))
54 __attribute__nonnull__(1)
55 __attribute__nonnull__(2);
57 PARROT_EXPORT
58 PARROT_PURE_FUNCTION
59 PARROT_WARN_UNUSED_RESULT
60 INTVAL Parrot_encoding_number_of_str(SHIM_INTERP, ARGIN(const STRING *src))
61 __attribute__nonnull__(2);
63 PARROT_EXPORT
64 void Parrot_encodings_init(PARROT_INTERP)
65 __attribute__nonnull__(1);
67 PARROT_EXPORT
68 PARROT_PURE_FUNCTION
69 PARROT_WARN_UNUSED_RESULT
70 PARROT_CAN_RETURN_NULL
71 const STR_VTABLE * Parrot_find_encoding(SHIM_INTERP,
72 ARGIN(const char *encodingname))
73 __attribute__nonnull__(2);
75 PARROT_EXPORT
76 PARROT_PURE_FUNCTION
77 PARROT_WARN_UNUSED_RESULT
78 PARROT_CAN_RETURN_NULL
79 const STR_VTABLE* Parrot_get_encoding(SHIM_INTERP,
80 INTVAL number_of_encoding);
82 PARROT_EXPORT
83 PARROT_DOES_NOT_RETURN
84 PARROT_CANNOT_RETURN_NULL
85 const STR_VTABLE * Parrot_load_encoding(PARROT_INTERP,
86 ARGIN(const char *encodingname))
87 __attribute__nonnull__(1)
88 __attribute__nonnull__(2);
90 PARROT_EXPORT
91 INTVAL Parrot_make_default_encoding(SHIM_INTERP,
92 SHIM(const char *encodingname),
93 ARGIN(STR_VTABLE *encoding))
94 __attribute__nonnull__(3);
96 PARROT_EXPORT
97 PARROT_MALLOC
98 PARROT_CANNOT_RETURN_NULL
99 STR_VTABLE * Parrot_new_encoding(PARROT_INTERP)
100 __attribute__nonnull__(1);
102 PARROT_EXPORT
103 INTVAL Parrot_register_encoding(PARROT_INTERP, ARGIN(STR_VTABLE *encoding))
104 __attribute__nonnull__(1)
105 __attribute__nonnull__(2);
107 void Parrot_deinit_encodings(PARROT_INTERP)
108 __attribute__nonnull__(1);
110 void Parrot_str_internal_register_encoding_names(PARROT_INTERP)
111 __attribute__nonnull__(1);
113 #define ASSERT_ARGS_Parrot_default_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
114 #define ASSERT_ARGS_Parrot_encoding_c_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
115 #define ASSERT_ARGS_Parrot_encoding_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
116 #define ASSERT_ARGS_Parrot_encoding_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
117 PARROT_ASSERT_ARG(interp) \
118 , PARROT_ASSERT_ARG(encodingname))
119 #define ASSERT_ARGS_Parrot_encoding_number_of_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
120 PARROT_ASSERT_ARG(src))
121 #define ASSERT_ARGS_Parrot_encodings_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
122 PARROT_ASSERT_ARG(interp))
123 #define ASSERT_ARGS_Parrot_find_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
124 PARROT_ASSERT_ARG(encodingname))
125 #define ASSERT_ARGS_Parrot_get_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
126 #define ASSERT_ARGS_Parrot_load_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
127 PARROT_ASSERT_ARG(interp) \
128 , PARROT_ASSERT_ARG(encodingname))
129 #define ASSERT_ARGS_Parrot_make_default_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
130 PARROT_ASSERT_ARG(encoding))
131 #define ASSERT_ARGS_Parrot_new_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
132 PARROT_ASSERT_ARG(interp))
133 #define ASSERT_ARGS_Parrot_register_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
134 PARROT_ASSERT_ARG(interp) \
135 , PARROT_ASSERT_ARG(encoding))
136 #define ASSERT_ARGS_Parrot_deinit_encodings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
137 PARROT_ASSERT_ARG(interp))
138 #define ASSERT_ARGS_Parrot_str_internal_register_encoding_names \
139 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
140 PARROT_ASSERT_ARG(interp))
141 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
142 /* HEADERIZER END: src/string/encoding.c */
144 #endif /* PARROT_ENCODING_H_GUARD */
147 * Local variables:
148 * c-file-style: "parrot"
149 * End:
150 * vim: expandtab shiftwidth=4: