Diff of /trunk/src/qnd_xml.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by harbaum, Sun Jan 18 19:43:20 2009 UTC revision 42 by harbaum, Wed Jan 21 20:01:18 2009 UTC
# Line 103  qnd_xml_entry_t *stack_pop(qnd_xml_conte Line 103  qnd_xml_entry_t *stack_pop(qnd_xml_conte
103  */  */
104    
105  /* TODO: this needs to be updated to cope with utf8 */  /* TODO: this needs to be updated to cope with utf8 */
106  inline char current_char(qnd_xml_context_t *context) {  static inline char current_char(qnd_xml_context_t *context) {
107    return *context->cur;    return *context->cur;
108  }  }
109    
110  /* TODO: this needs to be updated to cope with utf8 */  /* TODO: this needs to be updated to cope with utf8 */
111  inline gboolean skip_char(qnd_xml_context_t *context) {  static inline gboolean skip_char(qnd_xml_context_t *context) {
112    context->cur++;    context->cur++;
113    /* TODO: check buffer range */    /* TODO: check buffer range */
114    return TRUE;    return TRUE;
115  }  }
116    
117  gboolean skip_to_char(qnd_xml_context_t *context, char *chrs) {  static inline gboolean skip_to_char(qnd_xml_context_t *context, char *chrs) {
118    while(context->cur < context->buffer + context->total) {    while(context->cur < context->buffer + context->total) {
119      if(strchr(chrs, current_char(context))) {      if(strchr(chrs, current_char(context))) {
120        return skip_char(context);        return skip_char(context);
# Line 126  gboolean skip_to_char(qnd_xml_context_t Line 126  gboolean skip_to_char(qnd_xml_context_t
126    return FALSE;    return FALSE;
127  }  }
128    
129  gboolean buffer_overflow(qnd_xml_context_t *context) {  static inline gboolean buffer_overflow(qnd_xml_context_t *context) {
130    return(!(context->cur < context->buffer + context->total));    return(!(context->cur < context->buffer + context->total));
131  }  }
132    
133  gboolean get_element_name(qnd_xml_context_t *context) {  static gboolean get_element_name(qnd_xml_context_t *context) {
134    
135    char *start = context->cur;    char *start = context->cur;
136    
# Line 178  gboolean get_element_name(qnd_xml_contex Line 178  gboolean get_element_name(qnd_xml_contex
178    return TRUE;    return TRUE;
179  }  }
180    
181  gboolean get_attribute_name(qnd_xml_context_t *context) {  static gboolean get_attribute_name(qnd_xml_context_t *context) {
182    
183    char *start = context->cur;    char *start = context->cur;
184    

Legend:
Removed from v.41  
changed lines
  Added in v.42