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