ports/x11/afterstep/patches/patch-src_ASDocGen_xmlproc_c

27 lines
1.3 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

xmlproc.c:182:19: warning: multi-character character constant
Fix build on sparc64.
--- src/ASDocGen/xmlproc.c.orig Wed May 1 15:34:11 2013
+++ src/ASDocGen/xmlproc.c Mon Jun 29 15:49:03 2015
@@ -179,7 +179,7 @@ write_doc_cdata( const char *cdata, int len, ASXMLInte
fputs( "\\&", state->dest_fp );
else if ( c == '\\' && state->doc_type == DocType_NROFF )
fputc( '\\', state->dest_fp );
- else if ( c == '˜' && state->doc_type == DocType_NROFF )
+ else if ( c == 152 /*'˜'*/ && state->doc_type == DocType_NROFF )
c = '~';
fputc( c, state->dest_fp );
}
@@ -514,9 +514,10 @@ add_glossary_item( xml_elem_t* doc, ASXMLInterpreterSt
char *target = NULL, *target2 ;
char *term = NULL, *term2 ;
char *ptr = &(state->dest_file[strlen(state->dest_file)-4]);
+ size_t curr_url_anchor_len = state->curr_url_anchor ? strlen(state->curr_url_anchor) : 0;
if( state->doc_type == DocType_PHP && *ptr == '.')
*ptr = '\0' ;
- target = safemalloc( strlen( state->dest_file)+5+1+strlen(state->curr_url_anchor)+1);
+ target = safemalloc( strlen( state->dest_file)+5+1+curr_url_anchor_len+1);
sprintf( target, "%s#%s", state->dest_file, state->curr_url_anchor );
if( state->doc_type == DocType_PHP && *ptr == '\0' )
*ptr = '.' ;