CaptiveFileObject *captive_file_object;
GnomeVFSResult errgnomevfsresult;
struct captive_libxml_string_drop_stack *drop_stack=NULL;
-const xmlChar *xml_object;
+const gchar *xml_object;
/* Prevent output block buffering if redirecting stdout to file. */
setvbuf(stdout,(char *)NULL,_IONBF,0);
const xmlChar *xml_name;
xml_name=xmlTextReaderName(xml_reader);
- /**/ if (!xmlStrcmp(xml_name,"bug")) { /* root tag */
+ /**/ if (!xmlStrcmp(xml_name,BAD_CAST "bug")) { /* root tag */
}
- else if (!xmlStrcmp(xml_name,"captive")) {
-const xmlChar *xml_captive_version;
+ else if (!xmlStrcmp(xml_name,BAD_CAST "captive")) {
+const gchar *xml_captive_version;
- xml_captive_version=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,"version"));
+ xml_captive_version=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,BAD_CAST "version"));
g_assert(xml_captive_version!=NULL);
- g_assert(!xmlStrcmp(xml_captive_version,VERSION));
+ g_assert(!strcmp(xml_captive_version,VERSION));
}
- else if (!xmlStrcmp(xml_name,"filesystem")) { /* contains <module/> */
+ else if (!xmlStrcmp(xml_name,BAD_CAST "filesystem")) { /* contains <module/> */
module_is_filesystem=TRUE;
}
- else if (!xmlStrcmp(xml_name,"load_module")) { /* contains <module/> */
+ else if (!xmlStrcmp(xml_name,BAD_CAST "load_module")) { /* contains <module/> */
module_is_filesystem=FALSE;
}
- else if (!xmlStrcmp(xml_name,"module")) {
-const xmlChar *xml_module_basename;
+ else if (!xmlStrcmp(xml_name,BAD_CAST "module")) {
+const gchar *xml_module_basename;
struct captive_options_module *options_module;
gboolean errbool;
captive_new(options_module);
options.load_module=g_list_append(options.load_module,options_module);
}
- xml_module_basename=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,"basename"));
+ xml_module_basename=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,BAD_CAST "basename"));
g_assert(xml_module_basename!=NULL);
g_assert(strchr(xml_module_basename,'/')==NULL); /* a bit of security */
errbool=captive_options_module_load(options_module,
g_assert(errbool==TRUE);
switch (options_module->type) {
case CAPTIVE_OPTIONS_MODULE_TYPE_PE32: {
-const xmlChar *xml_module_md5,*xml_module_length;
+const gchar *xml_module_md5,*xml_module_length;
if (options_module->u.pe32.md5
- && (xml_module_md5=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,"version"))))
- g_assert(!xmlStrcmp(xml_module_md5,options_module->u.pe32.md5));
- if ((xml_module_length=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,"length"))))
- g_assert(!xmlStrcmp(xml_module_length,
+ && (xml_module_md5=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,BAD_CAST "version"))))
+ g_assert(!strcmp(xml_module_md5,options_module->u.pe32.md5));
+ if ((xml_module_length=captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,BAD_CAST "length"))))
+ g_assert(!strcmp(xml_module_length,
captive_printf_alloca("%lu",(unsigned long)options_module->u.pe32.length)));
} break;
case CAPTIVE_OPTIONS_MODULE_TYPE_GMODULE:
default: g_assert_not_reached();
}
}
- else if (!xmlStrcmp(xml_name,"action")) {
+ else if (!xmlStrcmp(xml_name,BAD_CAST "action")) {
int xml_action_depth;
gboolean action_done,action_preread;
break;
case CAPTIVE_XML_TEXT_READER_NODE_TYPE_END: { /* We do not track tag ends. */
if ((action_done=(xml_action_depth==xmlTextReaderDepth(xml_reader)))) {
-const xmlChar *xml_name_end;
+const gchar *xml_name_end;
xml_name_end=captive_libxml_string_drop(&drop_stack,xmlTextReaderName(xml_reader));
- g_assert(!xmlStrcmp(xml_name_end,"action"));
+ g_assert(!strcmp(xml_name_end,"action"));
}
} break;
case CAPTIVE_XML_TEXT_READER_NODE_TYPE_START: {
}
}
}
- else if (!xmlStrcmp(xml_name,"media")) {
+ else if (!xmlStrcmp(xml_name,BAD_CAST "media")) {
const xmlChar *xml_media_end_name,*xml_media_type;
g_assert(options.image_iochannel==NULL);
g_assert(CAPTIVE_XML_TEXT_READER_NODE_TYPE_END==xmlTextReaderNodeType(xml_reader));
xml_media_end_name=xmlTextReaderName(xml_reader);
g_assert(xml_media_end_name!=NULL);
- g_assert(!xmlStrcmp(xml_media_end_name,"media"));
+ g_assert(!xmlStrcmp(xml_media_end_name,BAD_CAST "media"));
xmlFree((xmlChar *)xml_media_end_name);
- xml_media_type=xmlTextReaderGetAttribute(xml_reader,"type");
+ xml_media_type=xmlTextReaderGetAttribute(xml_reader,BAD_CAST "type");
g_assert(xml_media_type!=NULL);
- /**/ if (!xmlStrcmp(xml_media_type,"cdrom"))
+ /**/ if (!xmlStrcmp(xml_media_type,BAD_CAST "cdrom"))
options.media=CAPTIVE_OPTION_MEDIA_CDROM;
- else if (!xmlStrcmp(xml_media_type,"disk"))
+ else if (!xmlStrcmp(xml_media_type,BAD_CAST "disk"))
options.media=CAPTIVE_OPTION_MEDIA_DISK;
else g_assert_not_reached();
xmlFree((xmlChar *)xml_media_type);
}
- else if (!xmlStrcmp(xml_name,"log")) {
+ else if (!xmlStrcmp(xml_name,BAD_CAST "log")) {
errint=xmlTextReaderNext(xml_reader);
g_assert(errint==1);
preread=TRUE;
captive_libxml_string_drop_flush(&drop_stack);
#define GET_PROP_STRING(prop_name) ({ \
- const xmlChar *_get_prop_string_r=captive_libxml_string_drop(&drop_stack,xmlGetProp(xml_node,(prop_name))); \
+ const gchar *_get_prop_string_r=captive_libxml_string_drop(&drop_stack,xmlGetProp(xml_node,BAD_CAST (prop_name))); \
g_assert(_get_prop_string_r!=NULL); \
_get_prop_string_r; \
})
object=g_hash_table_lookup(object_hash,xml_object);
g_assert(object==NULL || G_IS_OBJECT(object));
- if (!xmlStrcmp(xml_node->name,"vfs_new")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "vfs_new")) {
g_assert(action_is_first==TRUE);
g_assert(captive_vfs_object!=NULL);
g_assert(object==NULL);
g_hash_table_insert(object_hash,g_strdup(xml_object),captive_vfs_object);
continue;
}
- if (!xmlStrcmp(xml_node->name,"vfs_commit")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "vfs_commit")) {
g_assert(action_is_first==TRUE);
g_assert(captive_vfs_object!=NULL);
g_assert(object==NULL);
continue;
}
g_assert(action_is_first==FALSE);
- if (!xmlStrcmp(xml_node->name,"vfs_close")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "vfs_close")) {
g_assert(captive_vfs_object!=NULL);
g_assert(CAPTIVE_VFS_OBJECT(object)==captive_vfs_object);
errbool=g_hash_table_remove(object_hash,xml_object); /* g_object_unref() by object_hash_value_destroy_func() */
continue;
}
g_assert(captive_vfs_object!=NULL);
- if (!xmlStrcmp(xml_node->name,"vfs_volume_info_get")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "vfs_volume_info_get")) {
CaptiveVfsVolumeInfo volume_info;
errgnomevfsresult=captive_vfs_volume_info_get(captive_vfs_object,&volume_info);
}
/* DIRECTORY */
- if (!xmlStrcmp(xml_node->name,"directory_new_open")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "directory_new_open")) {
g_assert(object==NULL);
errgnomevfsresult=captive_directory_new_open(&captive_directory_object,captive_vfs_object,
GET_PROP_STRING("pathname"));
g_hash_table_insert(object_hash,g_strdup(xml_object),captive_directory_object);
continue;
}
- if (!xmlStrcmp(xml_node->name,"directory_new_make")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "directory_new_make")) {
g_assert(object==NULL);
errgnomevfsresult=captive_directory_new_make(&captive_directory_object,captive_vfs_object,
GET_PROP_STRING("pathname"),
g_hash_table_insert(object_hash,g_strdup(xml_object),captive_directory_object);
continue;
}
- if (!xmlStrcmp(xml_node->name,"directory_close")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "directory_close")) {
captive_directory_object=CAPTIVE_DIRECTORY_OBJECT(object);
errbool=g_hash_table_remove(object_hash,xml_object); /* g_object_unref() by object_hash_value_destroy_func() */
g_assert(errbool==TRUE);
continue;
}
- if (!xmlStrcmp(xml_node->name,"directory_read")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "directory_read")) {
GnomeVFSFileInfo file_info;
captive_directory_object=CAPTIVE_DIRECTORY_OBJECT(object);
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
continue;
}
- if (!xmlStrcmp(xml_node->name,"directory_remove")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "directory_remove")) {
captive_directory_object=CAPTIVE_DIRECTORY_OBJECT(object);
errgnomevfsresult=captive_directory_remove(captive_directory_object);
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
}
/* FILE */
- if (!xmlStrcmp(xml_node->name,"file_new_open")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_new_open")) {
g_assert(object==NULL);
errgnomevfsresult=captive_file_new_open(&captive_file_object,captive_vfs_object,
GET_PROP_STRING("pathname"),
g_hash_table_insert(object_hash,g_strdup(xml_object),captive_file_object);
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_new_create")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_new_create")) {
g_assert(object==NULL);
errgnomevfsresult=captive_file_new_create(&captive_file_object,captive_vfs_object,
GET_PROP_STRING("pathname"),
g_hash_table_insert(object_hash,g_strdup(xml_object),captive_file_object);
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_close")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_close")) {
captive_file_object=CAPTIVE_FILE_OBJECT(object);
errbool=g_hash_table_remove(object_hash,xml_object); /* g_object_unref() by object_hash_value_destroy_func() */
g_assert(errbool==TRUE);
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_read")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_read")) {
gpointer buffer;
GnomeVFSFileSize num_bytes,bytes_read;
g_free(buffer);
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_write")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_write")) {
gpointer buffer;
GnomeVFSFileSize num_bytes,bytes_written;
g_free(buffer);
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_seek")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_seek")) {
GnomeVFSSeekPosition whence=GNOME_VFS_SEEK_START; /* Prevent: ... might be used uninitialized in this function */
-const xmlChar *whence_string;
+const gchar *whence_string;
captive_file_object=CAPTIVE_FILE_OBJECT(object);
whence_string=GET_PROP_STRING("whence");
- /**/ if (!xmlStrcmp(whence_string,"start" )) whence=GNOME_VFS_SEEK_START;
- else if (!xmlStrcmp(whence_string,"current")) whence=GNOME_VFS_SEEK_CURRENT;
- else if (!xmlStrcmp(whence_string,"end" )) whence=GNOME_VFS_SEEK_END;
+ /**/ if (!strcmp(whence_string,"start" )) whence=GNOME_VFS_SEEK_START;
+ else if (!strcmp(whence_string,"current")) whence=GNOME_VFS_SEEK_CURRENT;
+ else if (!strcmp(whence_string,"end" )) whence=GNOME_VFS_SEEK_END;
else g_assert_not_reached();
errgnomevfsresult=captive_file_seek(captive_file_object,whence,
GET_PROP_GINT64("offset"));
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_tell")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_tell")) {
GnomeVFSFileOffset offset;
captive_file_object=CAPTIVE_FILE_OBJECT(object);
g_assert((gint64)offset==GET_PROP_GINT64("offset"));
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_remove")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_remove")) {
captive_file_object=CAPTIVE_FILE_OBJECT(object);
errgnomevfsresult=captive_file_remove(captive_file_object);
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_file_info_get")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_file_info_get")) {
GnomeVFSFileInfo file_info;
captive_file_object=CAPTIVE_FILE_OBJECT(object);
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_file_info_set")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_file_info_set")) {
GnomeVFSFileInfo file_info;
captive_file_object=CAPTIVE_FILE_OBJECT(object);
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_truncate")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_truncate")) {
captive_file_object=CAPTIVE_FILE_OBJECT(object);
errgnomevfsresult=captive_file_truncate(captive_file_object,
GET_PROP_GINT64("file_size"));
g_assert(!strcmp(gnome_vfs_result_to_string(errgnomevfsresult),GET_PROP_STRING("result")));
continue;
}
- if (!xmlStrcmp(xml_node->name,"file_move")) {
+ if (!xmlStrcmp(xml_node->name,BAD_CAST "file_move")) {
captive_file_object=CAPTIVE_FILE_OBJECT(object);
errgnomevfsresult=captive_file_move(captive_file_object,
GET_PROP_STRING("pathname_new"),
g_hash_table_insert(module_valid_length_hash,GINT_TO_POINTER(module->length),NULL);
}
- if (strcmp(module->type,"cabinet")) {
+ if (strcmp((const char *)module->type,"cabinet")) {
if (module->priority>captivemodid_module_type_best_priority_lookup(module->type)) {
module_type_best_priority_hash_init();
g_hash_table_insert(module_type_best_priority_hash,
{
xmlChar *r;
- if (!(r=xmlTextReaderGetAttribute(xml_reader,attr_name))) {
+ if (!(r=xmlTextReaderGetAttribute(xml_reader,BAD_CAST attr_name))) {
/* FIXME: File line identification? */
g_warning(_("%s: Undefined attributes: %s"),captivemodid_pathname,attr_name);
return NULL;
if (!(string=captivemodid_load_module_xml_get_attr(captivemodid_pathname,xml_reader,attr_name)))
return num_min-1;
- r=strtol(string,&ends,0);
+ r=strtol((const char *)string,&ends,0);
xmlFree(string);
if (r<num_min || r>num_max) {
g_warning(_("%s: Numer of out range %ld..%ld: %ld"),captivemodid_pathname,num_min,num_max,r);
goto fail_free_module;
if (!(module->md5 =captivemodid_load_module_xml_get_attr(captivemodid_pathname,xml_reader,"md5")))
goto fail_free_module;
- if (strlen(module->md5)!=strspn(module->md5,"0123456789abcdef")) {
+ if (strlen((const char *)module->md5)!=strspn((const char *)module->md5,"0123456789abcdef")) {
g_warning(_("%s: Attribute 'md5' can be only lower-cased hexstring: %s"),captivemodid_pathname,module->md5);
goto fail_free_module;
}
- if (strlen(module->md5)!=32) {
+ if (strlen((const char *)module->md5)!=32) {
g_warning(_("%s: Attribute 'md5' length must be 32: %s"),captivemodid_pathname,module->md5);
goto fail_free_module;
}
if (0>=(module->length=captivemodid_load_module_xml_get_attr_l(
captivemodid_pathname,xml_reader,"length",1,G_MAXINT-1)))
goto fail_free_module;
- if (!(cabinet_used_string=xmlTextReaderGetAttribute(xml_reader,"cabinet_used")))
+ if (!(cabinet_used_string=xmlTextReaderGetAttribute(xml_reader,BAD_CAST "cabinet_used")))
module->cabinet_used=0;
else {
xmlFree(cabinet_used_string);
g_return_if_fail(captivemodid_module_best_priority_notify!=NULL);
- (*captivemodid_module_best_priority_notify)(type);
+ (*captivemodid_module_best_priority_notify)((const gchar *)type);
}
void (*captivemodid_module_best_priority_notify)(const gchar *module_type);
const xmlChar *xml_name;
xml_name=xmlTextReaderName(xml_reader);
- /**/ if (!xmlStrcmp(xml_name,"modid")) { /* root tag */
+ /**/ if (!xmlStrcmp(xml_name,BAD_CAST "modid")) { /* root tag */
}
- else if (!xmlStrcmp(xml_name,"module"))
+ else if (!xmlStrcmp(xml_name,BAD_CAST "module"))
captivemodid_load_module_xml(captivemodid_pathname,xml_reader);
else g_warning(_("%s: Unknown ELEMENT node: %s"),captivemodid_pathname,xml_name);
xmlFree((xmlChar *)xml_name);
if (!(module=captivemodid_module_md5_lookup(file_md5)))
goto fail_free_file_md5;
- if (strcmp("cabinet",module->type))
+ if (strcmp("cabinet",(const char *)module->type))
mod_uri_load_module_from_memory(module,file_base,file_length,uri);
else {
struct acquire_cabinet *acquire_cabinet;
gdk_threads_enter();
- iter=DriversTreeStore_Iter_hash_get_iter(module_available->module->type);
+ iter=DriversTreeStore_Iter_hash_get_iter((const gchar *)module_available->module->type);
gtk_tree_store_set(DriversTreeStore,iter,
DRIVERS_TREE_STORE_COLUMN_TYPE,module_available->module->type,
DRIVERS_TREE_STORE_COLUMN_ID ,module_available->module->id,
-1);
- if (!strcmp(module_available->module->type,"ntoskrnl.exe"))
+ if (!strcmp((const char *)module_available->module->type,"ntoskrnl.exe"))
some_module_ntoskrnl_exe_found=TRUE;
- if (!strcmp(module_available->module->type,"ntfs.sys"))
+ if (!strcmp((const char *)module_available->module->type,"ntfs.sys"))
some_module_ntfs_sys_found=TRUE;
some_modules_found=some_module_ntoskrnl_exe_found && some_module_ntfs_sys_found;
g_return_if_fail(type!=NULL);
g_return_if_fail(module_available!=NULL);
g_return_if_fail(module_available->module!=NULL);
- g_return_if_fail(!strcmp(type,module_available->module->type));
+ g_return_if_fail(!strcmp((const char *)type,(const char *)module_available->module->type));
g_return_if_fail(param!=NULL);
if (param->do_print)
print_ui_line_module_available(module_available);
- /**/ if (!strcmp(type,"ntoskrnl.exe"))
+ /**/ if (!strcmp((const char *)type,"ntoskrnl.exe"))
param->ntoskrnl_exe_found=TRUE;
- else if (!strcmp(type,"ntfs.sys"))
+ else if (!strcmp((const char *)type,"ntfs.sys"))
param->ntfs_sys_found=TRUE;
}
NULL); /* error */
g_assert(errgiostatus==G_IO_STATUS_NORMAL);
- xml_media=xmlNewTextChild(xml_parent,NULL,"media",NULL);
- xmlNewProp(xml_media,"size",captive_printf_alloca("%" G_GUINT64_FORMAT,giochannel_blind->size));
+ xml_media=xmlNewTextChild(xml_parent,NULL,BAD_CAST "media",NULL);
+ xmlNewProp(xml_media,BAD_CAST "size",BAD_CAST captive_printf_alloca("%" G_GUINT64_FORMAT,giochannel_blind->size));
blind_block_array=captive_giochannel_blind_as_sorted_array
(giochannel_blind,captive_giochannel_blind_read_as_sorted_array_foreach);
*gd++=0;
g_assert(s==hex+2+2*GIOCHANNEL_BLIND_BLOCK_SIZE);
g_assert(gd==hex_out+sizeof(hex_out));
- xml_media_read=xmlNewTextChild(xml_media,NULL,"block",hex_out);
+ xml_media_read=xmlNewTextChild(xml_media,NULL,BAD_CAST "block",BAD_CAST hex_out);
{
g_snprintf(offset_string,sizeof(offset_string),"%" G_GUINT64_FORMAT,blind_block->offset);
- xmlNewProp(xml_media_read,"offset",offset_string);
+ xmlNewProp(xml_media_read,BAD_CAST "offset",BAD_CAST offset_string);
}
}
struct captive_giochannel_blind *captive_giochannel_blind_new_from_xml(xmlTextReader *xml_reader)
{
struct captive_giochannel_blind *r;
-const xmlChar *xml_name;
+const gchar *xml_name;
int errint;
GIOStatus erriostatus;
gboolean scan_end;
g_return_val_if_fail(xmlTextReaderNodeType(xml_reader)==CAPTIVE_XML_TEXT_READER_NODE_TYPE_START,NULL);
xml_name=captive_libxml_string_drop(&drop_stack,xmlTextReaderName(xml_reader));
g_return_val_if_fail(xml_name!=NULL,NULL);
- g_return_val_if_fail(!xmlStrcmp(xml_name,"media"),NULL);
+ g_return_val_if_fail(!strcmp(xml_name,"media"),NULL);
r=captive_giochannel_blind_new(
NULL, /* giochannel_orig */
TRUE); /* writeable */
- r->size=captive_libxml_sscanf_gint64(captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,"size")));
+ r->size=captive_libxml_sscanf_gint64(captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,BAD_CAST "size")));
scan_end=FALSE;
do {
case CAPTIVE_XML_TEXT_READER_NODE_TYPE_TEXT: /* Even empty nodes have some '#text'. */
break;
case CAPTIVE_XML_TEXT_READER_NODE_TYPE_START: {
-const xmlChar *xml_name;
+const gchar *xml_name;
xml_name=captive_libxml_string_drop(&drop_stack,xmlTextReaderName(xml_reader));
g_assert(xml_name!=NULL);
- if (!xmlStrcmp(xml_name,"block")) {
+ if (!strcmp(xml_name,"block")) {
guint64 offset;
gsize bytes_written;
-const xmlChar *xml_text_hex_in,*xml_char_s;
+const gchar *xml_text_hex_in,*xml_char_s;
BIGNUM *bignum;
int bignum_num_bytes;
gchar bin_hex[2*GIOCHANNEL_BLIND_BLOCK_SIZE+1],*gd;
unsigned char bin_out[GIOCHANNEL_BLIND_BLOCK_SIZE];
offset=captive_libxml_sscanf_gint64(
- captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,"offset")));
+ captive_libxml_string_drop(&drop_stack,xmlTextReaderGetAttribute(xml_reader,BAD_CAST "offset")));
errint=xmlTextReaderRead(xml_reader);
g_assert(errint==1);
else g_error("Unknown START node: %s",xml_name);
} break;
case CAPTIVE_XML_TEXT_READER_NODE_TYPE_END: {
-const xmlChar *xml_name;
+const gchar *xml_name;
xml_name=captive_libxml_string_drop(&drop_stack,xmlTextReaderName(xml_reader));
- /**/ if (!xmlStrcmp(xml_name,"media")) {
+ /**/ if (!strcmp(xml_name,"media")) {
scan_end=TRUE; /* proper cleanup */
}
- else if (!xmlStrcmp(xml_name,"block")) {
+ else if (!strcmp(xml_name,"block")) {
}
else g_error("Unknown END node: %s",xml_name);
} break;
xmlFree((xmlChar *)xml_string);
}
-const xmlChar *captive_libxml_string_drop(struct captive_libxml_string_drop_stack **drop_stackp,const xmlChar *xml_string)
+G_CONST_RETURN gchar *captive_libxml_string_drop(struct captive_libxml_string_drop_stack **drop_stackp,const xmlChar *xml_string)
{
GHook *g_hook;
g_return_val_if_fail(drop_stackp!=NULL,NULL);
if (!xml_string)
- return xml_string;
+ return NULL;
if (!*drop_stackp) {
captive_new(*drop_stackp);
g_hook->data=(xmlChar *)xml_string;
g_hook_append(&(*drop_stackp)->g_hook_list,g_hook);
- return xml_string;
+ return (const gchar *)xml_string;
}
struct captive_libxml_string_drop_stack;
-gint64 captive_libxml_sscanf_gint64(const gchar *gint64_string);
-const xmlChar *captive_libxml_string_drop(struct captive_libxml_string_drop_stack **drop_stackp,const xmlChar *xml_string);
+gint64 captive_libxml_sscanf_gint64(const char *gint64_string);
+G_CONST_RETURN gchar *captive_libxml_string_drop(struct captive_libxml_string_drop_stack **drop_stackp,const xmlChar *xml_string);
void captive_libxml_string_drop_flush(struct captive_libxml_string_drop_stack **drop_stackp);
G_END_DECLS
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_DIRECTORY_OBJECT(captive_directory_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"directory_new_open",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_directory_parent_object));
- xmlNewProp(xml_action,"pathname",captive_directory_parent_object->pathname);
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "directory_new_open",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_directory_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "pathname",BAD_CAST captive_directory_parent_object->pathname);
}
corba_Directory_object=Captive_Vfs_directory_new_open(
captive_vfs_parent_object->corba_Vfs_object,captive_directory_parent_object->pathname,&captive_corba_ev);
if (xml_action)
- xmlNewProp(xml_action,"result",(captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST (captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
/* If 'r' means failure 'corba_Directory_object' may not be 'CORBA_OBJECT_NIL'
* although it is not valid 'CORBA_Object' to be passed to CORBA_Object_release().
*/
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_DIRECTORY_OBJECT(captive_directory_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"directory_new_make",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_directory_parent_object));
- xmlNewProp(xml_action,"pathname",captive_directory_parent_object->pathname);
- xmlNewProp(xml_action,"perm",captive_printf_alloca("%u",(unsigned)perm));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "directory_new_make",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_directory_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "pathname",BAD_CAST captive_directory_parent_object->pathname);
+ xmlNewProp(xml_action,BAD_CAST "perm",BAD_CAST captive_printf_alloca("%u",(unsigned)perm));
}
corba_Directory_object=Captive_Vfs_directory_new_make(
captive_vfs_parent_object->corba_Vfs_object,captive_directory_parent_object->pathname,perm,&captive_corba_ev);
if (xml_action)
- xmlNewProp(xml_action,"result",(captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST (captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
/* If 'r' means failure 'corba_Directory_object' may not be 'CORBA_OBJECT_NIL'
* although it is not valid 'CORBA_Object' to be passed to CORBA_Object_release().
*/
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_DIRECTORY_OBJECT(captive_directory_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"directory_close",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_directory_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "directory_close",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_directory_parent_object));
}
Captive_Directory_shutdown(captive_directory_parent_object->corba_Directory_object,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
/* Always clear 'corba_Directory_object' even if 'r' means failure. */
CORBA_Object_release((CORBA_Object)captive_directory_parent_object->corba_Directory_object,&captive_corba_ev);
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_DIRECTORY_OBJECT(captive_directory_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"directory_read",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_directory_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "directory_read",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_directory_parent_object));
}
Captive_Directory_read(captive_directory_parent_object->corba_Directory_object,&file_info_corba,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
r=captive_sandbox_file_info_corba_to_captive(file_info_captive,file_info_corba);
if (xml_action)
- xmlSetProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlSetProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r; /* 'file_info_corba' leak */
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_DIRECTORY_OBJECT(captive_directory_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"directory_remove",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_directory_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "directory_remove",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_directory_parent_object));
}
Captive_Directory_remove(captive_directory_parent_object->corba_Directory_object,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_new_open",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"pathname",captive_file_parent_object->pathname);
- xmlNewProp(xml_action,"mode",captive_printf_alloca("%u",(unsigned)captive_file_parent_object->mode));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_new_open",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "pathname",BAD_CAST captive_file_parent_object->pathname);
+ xmlNewProp(xml_action,BAD_CAST "mode",BAD_CAST captive_printf_alloca("%u",(unsigned)captive_file_parent_object->mode));
}
corba_File_object=Captive_Vfs_file_new_open(captive_vfs_parent_object->corba_Vfs_object,
captive_file_parent_object->pathname,captive_file_parent_object->mode,&captive_corba_ev);
if (xml_action)
- xmlNewProp(xml_action,"result",(captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST (captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
/* If 'r' means failure 'corba_File_object' may not be 'CORBA_OBJECT_NIL'
* although it is not valid 'CORBA_Object' to be passed to CORBA_Object_release().
*/
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_new_create",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"pathname",captive_file_parent_object->pathname);
- xmlNewProp(xml_action,"mode",captive_printf_alloca("%u",(unsigned)captive_file_parent_object->mode));
- xmlNewProp(xml_action,"exclusive",captive_printf_alloca("%u",(unsigned)exclusive));
- xmlNewProp(xml_action,"perm",captive_printf_alloca("%u",(unsigned)perm));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_new_create",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "pathname",BAD_CAST captive_file_parent_object->pathname);
+ xmlNewProp(xml_action,BAD_CAST "mode",BAD_CAST captive_printf_alloca("%u",(unsigned)captive_file_parent_object->mode));
+ xmlNewProp(xml_action,BAD_CAST "exclusive",BAD_CAST captive_printf_alloca("%u",(unsigned)exclusive));
+ xmlNewProp(xml_action,BAD_CAST "perm",BAD_CAST captive_printf_alloca("%u",(unsigned)perm));
}
corba_File_object=Captive_Vfs_file_new_create(captive_vfs_parent_object->corba_Vfs_object,
captive_file_parent_object->pathname,captive_file_parent_object->mode,exclusive,perm,&captive_corba_ev);
if (xml_action)
- xmlNewProp(xml_action,"result",(captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST (captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
/* If 'r' means failure 'corba_File_object' may not be 'CORBA_OBJECT_NIL'
* although it is not valid 'CORBA_Object' to be passed to CORBA_Object_release().
*/
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_close",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_close",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
}
Captive_File_shutdown(captive_file_parent_object->corba_File_object,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
/* Always clear 'corba_File_object' even if 'r' means failure. */
CORBA_Object_release((CORBA_Object)captive_file_parent_object->corba_File_object,&captive_corba_ev);
*bytes_read_return=0;
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_read",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"num_bytes",captive_printf_alloca("%lu",(unsigned long)num_bytes));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_read",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "num_bytes",BAD_CAST captive_printf_alloca("%lu",(unsigned long)num_bytes));
}
r=captive_sandbox_parent_file_seek_slave(captive_file_parent_object,
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
}
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
CORBA_free(buffer_corba);
if (xml_action)
- xmlNewProp(xml_action,"bytes_read_return",captive_printf_alloca("%lu",(unsigned long)*bytes_read_return));
+ xmlNewProp(xml_action,BAD_CAST "bytes_read_return",BAD_CAST captive_printf_alloca("%lu",(unsigned long)*bytes_read_return));
return GNOME_VFS_OK;
}
if (r==GNOME_VFS_OK) {
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_write",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"num_bytes",captive_printf_alloca("%lu",(unsigned long)num_bytes));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_write",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "num_bytes",BAD_CAST captive_printf_alloca("%lu",(unsigned long)num_bytes));
}
buffer_corba_local._maximum=num_bytes;
&buffer_corba_local,&bytes_written_corba,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
}
if (r!=GNOME_VFS_OK)
return r;
captive_file_parent_object->offset+=bytes_written_corba;
if (xml_action)
- xmlNewProp(xml_action,"bytes_written_return",captive_printf_alloca("%lu",(unsigned long)*bytes_written_return));
+ xmlNewProp(xml_action,BAD_CAST "bytes_written_return",BAD_CAST captive_printf_alloca("%lu",(unsigned long)*bytes_written_return));
return GNOME_VFS_OK;
}
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_seek",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"whence",
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_seek",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "whence",BAD_CAST
(whence==GNOME_VFS_SEEK_START ? "start" :
(whence==GNOME_VFS_SEEK_CURRENT ? "current" :
(whence==GNOME_VFS_SEEK_END ? "end" : captive_printf_alloca("%lu",(unsigned long)whence)))));
- xmlNewProp(xml_action,"offset",captive_printf_alloca("%" G_GINT64_FORMAT,(gint64)offset));
+ xmlNewProp(xml_action,BAD_CAST "offset",BAD_CAST captive_printf_alloca("%" G_GINT64_FORMAT,(gint64)offset));
}
Captive_File_seek(captive_file_parent_object->corba_File_object,whence,offset,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_remove",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_remove",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
}
Captive_File_remove(captive_file_parent_object->corba_File_object,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_file_info_get",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_file_info_get",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
}
Captive_File_file_info_get(captive_file_parent_object->corba_File_object,&file_info_corba,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
Captive_GnomeVFSFileInfo__freekids(file_info_corba,NULL/* 'd'; meaning? */);
CORBA_free(file_info_corba);
if (xml_action)
- xmlSetProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlSetProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_file_info_set",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"mask",captive_printf_alloca("%u",(unsigned)mask));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_file_info_set",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "mask",BAD_CAST captive_printf_alloca("%u",(unsigned)mask));
}
if (GNOME_VFS_OK!=(r=captive_sandbox_file_info_set_mask_captive_to_corba(&file_info_corba,file_info_captive,mask)))
Captive_File_file_info_set(captive_file_parent_object->corba_File_object,&file_info_corba,mask,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_truncate",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object));
- xmlNewProp(xml_action,"file_size",captive_printf_alloca("%" G_GUINT64_FORMAT,(guint64)file_size));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_truncate",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "file_size",BAD_CAST captive_printf_alloca("%" G_GUINT64_FORMAT,(guint64)file_size));
}
Captive_File_truncate(captive_file_parent_object->corba_File_object,file_size,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
captive_vfs_parent_object=CAPTIVE_VFS_PARENT_OBJECT(CAPTIVE_FILE_OBJECT(captive_file_parent_object_old)->vfs);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"file_move",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_file_parent_object_old));
- xmlNewProp(xml_action,"pathname_new",pathname_new);
- xmlNewProp(xml_action,"force_replace",captive_printf_alloca("%u",(unsigned)force_replace));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "file_move",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_file_parent_object_old));
+ xmlNewProp(xml_action,BAD_CAST "pathname_new",BAD_CAST pathname_new);
+ xmlNewProp(xml_action,BAD_CAST "force_replace",BAD_CAST captive_printf_alloca("%u",(unsigned)force_replace));
}
Captive_File_move(captive_file_parent_object_old->corba_File_object,pathname_new,force_replace,&captive_corba_ev);
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
if (captive_vfs_parent_object->corba_bug_action) {
xmlNode *xml_action;
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"vfs_new",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_vfs_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "vfs_new",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_vfs_parent_object));
}
return r;
case CAPTIVE_OPTION_MEDIA_DISK: xml_media_type="disk"; break;
default: g_assert_not_reached();
}
- xmlNewProp(xml_media,"type",xml_media_type);
+ xmlNewProp(xml_media,BAD_CAST "type",BAD_CAST xml_media_type);
xmlSetDocCompressMode(captive_vfs_parent_object->corba_bug_doc,9);
if (captive_vfs_parent_object->corba_bug_action) {
xmlNode *xml_action;
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"vfs_close",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_vfs_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "vfs_close",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_vfs_parent_object));
}
return captive_sandbox_parent_vfs_close_silent(captive_vfs_parent_object);
g_return_val_if_fail(captive_vfs_parent_object->corba_Vfs_object!=CORBA_OBJECT_NIL,GNOME_VFS_ERROR_BAD_PARAMETERS);
if (captive_vfs_parent_object->corba_bug_action) {
- xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"vfs_commit",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_vfs_parent_object));
+ xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "vfs_commit",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_vfs_parent_object));
}
r_close=captive_vfs_parent_object_disconnect(captive_vfs_parent_object);
r_new=GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE;
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"vfs_commit",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_vfs_parent_object));
- xmlNewProp(xml_action,"result_prev_close",gnome_vfs_result_to_string(r_close));
- xmlNewProp(xml_action,"result",gnome_vfs_result_to_string(r_new));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "vfs_commit",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_vfs_parent_object));
+ xmlNewProp(xml_action,BAD_CAST "result_prev_close",BAD_CAST gnome_vfs_result_to_string(r_close));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r_new));
}
return (r_new!=GNOME_VFS_OK ? r_new : r_close);
g_return_val_if_fail(volume_info_captive!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
if (captive_vfs_parent_object->corba_bug_action) {
- xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,"vfs_volume_info_get",NULL);
- xmlNewProp(xml_action,"object",captive_printf_alloca("%p",captive_vfs_parent_object));
+ xml_action=xmlNewTextChild(captive_vfs_parent_object->corba_bug_action,NULL,BAD_CAST "vfs_volume_info_get",NULL);
+ xmlNewProp(xml_action,BAD_CAST "object",BAD_CAST captive_printf_alloca("%p",captive_vfs_parent_object));
}
Captive_Vfs_volume_info_get(captive_vfs_parent_object->corba_Vfs_object,&volume_info_corba,&captive_corba_ev);
if (xml_action)
- xmlNewProp(xml_action,"result",(captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
+ xmlNewProp(xml_action,BAD_CAST "result",BAD_CAST (captive_corba_ev._major==CORBA_NO_EXCEPTION ? "1" : "0"));
r=captive_sandbox_parent_return_from_CORBA_Environment(&captive_corba_ev,captive_vfs_parent_object);
if (xml_action)
- xmlSetProp(xml_action,"result",gnome_vfs_result_to_string(r));
+ xmlSetProp(xml_action,BAD_CAST "result",BAD_CAST gnome_vfs_result_to_string(r));
if (r!=GNOME_VFS_OK)
return r;
xmlNode *xml_message=NULL;
if (servant->captive_vfs_parent_object->corba_bug_log) {
- xml_message=xmlNewTextChild(servant->captive_vfs_parent_object->corba_bug_log,NULL,"message",g_log_message->message);
- xmlNewProp(xml_message,"level",levelp->name);
+ xml_message=xmlNewTextChild(servant->captive_vfs_parent_object->corba_bug_log,NULL,BAD_CAST "message",BAD_CAST g_log_message->message);
+ xmlNewProp(xml_message,BAD_CAST "level",BAD_CAST levelp->name);
}
log_level_use&=~levelp->from;
log_level_use&=~flagp->from;
log_level_use|= flagp->to;
if (xml_message)
- xmlNewProp(xml_message,flagp->name,flagp->name);
+ xmlNewProp(xml_message,BAD_CAST flagp->name,BAD_CAST flagp->name);
}
}
g_log(G_LOG_DOMAIN,log_level_use,"sandbox: %s%s",
g_return_val_if_fail(dest_xml_parent!=NULL,NULL);
g_return_val_if_fail(src_options_module_captive!=NULL,NULL);
- { xmlNode *module=xmlNewTextChild(dest_xml_parent,NULL,"module",NULL);
+ { xmlNode *module=xmlNewTextChild(dest_xml_parent,NULL,BAD_CAST "module",NULL);
const gchar *type_string="???"; /* Prevent: ... might be used uninitialized in this function */
const gchar *basename,*cgs;
basename=src_options_module_captive->pathname_utf8;
if ((cgs=strrchr(basename,'/')))
basename=cgs+1;
- xmlNewProp(module,"basename",basename);
+ xmlNewProp(module,BAD_CAST "basename",BAD_CAST basename);
switch (src_options_module_captive->type) {
case CAPTIVE_OPTIONS_MODULE_TYPE_PE32:
type_string="PE32";
- xmlNewProp(module,"length",captive_printf_alloca("%lu",(unsigned long)src_options_module_captive->u.pe32.length));
- xmlNewProp(module,"md5" ,src_options_module_captive->u.pe32.md5);
+ xmlNewProp(module,BAD_CAST "length",BAD_CAST captive_printf_alloca("%lu",(unsigned long)src_options_module_captive->u.pe32.length));
+ xmlNewProp(module,BAD_CAST "md5" ,BAD_CAST src_options_module_captive->u.pe32.md5);
break;
case CAPTIVE_OPTIONS_MODULE_TYPE_GMODULE:
type_string="gmodule";
break;
default: g_assert_not_reached();
}
- xmlNewProp(module,"type",type_string); /* AFTER the 'switch' to set 'type_string'! */
+ xmlNewProp(module,BAD_CAST "type",BAD_CAST type_string); /* AFTER the 'switch' to set 'type_string'! */
return module;
}
}
static void sandbox_parent_bug_doc_make(CaptiveVfsParentObject *captive_vfs_parent_object)
{
- { xmlDoc *doc=xmlNewDoc("1.0");
+ { xmlDoc *doc=xmlNewDoc(BAD_CAST "1.0");
captive_vfs_parent_object->corba_bug_doc=doc;
- { xmlNode *bug=xmlNewDocNode(captive_vfs_parent_object->corba_bug_doc,NULL,"bug",NULL);
+ { xmlNode *bug=xmlNewDocNode(captive_vfs_parent_object->corba_bug_doc,NULL,BAD_CAST "bug",NULL);
xmlDocSetRootElement(captive_vfs_parent_object->corba_bug_doc,bug);
captive_vfs_parent_object->corba_bug=bug;
- { xmlNode *bug_captive=xmlNewTextChild(bug,NULL,"captive",NULL);
- xmlNewProp(bug_captive,"version",VERSION);
+ { xmlNode *bug_captive=xmlNewTextChild(bug,NULL,BAD_CAST "captive",NULL);
+ xmlNewProp(bug_captive,BAD_CAST "version",BAD_CAST VERSION);
}
- { xmlNode *bug_filesystem=xmlNewTextChild(bug,NULL,"filesystem",NULL);
+ { xmlNode *bug_filesystem=xmlNewTextChild(bug,NULL,BAD_CAST "filesystem",NULL);
options_module_captive_to_xml(bug_filesystem,&CAPTIVE_VFS_OBJECT(captive_vfs_parent_object)->options.filesystem);
}
- { xmlNode *bug_load_module=xmlNewTextChild(bug,NULL,"load_module",NULL);
+ { xmlNode *bug_load_module=xmlNewTextChild(bug,NULL,BAD_CAST "load_module",NULL);
guint load_moduleui;
struct captive_options_module *options_module;
GList *load_module_node;
options_module_captive_to_xml(bug_load_module,options_module);
}
}
- { xmlNode *bug_action=xmlNewTextChild(bug,NULL,"action",NULL);
+ { xmlNode *bug_action=xmlNewTextChild(bug,NULL,BAD_CAST "action",NULL);
captive_vfs_parent_object->corba_bug_action=bug_action;
}
- { xmlNode *bug_log=xmlNewTextChild(bug,NULL,"log",NULL);
+ { xmlNode *bug_log=xmlNewTextChild(bug,NULL,BAD_CAST "log",NULL);
captive_vfs_parent_object->corba_bug_log=bug_log;
}
}