mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-25 02:41:22 +00:00
Fix xml passing to parameter warnings
This commit is contained in:
parent
52da823a3c
commit
a8925cbedb
3 changed files with 26 additions and 26 deletions
|
@ -73,8 +73,8 @@ xmlNodePtr xml_NodeForVec( vec3_t v ){
|
|||
char buf[1024];
|
||||
|
||||
sprintf( buf, "%f %f %f", v[0], v[1], v[2] );
|
||||
ret = xmlNewNode( NULL, "point" );
|
||||
xmlNodeSetContent( ret, buf );
|
||||
ret = xmlNewNode( NULL, BAD_CAST "point" );
|
||||
xmlNodeSetContent( ret, BAD_CAST buf );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -151,15 +151,15 @@ void xml_Select( char *msg, int entitynum, int brushnum, qboolean bError ){
|
|||
|
||||
// now build a proper "select" XML node
|
||||
sprintf( buf, "Entity %i, Brush %i: %s", entitynum, brushnum, msg );
|
||||
node = xmlNewNode( NULL, "select" );
|
||||
xmlNodeSetContent( node, buf );
|
||||
node = xmlNewNode( NULL, BAD_CAST "select" );
|
||||
xmlNodeSetContent( node, BAD_CAST buf );
|
||||
level[0] = (int)'0' + ( bError ? SYS_ERR : SYS_WRN ) ;
|
||||
level[1] = 0;
|
||||
xmlSetProp( node, "level", (char *)&level );
|
||||
xmlSetProp( node, BAD_CAST "level", BAD_CAST (char *)&level );
|
||||
// a 'select' information
|
||||
sprintf( buf, "%i %i", entitynum, brushnum );
|
||||
select = xmlNewNode( NULL, "brush" );
|
||||
xmlNodeSetContent( select, buf );
|
||||
select = xmlNewNode( NULL, BAD_CAST "brush" );
|
||||
xmlNodeSetContent( select, BAD_CAST buf );
|
||||
xmlAddChild( node, select );
|
||||
xml_SendNode( node );
|
||||
|
||||
|
@ -178,15 +178,15 @@ void xml_Point( char *msg, vec3_t pt ){
|
|||
char buf[1024];
|
||||
char level[2];
|
||||
|
||||
node = xmlNewNode( NULL, "pointmsg" );
|
||||
xmlNodeSetContent( node, msg );
|
||||
node = xmlNewNode( NULL, BAD_CAST "pointmsg" );
|
||||
xmlNodeSetContent( node, BAD_CAST msg );
|
||||
level[0] = (int)'0' + SYS_ERR;
|
||||
level[1] = 0;
|
||||
xmlSetProp( node, "level", (char *)&level );
|
||||
xmlSetProp( node, BAD_CAST "level", BAD_CAST (char *)&level );
|
||||
// a 'point' node
|
||||
sprintf( buf, "%g %g %g", pt[0], pt[1], pt[2] );
|
||||
point = xmlNewNode( NULL, "point" );
|
||||
xmlNodeSetContent( point, buf );
|
||||
point = xmlNewNode( NULL, BAD_CAST "point" );
|
||||
xmlNodeSetContent( point, BAD_CAST buf );
|
||||
xmlAddChild( node, point );
|
||||
xml_SendNode( node );
|
||||
|
||||
|
@ -202,11 +202,11 @@ void xml_Winding( char *msg, vec3_t p[], int numpoints, qboolean die ){
|
|||
char level[2];
|
||||
int i;
|
||||
|
||||
node = xmlNewNode( NULL, "windingmsg" );
|
||||
xmlNodeSetContent( node, msg );
|
||||
node = xmlNewNode( NULL, BAD_CAST "windingmsg" );
|
||||
xmlNodeSetContent( node, BAD_CAST msg );
|
||||
level[0] = (int)'0' + SYS_ERR;
|
||||
level[1] = 0;
|
||||
xmlSetProp( node, "level", (char *)&level );
|
||||
xmlSetProp( node, BAD_CAST "level", BAD_CAST (char *)&level );
|
||||
// a 'winding' node
|
||||
sprintf( buf, "%i ", numpoints );
|
||||
for ( i = 0; i < numpoints; i++ )
|
||||
|
@ -219,8 +219,8 @@ void xml_Winding( char *msg, vec3_t p[], int numpoints, qboolean die ){
|
|||
strcat( buf, smlbuf );
|
||||
}
|
||||
|
||||
winding = xmlNewNode( NULL, "winding" );
|
||||
xmlNodeSetContent( winding, buf );
|
||||
winding = xmlNewNode( NULL, BAD_CAST "winding" );
|
||||
xmlNodeSetContent( winding, BAD_CAST buf );
|
||||
xmlAddChild( node, winding );
|
||||
xml_SendNode( node );
|
||||
|
||||
|
@ -284,19 +284,19 @@ void FPrintf( int flag, char *buf ){
|
|||
*/
|
||||
if ( !bGotXML ) {
|
||||
// initialize
|
||||
doc = xmlNewDoc( "1.0" );
|
||||
doc->children = xmlNewDocRawNode( doc, NULL, "q3map_feedback", NULL );
|
||||
doc = xmlNewDoc( BAD_CAST "1.0" );
|
||||
doc->children = xmlNewDocRawNode( doc, NULL, BAD_CAST "q3map_feedback", NULL );
|
||||
bGotXML = qtrue;
|
||||
}
|
||||
node = xmlNewNode( NULL, "message" );
|
||||
node = xmlNewNode( NULL, BAD_CAST "message" );
|
||||
{
|
||||
gchar* utf8 = g_locale_to_utf8( buf, -1, NULL, NULL, NULL );
|
||||
xmlNodeSetContent( node, utf8 );
|
||||
xmlNodeSetContent( node, BAD_CAST utf8 );
|
||||
g_free( utf8 );
|
||||
}
|
||||
level[0] = (int)'0' + flag;
|
||||
level[1] = 0;
|
||||
xmlSetProp( node, "level", (char *)&level );
|
||||
xmlSetProp( node, BAD_CAST "level", BAD_CAST (char *)&level );
|
||||
|
||||
xml_SendNode( node );
|
||||
}
|
||||
|
|
|
@ -347,12 +347,12 @@ void ProcessWorldModel( void ){
|
|||
Sys_FPrintf( SYS_NOXML, "******* leaked *******\n" );
|
||||
Sys_FPrintf( SYS_NOXML, "**********************\n" );
|
||||
polyline = LeakFile( tree );
|
||||
leaknode = xmlNewNode( NULL, "message" );
|
||||
xmlNodeSetContent( leaknode, "MAP LEAKED\n" );
|
||||
leaknode = xmlNewNode( NULL, BAD_CAST "message" );
|
||||
xmlNodeSetContent( leaknode, BAD_CAST "MAP LEAKED\n" );
|
||||
xmlAddChild( leaknode, polyline );
|
||||
level[0] = (int) '0' + SYS_ERR;
|
||||
level[1] = 0;
|
||||
xmlSetProp( leaknode, "level", (char*) &level );
|
||||
xmlSetProp( leaknode, BAD_CAST "level", BAD_CAST (char*) &level );
|
||||
xml_SendNode( leaknode );
|
||||
if ( leaktest ) {
|
||||
Sys_Printf( "--- MAP LEAKED, ABORTING LEAKTEST ---\n" );
|
||||
|
|
|
@ -82,7 +82,7 @@ xmlNodePtr LeakFile( tree_t *tree ){
|
|||
Error( "Couldn't open %s\n", filename );
|
||||
}
|
||||
|
||||
xml_node = xmlNewNode( NULL, "polyline" );
|
||||
xml_node = xmlNewNode( NULL, BAD_CAST "polyline" );
|
||||
|
||||
count = 0;
|
||||
node = &tree->outside_node;
|
||||
|
|
Loading…
Reference in a new issue