comparison src/objects-x.c @ 3433:1e217fa4ad7d

[xemacs-hg @ 2006-05-30 06:21:31 by stephent] Preferred fix for dangling declaration. <8764jo59cu.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Tue, 30 May 2006 06:21:31 +0000
parents ac11131c6de9
children f986ebd9c080
comparison
equal deleted inserted replaced
3432:19303e5282eb 3433:1e217fa4ad7d
1213 to LISP and decide when to reinitialize 1213 to LISP and decide when to reinitialize
1214 intelligently. */ 1214 intelligently. */
1215 stderr_out ("Failed fontconfig initialization\n"); 1215 stderr_out ("Failed fontconfig initialization\n");
1216 else 1216 else
1217 { 1217 {
1218 struct charset_reporter *cr;
1219 FcPattern *fontxft; /* long-lived, freed at end of this block */ 1218 FcPattern *fontxft; /* long-lived, freed at end of this block */
1220 FcResult fcresult; 1219 FcResult fcresult;
1221 FcConfig *fcc; 1220 FcConfig *fcc;
1222 FcChar8 *lang = "en"; /* #### fix this bogus hack! */ 1221 FcChar8 *lang = "en"; /* #### fix this bogus hack! */
1223 FcCharSet *fccs = NULL; 1222 FcCharSet *fccs = NULL;
1301 text module. 1300 text module.
1302 1301
1303 Optimization: cache the generated FcCharSet in the Mule charset. 1302 Optimization: cache the generated FcCharSet in the Mule charset.
1304 Don't forget to destroy it if the Mule charset gets deallocated. */ 1303 Don't forget to destroy it if the Mule charset gets deallocated. */
1305 1304
1306 for (cr = charset_table; 1305 {
1307 cr->charset && !EQ (*(cr->charset), charset); 1306 /* This block possibly should be a function, but it generates
1308 cr++) 1307 multiple values. I find the "pass an address to return the
1309 ; 1308 value in" idiom opaque, so prefer a block. */
1310 1309 struct charset_reporter *cr;
1311 if (cr->rfc3066) 1310 for (cr = charset_table;
1312 { 1311 cr->charset && !EQ (*(cr->charset), charset);
1313 DECLARE_DEBUG_FONTNAME (name); 1312 cr++)
1314 CHECKING_LANG (0, eidata(name), cr->language); 1313 ;
1315 lang = cr->rfc3066; 1314
1316 } 1315 if (cr->rfc3066)
1317 else if (cr->charset) 1316 {
1318 { 1317 DECLARE_DEBUG_FONTNAME (name);
1319 /* what the hey, build 'em on the fly */ 1318 CHECKING_LANG (0, eidata(name), cr->language);
1320 /* #### in the case of error this could return NULL! */ 1319 lang = cr->rfc3066;
1321 fccs = mule_to_fc_charset (charset); 1320 }
1322 lang = XSTRING_DATA (XSYMBOL (XCHARSET_NAME (charset))-> name); 1321 else if (cr->charset)
1323 } 1322 {
1324 else 1323 /* what the hey, build 'em on the fly */
1325 { 1324 /* #### in the case of error this could return NULL! */
1326 /* OK, we fell off the end of the table */ 1325 fccs = mule_to_fc_charset (charset);
1327 warn_when_safe_lispobj (intern ("xft"), intern ("alert"), 1326 lang = XSTRING_DATA (XSYMBOL (XCHARSET_NAME (charset))-> name);
1328 list2 (build_string ("unchecked charset"), 1327 }
1329 charset)); 1328 else
1329 {
1330 /* OK, we fell off the end of the table */
1331 warn_when_safe_lispobj (intern ("xft"), intern ("alert"),
1332 list2 (build_string ("unchecked charset"),
1333 charset));
1334 }
1330 /* default to "en" 1335 /* default to "en"
1331 #### THIS IS WRONG, WRONG, WRONG!! 1336 #### THIS IS WRONG, WRONG, WRONG!!
1332 It is why we never fall through to XLFD-checking. */ 1337 It is why we never fall through to XLFD-checking. */
1333 } 1338 }
1334 1339
1335 ASSERT_ASCTEXT_ASCII(lang); 1340 ASSERT_ASCTEXT_ASCII(lang);
1336 1341
1337 if (fccs) 1342 if (fccs)
1338 { 1343 {