Remove expensive assertion checks in st-array.h
[panda.git] / src / st-input.h
blobc0f0c15a2e89e08ac852d534261d6b271bd68eed
1 /*
2 * st-input.h
4 * Copyright (C) 2008 Vincent Geddes
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
25 #ifndef __ST_INPUT_H__
26 #define __ST_INPUT_H__
28 #include <st-types.h>
30 typedef struct st_input st_input;
32 enum
34 ST_INPUT_EOF = -1,
38 st_input *st_input_new (const char *string);
40 char st_input_look_ahead (st_input *input, int i);
42 st_uint st_input_get_line (st_input *input);
44 st_uint st_input_get_column (st_input *input);
46 void st_input_mark (st_input *input);
48 void st_input_rewind (st_input *input);
50 void st_input_seek (st_input *input, st_uint index);
52 void st_input_consume (st_input *input);
54 st_uint st_input_size (st_input *input);
56 st_uint st_input_index (st_input *input);
58 char *st_input_range (st_input *input, st_uint start, st_uint end);
60 char *st_input_next_chunk (st_input *input);
62 void st_input_destroy (st_input *input);
64 #endif /* __ST_INPUT_H__ */