Fix heredoc/nowdoc bugs with large docs, docs crossing buffer boundaries
[hiphop-php.git] / hphp / idl / bzip2.idl.php
blobc206931a4aefd42c0362395dd1397372a048ec84
1 <?php
2 /**
3 * Automatically generated by running "php schema.php bzip2".
5 * You may modify the file, but re-running schema.php against this file will
6 * standardize the format without losing your schema changes. It does lose
7 * any changes that are not part of schema. Use "note" field to comment on
8 * schema itself, and "note" fields are not used in any code generation but
9 * only staying within this file.
11 ///////////////////////////////////////////////////////////////////////////////
12 // Preamble: C++ code inserted at beginning of ext_{name}.h
14 DefinePreamble(<<<CPP
16 CPP
19 ///////////////////////////////////////////////////////////////////////////////
20 // Constants
22 // array (
23 // 'name' => name of the constant
24 // 'type' => type of the constant
25 // 'note' => additional note about this constant's schema
26 // )
29 ///////////////////////////////////////////////////////////////////////////////
30 // Functions
32 // array (
33 // 'name' => name of the function
34 // 'desc' => description of the function's purpose
35 // 'flags' => attributes of the function, see base.php for possible values
36 // 'opt' => optimization callback function's name for compiler
37 // 'note' => additional note about this function's schema
38 // 'return' =>
39 // array (
40 // 'type' => return type, use Reference for ref return
41 // 'desc' => description of the return value
42 // )
43 // 'args' => arguments
44 // array (
45 // 'name' => name of the argument
46 // 'type' => type of the argument, use Reference for output parameter
47 // 'value' => default value of the argument
48 // 'desc' => description of the argument
49 // )
50 // )
52 DefineFunction(
53 array(
54 'name' => "bzclose",
55 'desc' => "Closes the given bzip2 file pointer.",
56 'flags' => HasDocComment,
57 'return' => array(
58 'type' => Variant,
59 'desc' => "Returns TRUE on success or FALSE on failure.",
61 'args' => array(
62 array(
63 'name' => "bz",
64 'type' => Resource,
65 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
68 'taint_observer' => false,
69 ));
71 DefineFunction(
72 array(
73 'name' => "bzopen",
74 'desc' => "bzopen() opens a bzip2 (.bz2) file for reading or writing.",
75 'flags' => HasDocComment,
76 'return' => array(
77 'type' => Variant,
78 'desc' => "If the open fails, bzopen() returns FALSE, otherwise it returns a pointer to the newly opened file.",
80 'args' => array(
81 array(
82 'name' => "filename",
83 'type' => String,
84 'desc' => "The name of the file to open.",
86 array(
87 'name' => "mode",
88 'type' => String,
89 'desc' => "Similar to the fopen() function, only 'r' (read) and 'w' (write) are supported. Everything else will cause bzopen to return FALSE.",
92 'taint_observer' => false,
93 ));
95 DefineFunction(
96 array(
97 'name' => "bzread",
98 'desc' => "bzread() reads from the given bzip2 file pointer.\n\nReading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first.",
99 'flags' => HasDocComment,
100 'return' => array(
101 'type' => Variant,
102 'desc' => "Returns the uncompressed data, or FALSE on error.",
104 'args' => array(
105 array(
106 'name' => "bz",
107 'type' => Resource,
108 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
110 array(
111 'name' => "length",
112 'type' => Int32,
113 'value' => "1024",
114 'desc' => "If not specified, bzread() will read 1024 (uncompressed) bytes at a time.",
117 'taint_observer' => array(
118 'set_mask' => "TAINT_BIT_ALL_NO_TRACE",
119 'clear_mask' => "TAINT_BIT_NONE",
123 DefineFunction(
124 array(
125 'name' => "bzwrite",
126 'desc' => "bzwrite() writes a string into the given bzip2 file stream.",
127 'flags' => HasDocComment,
128 'return' => array(
129 'type' => Variant,
130 'desc' => "Returns the number of bytes written, or FALSE on error.",
132 'args' => array(
133 array(
134 'name' => "bz",
135 'type' => Resource,
136 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
138 array(
139 'name' => "data",
140 'type' => String,
141 'desc' => "The written data.",
143 array(
144 'name' => "length",
145 'type' => Int32,
146 'value' => "0",
147 'desc' => "If supplied, writing will stop after length (uncompressed) bytes have been written or the end of data is reached, whichever comes first.",
150 'taint_observer' => false,
153 DefineFunction(
154 array(
155 'name' => "bzflush",
156 'desc' => "Forces a write of all buffered bzip2 data for the file pointer bz.",
157 'flags' => HasDocComment,
158 'return' => array(
159 'type' => Variant,
160 'desc' => "Returns TRUE on success or FALSE on failure.",
162 'args' => array(
163 array(
164 'name' => "bz",
165 'type' => Resource,
166 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
169 'taint_observer' => false,
172 DefineFunction(
173 array(
174 'name' => "bzerrstr",
175 'desc' => "Gets the error string of any bzip2 error returned by the given file pointer.",
176 'flags' => HasDocComment,
177 'return' => array(
178 'type' => String,
179 'desc' => "Returns a string containing the error message.",
181 'args' => array(
182 array(
183 'name' => "bz",
184 'type' => Resource,
185 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
188 'taint_observer' => false,
191 DefineFunction(
192 array(
193 'name' => "bzerror",
194 'desc' => "Returns the error number and error string of any bzip2 error returned by the given file pointer.",
195 'flags' => HasDocComment,
196 'return' => array(
197 'type' => Variant,
198 'desc' => "Returns an associative array, with the error code in the errno entry, and the error message in the errstr entry.",
200 'args' => array(
201 array(
202 'name' => "bz",
203 'type' => Resource,
204 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
207 'taint_observer' => false,
210 DefineFunction(
211 array(
212 'name' => "bzerrno",
213 'desc' => "Returns the error number of any bzip2 error returned by the given file pointer.",
214 'flags' => HasDocComment,
215 'return' => array(
216 'type' => Int64,
217 'desc' => "Returns the error number as an integer.",
219 'args' => array(
220 array(
221 'name' => "bz",
222 'type' => Resource,
223 'desc' => "The file pointer. It must be valid and must point to a file successfully opened by bzopen().",
226 'taint_observer' => false,
229 DefineFunction(
230 array(
231 'name' => "bzcompress",
232 'desc' => "bzcompress() compresses the given string and returns it as bzip2 encoded data.",
233 'flags' => HasDocComment,
234 'return' => array(
235 'type' => Variant,
236 'desc' => "The compressed string or number of error in case of error.",
238 'args' => array(
239 array(
240 'name' => "source",
241 'type' => String,
242 'desc' => "The string to compress.",
244 array(
245 'name' => "blocksize",
246 'type' => Int32,
247 'value' => "4",
248 'desc' => "Specifies the blocksize used during compression and should be a number from 1 to 9 with 9 giving the best compression, but using more resources to do so.",
250 array(
251 'name' => "workfactor",
252 'type' => Int32,
253 'value' => "0",
254 'desc' => "Controls how the compression phase behaves when presented with worst case, highly repetitive, input data. The value can be between 0 and 250 with 0 being a special case.\n\nRegardless of the workfactor, the generated output is the same.",
257 'taint_observer' => array(
258 'set_mask' => "TAINT_BIT_MUTATED",
259 'clear_mask' => "TAINT_BIT_NONE",
263 DefineFunction(
264 array(
265 'name' => "bzdecompress",
266 'desc' => "bzdecompress() decompresses the given string containing bzip2 encoded data.",
267 'flags' => HasDocComment,
268 'return' => array(
269 'type' => Variant,
270 'desc' => "The decompressed string or number of error in case of error.",
272 'args' => array(
273 array(
274 'name' => "source",
275 'type' => String,
276 'desc' => "The string to decompress.",
278 array(
279 'name' => "small",
280 'type' => Int32,
281 'value' => "0",
282 'desc' => "If TRUE, an alternative decompression algorithm will be used which uses less memory (the maximum memory requirement drops to around 2300K) but works at roughly half the speed.\n\nSee the ยป bzip2 documentation for more information about this feature.",
285 'taint_observer' => array(
286 'set_mask' => "TAINT_BIT_MUTATED",
287 'clear_mask' => "TAINT_BIT_NONE",
292 ///////////////////////////////////////////////////////////////////////////////
293 // Classes
295 // BeginClass
296 // array (
297 // 'name' => name of the class
298 // 'desc' => description of the class's purpose
299 // 'flags' => attributes of the class, see base.php for possible values
300 // 'note' => additional note about this class's schema
301 // 'parent' => parent class name, if any
302 // 'ifaces' => array of interfaces tihs class implements
303 // 'bases' => extra internal and special base classes this class requires
304 // 'footer' => extra C++ inserted at end of class declaration
305 // )
307 // DefineConstant(..)
308 // DefineConstant(..)
309 // ...
310 // DefineFunction(..)
311 // DefineFunction(..)
312 // ...
313 // DefineProperty
314 // DefineProperty
316 // array (
317 // 'name' => name of the property
318 // 'type' => type of the property
319 // 'flags' => attributes of the property
320 // 'desc' => description of the property
321 // 'note' => additional note about this property's schema
322 // )
324 // EndClass()