Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

utils.c File Reference

#include <stdio.h>
#include <locale.h>
#include <ctype.h>
#include "utils.h"
#include <gnome.h>
#include "config.h"
#include <libxml/valid.h>

Go to the source code of this file.

Data Structures

struct  _ErrorMessage

Defines

#define CELL_SPACING   1

Typedefs

typedef _ErrorMessage ErrorMessage

Functions

void get_xml_parser_error_as_string1 (xmlParserCtxtPtr a_xml_parser_context, gchar *a_error_string)
 retrieves the error message associated to the error state of the current parser context.

void get_xml_parser_error_as_string2 (xmlParserErrors a_xml_error, gchar *a_error_string)
 retrieves the error message associated to the error number given in argument.

gboolean utils_is_white_string (const gchar *a_str)
void init_i18n (void)
xmlNs * xmlUnlinkNs (xmlNode *node, xmlNs *ns)
xmlNs * xmlUnlinkNsDef (xmlNode *node, xmlNs *ns)
int xmlValidGetValidElementsChildren (xmlNode *a_node, const xmlChar **a_list, int a_max)
 Gets the valid children of the element a_node.

void utils_parse_full_name (xmlNode *a_node, gchar *a_full_name, xmlNs **a_ns, gchar **a_local_name)
gint gtk_clist_absolute_row_top_ypixel (GtkCList *a_clist, gint a_row)
gint gtk_ctree_node_absolute_top_ypixel (GtkCTree *a_tree, GtkCTreeNode *a_node)


Define Documentation

#define CELL_SPACING   1
 

Definition at line 427 of file utils.c.

Referenced by gtk_clist_absolute_row_top_ypixel().


Typedef Documentation

typedef struct _ErrorMessage ErrorMessage
 

Definition at line 28 of file utils.c.


Function Documentation

void get_xml_parser_error_as_string1 xmlParserCtxtPtr    a_xml_parser_context,
gchar *    a_error_string
 

retrieves the error message associated to the error state of the current parser context.

Parameters:
a_xml_parser_context  the parser context to consider
a_error_string  the error message associated to the error state of the parser context. Is set to null if no message if associated to the error state of the parser context. The caller of this function must deallocated this variable.
Author:
Dodji Seketeli <sdodji@yahoo.com>

Definition at line 146 of file utils.c.

References _ErrorMessage::error_string, and _ErrorMessage::error_type.

void get_xml_parser_error_as_string2 xmlParserErrors    a_xml_error,
gchar *    a_error_string
 

retrieves the error message associated to the error number given in argument.

Parameters:
a_xml_error  the error number.
a_error_string  the error message associated to the error state of the Parser context. Is set to null if no message if associated to the error state of the parser context. The caller of this function must deallocated this variable.
Author:
Dodji Seketeli <sdodji@yahoo.com>

Definition at line 170 of file utils.c.

References _ErrorMessage::error_string, and _ErrorMessage::error_type.

gint gtk_clist_absolute_row_top_ypixel GtkCList *    a_clist,
gint    a_row
 

Definition at line 430 of file utils.c.

References CELL_SPACING.

Referenced by gtk_ctree_node_absolute_top_ypixel().

gint gtk_ctree_node_absolute_top_ypixel GtkCTree *    a_tree,
GtkCTreeNode *    a_node
 

Definition at line 440 of file utils.c.

References gtk_clist_absolute_row_top_ypixel().

void init_i18n void   
 

Definition at line 197 of file utils.c.

Referenced by main().

gboolean utils_is_white_string const gchar *    a_str
 

Definition at line 183 of file utils.c.

Referenced by mlview_attribute_picker_get_attribute_type(), mlview_editor_create_new_xml_document(), and utils_parse_full_name().

void utils_parse_full_name xmlNode *    a_node,
gchar *    a_full_name,
xmlNs **    a_ns,
gchar **    a_local_name
 

Parameters:
a_local_name  out parameter. The local name part of the full name. Can be null if there is no local name part.If this pointer. If a_local_name is not null, the caller has to free g_free(*a_local_name) ;
a_full_name  the name to parse to extract the prefix part and the local name part.
a_prefix  out parameter. The prefix part of the full name. Can be null if there is no prefix or if the prefix has not been declared in the node or in one of the node's parents. If *a_prefix is not NULL, the user has to free it by calling g_free(*a_prefix) ;
a_node  the xml node that is supposed to hold the fully qualified name

Definition at line 387 of file utils.c.

References utils_is_white_string().

xmlNs* xmlUnlinkNs xmlNode *    node,
xmlNs *    ns
 

Definition at line 211 of file utils.c.

xmlNs* xmlUnlinkNsDef xmlNode *    node,
xmlNs *    ns
 

Definition at line 249 of file utils.c.

Referenced by mlview_namespace_editor_remove_namespace_def().

int xmlValidGetValidElementsChildren xmlNode *    a_node,
const xmlChar **    a_list,
int    a_max
 

Gets the valid children of the element a_node.

This function replaces xmlValidGetValidElement because it works even if a_node is the root node and has no children... I've remarked that xmlValidGetValidElements () does not work in that case :(

Parameters:
param  a_list the output element name array.Must be allocated by the user.
a_max  the max size of the output list.
a_node  the node to consider.

Definition at line 299 of file utils.c.

Referenced by mlview_parsing_utils_build_element_name_completion_list().


Generated on Sat Jul 6 09:57:41 2002 for Gnome-MlView by doxygen1.2.16