Lines Matching refs:PRIVATE
79 #define PRIVATE(object) (object)->priv
100 PRIVATE (result) = g_try_malloc (sizeof (CRInputPriv));
101 if (!PRIVATE (result)) {
106 memset (PRIVATE (result), 0, sizeof (CRInputPriv));
107 PRIVATE (result)->free_in_buf = TRUE;
153 &PRIVATE (result)->in_buf,
154 &PRIVATE (result)->in_buf_size);
157 PRIVATE (result)->free_in_buf = TRUE;
162 PRIVATE (result)->nb_bytes = PRIVATE (result)->in_buf_size;
164 PRIVATE (result)->in_buf = (guchar *) a_buf;
165 PRIVATE (result)->in_buf_size = a_len;
166 PRIVATE (result)->nb_bytes = a_len;
167 PRIVATE (result)->free_in_buf = a_free_buf;
169 PRIVATE (result)->line = 1;
170 PRIVATE (result)->col = 0;
288 if (PRIVATE (a_this)) {
289 if (PRIVATE (a_this)->in_buf && PRIVATE (a_this)->free_in_buf) {
290 g_free (PRIVATE (a_this)->in_buf);
291 PRIVATE (a_this)->in_buf = NULL;
294 g_free (PRIVATE (a_this));
295 PRIVATE (a_this) = NULL;
311 g_return_if_fail (a_this && PRIVATE (a_this));
313 PRIVATE (a_this)->ref_count++;
329 g_return_val_if_fail (a_this && PRIVATE (a_this), FALSE);
331 if (PRIVATE (a_this)->ref_count) {
332 PRIVATE (a_this)->ref_count--;
335 if (PRIVATE (a_this)->ref_count == 0) {
359 g_return_val_if_fail (a_this && PRIVATE (a_this)
362 *a_end_of_input = (PRIVATE (a_this)->next_byte_index
363 >= PRIVATE (a_this)->in_buf_size) ? TRUE : FALSE;
378 g_return_val_if_fail (a_this && PRIVATE (a_this), -1);
379 g_return_val_if_fail (PRIVATE (a_this)->nb_bytes
380 <= PRIVATE (a_this)->in_buf_size, -1);
381 g_return_val_if_fail (PRIVATE (a_this)->next_byte_index
382 <= PRIVATE (a_this)->nb_bytes, -1);
384 if (PRIVATE (a_this)->end_of_input)
387 return PRIVATE (a_this)->nb_bytes - PRIVATE (a_this)->next_byte_index;
407 g_return_val_if_fail (a_this && PRIVATE (a_this)
410 g_return_val_if_fail (PRIVATE (a_this)->next_byte_index <=
411 PRIVATE (a_this)->nb_bytes, CR_BAD_PARAM_ERROR);
413 if (PRIVATE (a_this)->end_of_input == TRUE)
416 *a_byte = PRIVATE (a_this)->in_buf[PRIVATE (a_this)->next_byte_index];
418 if (PRIVATE (a_this)->nb_bytes -
419 PRIVATE (a_this)->next_byte_index < 2) {
420 PRIVATE (a_this)->end_of_input = TRUE;
422 PRIVATE (a_this)->next_byte_index++;
446 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_char,
449 if (PRIVATE (a_this)->end_of_input == TRUE)
459 (PRIVATE (a_this)->in_buf
461 PRIVATE (a_this)->next_byte_index,
466 PRIVATE (a_this)->next_byte_index += consumed;
469 if (PRIVATE (a_this)->end_of_line == TRUE) {
470 PRIVATE (a_this)->col = 1;
471 PRIVATE (a_this)->line++;
472 PRIVATE (a_this)->end_of_line = FALSE;
474 PRIVATE (a_this)->col++;
478 PRIVATE (a_this)->end_of_line = TRUE;
498 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
500 PRIVATE (a_this)->line = a_line_num;
517 g_return_val_if_fail (a_this && PRIVATE (a_this)
520 *a_line_num = PRIVATE (a_this)->line;
537 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
539 PRIVATE (a_this)->col = a_col;
556 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_col,
559 *a_col = PRIVATE (a_this)->col;
576 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
578 PRIVATE (a_this)->line += a_increment;
595 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
597 PRIVATE (a_this)->col += a_increment;
620 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
661 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_nb_char,
703 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_nb_chars,
754 g_return_val_if_fail (a_this && PRIVATE (a_this)
757 if (PRIVATE (a_this)->next_byte_index >=
758 PRIVATE (a_this)->in_buf_size) {
769 (PRIVATE (a_this)->in_buf +
770 PRIVATE (a_this)->next_byte_index,
802 g_return_val_if_fail (a_this && PRIVATE (a_this)
808 abs_offset = PRIVATE (a_this)->next_byte_index - 1 + a_offset;
816 abs_offset = PRIVATE (a_this)->in_buf_size - 1 - a_offset;
823 if (abs_offset < PRIVATE (a_this)->in_buf_size) {
825 *a_byte = PRIVATE (a_this)->in_buf[abs_offset];
854 g_return_val_if_fail (a_this && PRIVATE (a_this), 0);
882 g_return_val_if_fail (a_this && PRIVATE (a_this), NULL);
884 if (a_offset >= PRIVATE (a_this)->nb_bytes) {
888 return &PRIVATE (a_this)->in_buf[a_offset];
903 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_offset,
906 if (!PRIVATE (a_this)->next_byte_index) {
911 (a_this, PRIVATE (a_this)->next_byte_index - 1);
938 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
943 abs_offset = PRIVATE (a_this)->next_byte_index - 1 + a_pos;
951 abs_offset = PRIVATE (a_this)->in_buf_size - 1 - a_pos;
959 && (gulong) abs_offset < PRIVATE (a_this)->nb_bytes) {
962 PRIVATE (a_this)->next_byte_index = abs_offset + 1;
990 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_pos,
993 a_pos->next_byte_index = PRIVATE (a_this)->next_byte_index;
994 a_pos->line = PRIVATE (a_this)->line;
995 a_pos->col = PRIVATE (a_this)->col;
996 a_pos->end_of_line = PRIVATE (a_this)->end_of_line;
997 a_pos->end_of_file = PRIVATE (a_this)->end_of_input;
1020 && PRIVATE (a_this)
1024 a_loc->line = PRIVATE (a_this)->line ;
1025 a_loc->column = PRIVATE (a_this)->col ;
1026 if (PRIVATE (a_this)->next_byte_index) {
1027 a_loc->byte_offset = PRIVATE (a_this)->next_byte_index - 1 ;
1029 a_loc->byte_offset = PRIVATE (a_this)->next_byte_index ;
1050 g_return_val_if_fail (a_this && PRIVATE (a_this)
1053 *a_index = PRIVATE (a_this)->next_byte_index;
1072 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
1074 PRIVATE (a_this)->next_byte_index = a_index;
1091 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
1093 PRIVATE (a_this)->end_of_input = a_eof;
1111 g_return_val_if_fail (a_this && PRIVATE (a_this)
1114 *a_eof = PRIVATE (a_this)->end_of_input;
1132 g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
1134 PRIVATE (a_this)->end_of_line = a_eol;
1153 g_return_val_if_fail (a_this && PRIVATE (a_this)
1156 *a_eol = PRIVATE (a_this)->end_of_line;
1174 g_return_val_if_fail (a_this && PRIVATE (a_this) && a_pos,