Mercurial > hg > xemacs-beta
diff src/font-mgr.c @ 5189:b65692aa90d8
Cosmetic XFT-code fixes, some variable renamings
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-04-04 Ben Wing <ben@xemacs.org>
* font-mgr.c:
* font-mgr.c (fc_standard_properties):
* font-mgr.c (Ffc_pattern_p):
* font-mgr.c (Ffc_pattern_create):
* font-mgr.c (Ffc_name_parse):
* font-mgr.c (Ffc_name_unparse):
* font-mgr.c (Ffc_pattern_duplicate):
* font-mgr.c (Ffc_pattern_add):
* font-mgr.c (Ffc_pattern_del):
* font-mgr.c (Ffc_pattern_get):
* font-mgr.c (fc_config_create_using):
* font-mgr.c (fc_strlist_to_lisp_using):
* font-mgr.c (fontset_to_list):
* font-mgr.c (Ffc_config_p):
* font-mgr.c (Ffc_config_create):
* font-mgr.c (Ffc_config_destroy):
* font-mgr.c (Ffc_config_up_to_date):
* font-mgr.c (Ffc_config_build_fonts):
* font-mgr.c (Ffc_config_get_config_dirs):
* font-mgr.c (Ffc_config_get_font_dirs):
* font-mgr.c (Ffc_config_get_config_files):
* font-mgr.c (Ffc_config_get_cache):
* font-mgr.c (Ffc_config_get_fonts):
* font-mgr.c (Ffc_config_set_current):
* font-mgr.c (Ffc_config_get_blanks):
* font-mgr.c (Ffc_config_get_rescan_interval):
* font-mgr.c (Ffc_config_set_rescan_interval):
* font-mgr.c (Ffc_config_app_font_add_file):
* font-mgr.c (Ffc_config_app_font_add_dir):
* font-mgr.c (Ffc_config_app_font_clear):
* font-mgr.c (Ffc_init_load_config):
* font-mgr.c (Ffc_init_load_config_and_fonts):
* font-mgr.c (Ffc_config_get_current):
* font-mgr.c (size):
* font-mgr.c (Ffc_font_render_prepare):
* font-mgr.c (Ffc_font_match):
* font-mgr.c (Ffc_font_sort):
* font-mgr.c (Ffc_init):
* font-mgr.c (Ffc_get_version):
* font-mgr.c (Ffc_init_reinitialize):
* font-mgr.c (Ffc_init_bring_up_to_date):
* font-mgr.c (Fxlfd_font_name_p):
* font-mgr.c (make_xlfd_font_regexp):
* font-mgr.c (syms_of_font_mgr):
* font-mgr.c (vars_of_font_mgr):
* font-mgr.c (complex_vars_of_font_mgr):
Fix the code to conform to GNU style standards.
Rename xft-debug-level to debug-xft.
* fontcolor-x.c:
* fontcolor-x.c (vars_of_fontcolor_x):
Rename debug-x-objects to debug-x-fonts.
* fontcolor-xlike-inc.c:
* fontcolor-xlike-inc.c (DEBUG_FONTS1):
* fontcolor-xlike-inc.c (DEBUG_FONTS2):
* fontcolor-xlike-inc.c (DEBUG_FONTS3):
* fontcolor-xlike-inc.c (DEBUG_FONTS4):
* fontcolor-xlike-inc.c (DEBUG_FONTS_LISP1):
* fontcolor-xlike-inc.c (count_hyphens):
* fontcolor-xlike-inc.c (XFUN):
* fontcolor-xlike-inc.c (xlistfonts_checking_charset):
* fontcolor-xlike-inc.c (xft_find_charset_font):
Misc. code fixes, mostly cosmetic. Get rid of some warnings.
Fix the code to conform to GNU style standards.
* lisp.h:
* print.c:
* print.c (debug_out_lisp):
New function for doing printf-like formatting involving Lisp objects
and outputting to the debug output.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 04 Apr 2010 23:46:50 -0500 |
parents | 97eb4942aec8 |
children | c096d8051f89 308d34e9f07d |
line wrap: on
line diff
--- a/src/font-mgr.c Mon Mar 29 23:23:33 2010 -0500 +++ b/src/font-mgr.c Sun Apr 04 23:46:50 2010 -0500 @@ -173,7 +173,8 @@ ourselves; hash.c hashtables do not interpret the value pointers. This array should be FcChar8**, but GCC 4.x bitches about signedness. */ -static const Extbyte *fc_standard_properties[] = { +static const Extbyte *fc_standard_properties[] = +{ /* treated specially, ordered first */ "family", "size", /* remaining are alphabetized by group */ @@ -212,15 +213,15 @@ return prop; } -DEFUN("fc-pattern-p", Ffc_pattern_p, 1, 1, 0, /* +DEFUN ("fc-pattern-p", Ffc_pattern_p, 1, 1, 0, /* Returns t if OBJECT is of type fc-pattern, nil otherwise. */ (object)) { - return FC_PATTERNP(object) ? Qt : Qnil; + return FC_PATTERNP (object) ? Qt : Qnil; } -DEFUN("fc-pattern-create", Ffc_pattern_create, 0, 0, 0, /* +DEFUN ("fc-pattern-create", Ffc_pattern_create, 0, 0, 0, /* Return a new, empty fc-pattern object. */ ()) @@ -231,7 +232,7 @@ return wrap_fc_pattern (fcpat); } -DEFUN("fc-name-parse", Ffc_name_parse, 1, 1, 0, /* +DEFUN ("fc-name-parse", Ffc_name_parse, 1, 1, 0, /* Parse an Fc font name and return its representation as a fc pattern object. */ (name)) @@ -246,21 +247,21 @@ /* #### Ga-a-ack! Xft's similar function is actually a different API. We provide both. */ -DEFUN("fc-name-unparse", Ffc_name_unparse, 1, 1, 0, /* +DEFUN ("fc-name-unparse", Ffc_name_unparse, 1, 1, 0, /* Unparse an fc pattern object to a string. */ (pattern)) { FcChar8 *name; Lisp_Object result; - CHECK_FC_PATTERN(pattern); + CHECK_FC_PATTERN (pattern); name = FcNameUnparse (XFC_PATTERN_PTR (pattern)); result = build_fcapi_string (name); xfree (name); return result; } -DEFUN("fc-pattern-duplicate", Ffc_pattern_duplicate, 1, 1, 0, /* +DEFUN ("fc-pattern-duplicate", Ffc_pattern_duplicate, 1, 1, 0, /* Make a copy of the fc pattern object PATTERN and return it. */ (pattern)) @@ -273,7 +274,7 @@ return wrap_fc_pattern (copy); } -DEFUN("fc-pattern-add", Ffc_pattern_add, 3, 3, 0, /* +DEFUN ("fc-pattern-add", Ffc_pattern_add, 3, 3, 0, /* Add attributes to the pattern object PATTERN. PROPERTY is a string naming the attribute to add, VALUE the value for this attribute. @@ -292,46 +293,46 @@ obj = fc_intern (property); fcpat = XFC_PATTERN_PTR (pattern); - if (STRINGP(value)) + if (STRINGP (value)) { FcChar8 *str = (FcChar8 *) extract_fcapi_string (value); res = FcPatternAddString (fcpat, obj, str); } - else if (INTP(value)) + else if (INTP (value)) { - res = FcPatternAddInteger (fcpat, obj, XINT(value)); + res = FcPatternAddInteger (fcpat, obj, XINT (value)); } - else if (FLOATP(value)) + else if (FLOATP (value)) { - res = FcPatternAddDouble (fcpat, obj, (double) XFLOAT_DATA(value)); + res = FcPatternAddDouble (fcpat, obj, (double) XFLOAT_DATA (value)); } - else if (SYMBOLP(value)) + else if (SYMBOLP (value)) { - res = FcPatternAddBool (fcpat, obj, !NILP(value)); + res = FcPatternAddBool (fcpat, obj, !NILP (value)); } /* else ... maybe we should wta here? */ return res ? Qt : Qnil; } -DEFUN("fc-pattern-del", Ffc_pattern_del, 2, 2, 0, /* +DEFUN ("fc-pattern-del", Ffc_pattern_del, 2, 2, 0, /* Remove attribute PROPERTY from fc pattern object OBJECT. */ (pattern, property)) { Bool res; - CHECK_FC_PATTERN(pattern); - CHECK_STRING(property); + CHECK_FC_PATTERN (pattern); + CHECK_STRING (property); - res = FcPatternDel(XFC_PATTERN_PTR(pattern), extract_fcapi_string (property)); + res = FcPatternDel (XFC_PATTERN_PTR (pattern), extract_fcapi_string (property)); return res ? Qt : Qnil; } /* Generic interface to FcPatternGet() * Don't support the losing symbol-for-property interface. */ -DEFUN("fc-pattern-get", Ffc_pattern_get, 2, 4, 0, /* +DEFUN ("fc-pattern-get", Ffc_pattern_get, 2, 4, 0, /* From PATTERN, extract PROPERTY for the ID'th member, of type TYPE. PATTERN is an Xft (fontconfig) pattern object. @@ -440,7 +441,7 @@ /* get property */ fc_result = FcPatternGet (XFC_PATTERN_PTR (pattern), fc_property, - NILP (id) ? 0 : XINT(id), + NILP (id) ? 0 : XINT (id), &fc_value); switch (fc_result) @@ -498,7 +499,7 @@ enum DestroyFontsetP { DestroyNo = 0, DestroyYes = 1 }; static Lisp_Object -fc_config_create_using (FcConfig * (*create_function) ()) +fc_config_create_using (FcConfig * (*create_function) (void)) { FcConfig *fc = (*create_function) (); Lisp_Object configs = XWEAK_LIST_LIST (Vfc_config_weak_list); @@ -528,7 +529,7 @@ FcStrList *thing_list; CHECK_FC_CONFIG (config); - thing_list = (*getter) (XFC_CONFIG_PTR(config)); + thing_list = (*getter) (XFC_CONFIG_PTR (config)); /* Yes, we need to do this check -- sheesh, Keith! */ if (!thing_list) return Qnil; @@ -552,14 +553,14 @@ { fcpat = XFC_PATTERN (ALLOC_NORMAL_LISP_OBJECT (fc_pattern)); fcpat->fcpatPtr = FcPatternDuplicate (fontset->fonts[idx]); - fontlist = Fcons (wrap_fc_pattern(fcpat), fontlist); + fontlist = Fcons (wrap_fc_pattern (fcpat), fontlist); } if (destroyp) FcFontSetDestroy (fontset); return fontlist; } -DEFUN("fc-config-p", Ffc_config_p, 1, 1, 0, /* +DEFUN ("fc-config-p", Ffc_config_p, 1, 1, 0, /* Returns t if OBJECT is of type fc-config, nil otherwise. */ (object)) @@ -567,7 +568,7 @@ return FC_CONFIGP (object) ? Qt : Qnil; } -DEFUN("fc-config-create", Ffc_config_create, 0, 0, 0, /* +DEFUN ("fc-config-create", Ffc_config_create, 0, 0, 0, /* -- Function: FcConfig *FcConfigCreate (void) Creates an empty configuration. */ ()) @@ -578,7 +579,7 @@ #if 0 /* I'm sorry, but we just don't do this in Lisp, OK? Don't even think about implementing this. */ -DEFUN("fc-config-destroy", Ffc_config_destroy, 1, 1, 0, /* +DEFUN ("fc-config-destroy", Ffc_config_destroy, 1, 1, 0, /* -- Function: void FcConfigDestroy (FcConfig *config) Destroys a configuration and any data associated with it. Note that calling this function with the return value from @@ -591,7 +592,7 @@ } #endif -DEFUN("fc-config-up-to-date", Ffc_config_up_to_date, 1, 1, 0, /* +DEFUN ("fc-config-up-to-date", Ffc_config_up_to_date, 1, 1, 0, /* -- Function: FcBool FcConfigUptoDate (FcConfig *config) Checks all of the files related to 'config' and returns whether the in-memory version is in sync with the disk version. */ @@ -601,7 +602,7 @@ return FcConfigUptoDate (XFC_CONFIG_PTR (config)) == FcFalse ? Qnil : Qt; } -DEFUN("fc-config-build-fonts", Ffc_config_build_fonts, 1, 1, 0, /* +DEFUN ("fc-config-build-fonts", Ffc_config_build_fonts, 1, 1, 0, /* -- Function: FcBool FcConfigBuildFonts (FcConfig *config) Builds the set of available fonts for the given configuration. Note that any changes to the configuration after this call have @@ -616,7 +617,7 @@ return Qnil; } -DEFUN("fc-config-get-config-dirs", Ffc_config_get_config_dirs, 1, 1, 0, /* +DEFUN ("fc-config-get-config-dirs", Ffc_config_get_config_dirs, 1, 1, 0, /* -- Function: FcStrList *FcConfigGetConfigDirs (FcConfig *config) Returns the list of font directories specified in the configuration files for 'config'. Does not include any @@ -626,7 +627,7 @@ return fc_strlist_to_lisp_using (&FcConfigGetConfigDirs, config); } -DEFUN("fc-config-get-font-dirs", Ffc_config_get_font_dirs, 1, 1, 0, /* +DEFUN ("fc-config-get-font-dirs", Ffc_config_get_font_dirs, 1, 1, 0, /* -- Function: FcStrList *FcConfigGetFontDirs (FcConfig *config) Returns the list of font directories in 'config'. This includes the configured font directories along with any directories below those @@ -636,7 +637,7 @@ return fc_strlist_to_lisp_using (&FcConfigGetFontDirs, config); } -DEFUN("fc-config-get-config-files", Ffc_config_get_config_files, 1, 1, 0, /* +DEFUN ("fc-config-get-config-files", Ffc_config_get_config_files, 1, 1, 0, /* -- Function: FcStrList *FcConfigGetConfigFiles (FcConfig *config) Returns the list of known configuration files used to generate 'config'. Note that this will not include any configuration done @@ -646,7 +647,7 @@ return fc_strlist_to_lisp_using (&FcConfigGetConfigFiles, config); } -DEFUN("fc-config-get-cache", Ffc_config_get_cache, 1, 1, 0, /* +DEFUN ("fc-config-get-cache", Ffc_config_get_cache, 1, 1, 0, /* -- Function: char *FcConfigGetCache (FcConfig *config) Returns the name of the file used to store per-user font information. */ @@ -657,7 +658,7 @@ return build_fcapi_string ((FcChar8 *) FcConfigGetCache (XFC_CONFIG_PTR (config))); } -DEFUN("fc-config-get-fonts", Ffc_config_get_fonts, 2, 2, 0, /* +DEFUN ("fc-config-get-fonts", Ffc_config_get_fonts, 2, 2, 0, /* -- Function: FcFontSet *FcConfigGetFonts (FcConfig *config, FcSetName set) Returns one of the two sets of fonts from the configuration as specified by 'set'. @@ -685,7 +686,7 @@ return fs ? fontset_to_list (fs, DestroyNo) : Qnil; } -DEFUN("fc-config-set-current", Ffc_config_set_current, 1, 1, 0, /* +DEFUN ("fc-config-set-current", Ffc_config_set_current, 1, 1, 0, /* -- Function: FcBool FcConfigSetCurrent (FcConfig *config) Sets the current default configuration to 'config'. Implicitly calls FcConfigBuildFonts if necessary, returning FcFalse if that @@ -717,7 +718,7 @@ return Qnil; } -DEFUN("fc-config-get-blanks", Ffc_config_get_blanks, 1, 1, 0, /* +DEFUN ("fc-config-get-blanks", Ffc_config_get_blanks, 1, 1, 0, /* -- Function: FcBlanks *FcConfigGetBlanks (FcConfig *config) Returns the FcBlanks object associated with the given configuration, if no blanks were present in the configuration, @@ -731,7 +732,7 @@ intern ("fc-config-get-blanks")); } -DEFUN("fc-config-get-rescan-interval", Ffc_config_get_rescan_interval, 1, 1, 0, /* +DEFUN ("fc-config-get-rescan-interval", Ffc_config_get_rescan_interval, 1, 1, 0, /* -- Function: int FcConfigGetRescanInterval (FcConfig *config) Returns the interval between automatic checks of the configuration (in seconds) specified in 'config'. The configuration is checked @@ -743,7 +744,7 @@ return make_int (FcConfigGetRescanInterval (XFC_CONFIG_PTR (config))); } -DEFUN("fc-config-set-rescan-interval", Ffc_config_set_rescan_interval, 2, 2, 0, /* +DEFUN ("fc-config-set-rescan-interval", Ffc_config_set_rescan_interval, 2, 2, 0, /* -- Function: FcBool FcConfigSetRescanInterval (FcConfig *config, int rescanInterval) Sets the rescan interval; returns FcFalse if an error occurred. @@ -760,7 +761,7 @@ } /* #### This might usefully be made interactive. */ -DEFUN("fc-config-app-font-add-file", Ffc_config_app_font_add_file, 2, 2, 0, /* +DEFUN ("fc-config-app-font-add-file", Ffc_config_app_font_add_file, 2, 2, 0, /* -- Function: FcBool FcConfigAppFontAddFile (FcConfig *config, const char *file) Adds an application-specific font to the configuration. */ @@ -778,7 +779,7 @@ } /* #### This might usefully be made interactive. */ -DEFUN("fc-config-app-font-add-dir", Ffc_config_app_font_add_dir, 2, 2, 0, /* +DEFUN ("fc-config-app-font-add-dir", Ffc_config_app_font_add_dir, 2, 2, 0, /* -- Function: FcBool FcConfigAppFontAddDir (FcConfig *config, const char *dir) Scans the specified directory for fonts, adding each one found to @@ -797,7 +798,7 @@ } /* #### This might usefully be made interactive. */ -DEFUN("fc-config-app-font-clear", Ffc_config_app_font_clear, 1, 1, 0, /* +DEFUN ("fc-config-app-font-clear", Ffc_config_app_font_clear, 1, 1, 0, /* -- Function: void FcConfigAppFontClear (FcConfig *config) Clears the set of application-specific fonts. */ (config)) @@ -811,7 +812,7 @@ configuration of the library is initialized. (This configuration is normally implicitly initialized.) */ -DEFUN("fc-config-filename", Ffc_config_filename, 1, 1, 0, /* +DEFUN ("fc-config-filename", Ffc_config_filename, 1, 1, 0, /* -- Function: char *FcConfigFilename (const char *name) Given the specified external entity name, return the associated filename. This provides applications a way to convert various @@ -838,7 +839,7 @@ return (build_fcapi_string (FcConfigFilename ((FcChar8 *) fcname))); } -DEFUN("fc-init-load-config", Ffc_init_load_config, 0, 0, 0, /* +DEFUN ("fc-init-load-config", Ffc_init_load_config, 0, 0, 0, /* -- Function: FcConfig *FcInitLoadConfig (void) Loads the default configuration file and returns the resulting configuration. Does not load any font information. */ @@ -847,7 +848,7 @@ return fc_config_create_using (&FcInitLoadConfig); } -DEFUN("fc-init-load-config-and-fonts", Ffc_init_load_config_and_fonts, 0, 0, 0, /* +DEFUN ("fc-init-load-config-and-fonts", Ffc_init_load_config_and_fonts, 0, 0, 0, /* -- Function: FcConfig *FcInitLoadConfigAndFonts (void) Loads the default configuration file and builds information about the available fonts. Returns the resulting configuration. */ @@ -856,7 +857,7 @@ return fc_config_create_using (&FcInitLoadConfigAndFonts); } -DEFUN("fc-config-get-current", Ffc_config_get_current, 0, 0, 0, /* +DEFUN ("fc-config-get-current", Ffc_config_get_current, 0, 0, 0, /* -- Function: FcConfig *FcConfigGetCurrent (void) Returns the current default configuration. */ ()) @@ -866,7 +867,7 @@ /* Pattern manipulation functions. */ -DEFUN("fc-default-substitute", Ffc_default_substitute, 1, 1, 0, /* +DEFUN ("fc-default-substitute", Ffc_default_substitute, 1, 1, 0, /* Adds defaults for certain attributes if not specified in PATTERN. FcPattern PATTERN is modified in-place, and nil is returned. * Patterns without a specified style or weight are set to Medium @@ -884,7 +885,7 @@ FcPattern *p, FcPattern *p_pat FcMatchKind kind) OMITTED: use optional arguments in `fc-config-substitute'. */ -DEFUN("fc-config-substitute", Ffc_config_substitute, 1, 4, 0, /* +DEFUN ("fc-config-substitute", Ffc_config_substitute, 1, 4, 0, /* Modifies PATTERN according to KIND and TESTPAT using operations from CONFIG. PATTERN is modified in-place. Returns an undocumented Boolean value. If optional KIND is `fc-match-pattern', then those tagged as pattern operations @@ -932,7 +933,7 @@ filtering out fonts that do not provide additional characters beyond those provided by preferred fonts. */ -DEFUN("fc-font-render-prepare", Ffc_font_render_prepare, 2, 3, 0, /* +DEFUN ("fc-font-render-prepare", Ffc_font_render_prepare, 2, 3, 0, /* Return a new pattern blending PATTERN and FONT. Optional CONFIG is an FcConfig, defaulting to the current one. The returned pattern consists of elements of FONT not appearing in PATTERN, @@ -949,12 +950,12 @@ CHECK_FC_CONFIG (config); /* I don't think this can fail? */ - return wrap_fc_pattern (FcFontRenderPrepare (XFC_CONFIG_PTR(config), - XFC_PATTERN_PTR(font), - XFC_PATTERN_PTR(pattern))); + return wrap_fc_pattern (FcFontRenderPrepare (XFC_CONFIG_PTR (config), + XFC_PATTERN_PTR (font), + XFC_PATTERN_PTR (pattern))); } -DEFUN("fc-font-match", Ffc_font_match, 2, 3, 0, /* +DEFUN ("fc-font-match", Ffc_font_match, 2, 3, 0, /* Return the font on DEVICE that most closely matches PATTERN. DEVICE is an X11 device. @@ -972,17 +973,17 @@ FcPattern *p; FcConfig *fcc; - CHECK_FC_PATTERN(pattern); - if (NILP(device)) + CHECK_FC_PATTERN (pattern); + if (NILP (device)) return Qnil; - CHECK_X_DEVICE(device); - if (!DEVICE_LIVE_P(XDEVICE(device))) + CHECK_X_DEVICE (device); + if (!DEVICE_LIVE_P (XDEVICE (device))) return Qnil; if (!NILP (config)) CHECK_FC_CONFIG (config); res_fcpat = XFC_PATTERN (ALLOC_NORMAL_LISP_OBJECT (fc_pattern)); - p = XFC_PATTERN_PTR(pattern); + p = XFC_PATTERN_PTR (pattern); fcc = NILP (config) ? FcConfigGetCurrent () : XFC_CONFIG_PTR (config); FcConfigSubstitute (fcc, p, FcMatchPattern); @@ -991,20 +992,21 @@ res_fcpat->fcpatPtr = FcFontMatch (fcc, p, &res); if (res_fcpat->fcpatPtr == NULL) - switch (res) { - case FcResultNoMatch: - return Qfc_result_no_match; - case FcResultNoId: - return Qfc_result_no_id; - default: - return Qfc_internal_error; - } + switch (res) + { + case FcResultNoMatch: + return Qfc_result_no_match; + case FcResultNoId: + return Qfc_result_no_id; + default: + return Qfc_internal_error; + } else - return wrap_fc_pattern(res_fcpat); + return wrap_fc_pattern (res_fcpat); } /* #### fix this name to correspond to Ben's new nomenclature */ -DEFUN("fc-list-fonts-pattern-objects", Ffc_list_fonts_pattern_objects, +DEFUN ("fc-list-fonts-pattern-objects", Ffc_list_fonts_pattern_objects, 3, 3, 0, /* Return a list of fonts on DEVICE that match PATTERN for PROPERTIES. Each font is represented by a fontconfig pattern object. @@ -1034,7 +1036,7 @@ } /* #### maybe this can/should be folded into fc-list-fonts-pattern-objects? */ -DEFUN("fc-font-sort", Ffc_font_sort, 2, 4, 0, /* +DEFUN ("fc-font-sort", Ffc_font_sort, 2, 4, 0, /* Return a list of all fonts sorted by proximity to PATTERN. Each font is represented by a fontconfig pattern object. @@ -1060,10 +1062,10 @@ FcPattern *p = XFC_PATTERN_PTR (pattern); FcResult fcresult; - if (NILP(nosub)) /* #### temporary debug hack */ + if (NILP (nosub)) /* #### temporary debug hack */ FcDefaultSubstitute (p); FcConfigSubstitute (fcc, p, FcMatchPattern); - fontset = FcFontSort (fcc, p, !NILP(trim), NULL, &fcresult); + fontset = FcFontSort (fcc, p, !NILP (trim), NULL, &fcresult); return fontset_to_list (fontset, DestroyYes); } @@ -1106,7 +1108,7 @@ 0, 0, fcconfig_description, struct fc_config); -DEFUN("fc-init", Ffc_init, 0, 0, 0, /* +DEFUN ("fc-init", Ffc_init, 0, 0, 0, /* -- Function: FcBool FcInit (void) Loads the default configuration file and the fonts referenced therein and sets the default configuration to that result. @@ -1118,7 +1120,7 @@ return (FcInit () == FcTrue) ? Qt : Qnil; } -DEFUN("fc-get-version", Ffc_get_version, 0, 0, 0, /* +DEFUN ("fc-get-version", Ffc_get_version, 0, 0, 0, /* -- Function: int FcGetVersion (void) Returns the version number of the library. XEmacs: No, this should NOT return a pretty string. @@ -1132,7 +1134,7 @@ return make_int (FcGetVersion ()); } -DEFUN("fc-init-reinitialize", Ffc_init_reinitialize, 0, 0, 0, /* +DEFUN ("fc-init-reinitialize", Ffc_init_reinitialize, 0, 0, 0, /* -- Function: FcBool FcInitReinitialize (void) Forces the default configuration file to be reloaded and resets the default configuration. */ @@ -1141,7 +1143,7 @@ return (FcInitReinitialize () == FcTrue) ? Qt : Qnil; } -DEFUN("fc-init-bring-up-to-date", Ffc_init_bring_up_to_date, 0, 0, 0, /* +DEFUN ("fc-init-bring-up-to-date", Ffc_init_bring_up_to_date, 0, 0, 0, /* -- Function: FcBool FcInitBringUptoDate (void) Checks the rescan interval in the default configuration, checking the configuration if the interval has passed and reloading the @@ -1153,13 +1155,13 @@ #endif /* FONTCONFIG_EXPOSE_CONFIG */ -DEFUN("xlfd-font-name-p", Fxlfd_font_name_p, 1, 1, 0, /* +DEFUN ("xlfd-font-name-p", Fxlfd_font_name_p, 1, 1, 0, /* Check whether the string FONTNAME is a XLFD font name. */ (fontname)) { - CHECK_STRING(fontname); + CHECK_STRING (fontname); /* #### should bind `case-fold-search' here? */ - return Fstring_match(Vxlfd_font_name_regexp, fontname, Qnil, Qnil); + return Fstring_match (Vxlfd_font_name_regexp, fontname, Qnil, Qnil); } /* FcPatternPrint: there is no point in having wrappers fc-pattern-print, @@ -1240,10 +1242,10 @@ }; GCPRO1 (reg); - for (i = 0; i < sizeof(re)/sizeof(Extbyte *); i++) + for (i = 0; i < sizeof (re)/sizeof (Extbyte *); i++) { /* #### Currently this is Host Portable Coding, not ISO 8859-1. */ - reg = concat2(reg, build_extstring (re[i], Qx_font_name_encoding)); + reg = concat2 (reg, build_extstring (re[i], Qx_font_name_encoding)); } RETURN_UNGCPRO (reg); @@ -1275,67 +1277,68 @@ } void -syms_of_font_mgr (void) { - INIT_LISP_OBJECT(fc_pattern); +syms_of_font_mgr (void) +{ + INIT_LISP_OBJECT (fc_pattern); - DEFSYMBOL_MULTIWORD_PREDICATE(Qfc_patternp); + DEFSYMBOL_MULTIWORD_PREDICATE (Qfc_patternp); - DEFSYMBOL(Qfc_result_type_mismatch); - DEFSYMBOL(Qfc_result_no_match); - DEFSYMBOL(Qfc_result_no_id); - DEFSYMBOL(Qfc_internal_error); - DEFSYMBOL(Qfc_match_pattern); - DEFSYMBOL(Qfc_match_font); - DEFSYMBOL(Qfont_mgr); + DEFSYMBOL (Qfc_result_type_mismatch); + DEFSYMBOL (Qfc_result_no_match); + DEFSYMBOL (Qfc_result_no_id); + DEFSYMBOL (Qfc_internal_error); + DEFSYMBOL (Qfc_match_pattern); + DEFSYMBOL (Qfc_match_font); + DEFSYMBOL (Qfont_mgr); - DEFSUBR(Ffc_pattern_p); - DEFSUBR(Ffc_pattern_create); - DEFSUBR(Ffc_name_parse); - DEFSUBR(Ffc_name_unparse); - DEFSUBR(Ffc_pattern_duplicate); - DEFSUBR(Ffc_pattern_add); - DEFSUBR(Ffc_pattern_del); - DEFSUBR(Ffc_pattern_get); - DEFSUBR(Ffc_list_fonts_pattern_objects); - DEFSUBR(Ffc_font_sort); - DEFSUBR(Ffc_font_match); - DEFSUBR(Ffc_default_substitute); - DEFSUBR(Ffc_config_substitute); - DEFSUBR(Ffc_font_render_prepare); - DEFSUBR(Fxlfd_font_name_p); + DEFSUBR (Ffc_pattern_p); + DEFSUBR (Ffc_pattern_create); + DEFSUBR (Ffc_name_parse); + DEFSUBR (Ffc_name_unparse); + DEFSUBR (Ffc_pattern_duplicate); + DEFSUBR (Ffc_pattern_add); + DEFSUBR (Ffc_pattern_del); + DEFSUBR (Ffc_pattern_get); + DEFSUBR (Ffc_list_fonts_pattern_objects); + DEFSUBR (Ffc_font_sort); + DEFSUBR (Ffc_font_match); + DEFSUBR (Ffc_default_substitute); + DEFSUBR (Ffc_config_substitute); + DEFSUBR (Ffc_font_render_prepare); + DEFSUBR (Fxlfd_font_name_p); #ifdef FONTCONFIG_EXPOSE_CONFIG - INIT_LISP_OBJECT(fc_config); + INIT_LISP_OBJECT (fc_config); - DEFSYMBOL_MULTIWORD_PREDICATE(Qfc_configp); + DEFSYMBOL_MULTIWORD_PREDICATE (Qfc_configp); - DEFSUBR(Ffc_config_p); - DEFSUBR(Ffc_config_create); + DEFSUBR (Ffc_config_p); + DEFSUBR (Ffc_config_create); #if 0 - DEFSUBR(Ffc_config_destroy); + DEFSUBR (Ffc_config_destroy); #endif - DEFSUBR(Ffc_config_set_current); - DEFSUBR(Ffc_config_get_current); - DEFSUBR(Ffc_config_up_to_date); - DEFSUBR(Ffc_config_build_fonts); - DEFSUBR(Ffc_config_get_config_dirs); - DEFSUBR(Ffc_config_get_font_dirs); - DEFSUBR(Ffc_config_get_config_files); - DEFSUBR(Ffc_config_get_cache); - DEFSUBR(Ffc_config_get_fonts); - DEFSUBR(Ffc_config_get_blanks); - DEFSUBR(Ffc_config_get_rescan_interval); - DEFSUBR(Ffc_config_set_rescan_interval); - DEFSUBR(Ffc_config_app_font_add_file); - DEFSUBR(Ffc_config_app_font_add_dir); - DEFSUBR(Ffc_config_app_font_clear); - DEFSUBR(Ffc_config_filename); - DEFSUBR(Ffc_init_load_config); - DEFSUBR(Ffc_init_load_config_and_fonts); - DEFSUBR(Ffc_init); - DEFSUBR(Ffc_get_version); - DEFSUBR(Ffc_init_reinitialize); - DEFSUBR(Ffc_init_bring_up_to_date); + DEFSUBR (Ffc_config_set_current); + DEFSUBR (Ffc_config_get_current); + DEFSUBR (Ffc_config_up_to_date); + DEFSUBR (Ffc_config_build_fonts); + DEFSUBR (Ffc_config_get_config_dirs); + DEFSUBR (Ffc_config_get_font_dirs); + DEFSUBR (Ffc_config_get_config_files); + DEFSUBR (Ffc_config_get_cache); + DEFSUBR (Ffc_config_get_fonts); + DEFSUBR (Ffc_config_get_blanks); + DEFSUBR (Ffc_config_get_rescan_interval); + DEFSUBR (Ffc_config_set_rescan_interval); + DEFSUBR (Ffc_config_app_font_add_file); + DEFSUBR (Ffc_config_app_font_add_dir); + DEFSUBR (Ffc_config_app_font_clear); + DEFSUBR (Ffc_config_filename); + DEFSUBR (Ffc_init_load_config); + DEFSUBR (Ffc_init_load_config_and_fonts); + DEFSUBR (Ffc_init); + DEFSUBR (Ffc_get_version); + DEFSUBR (Ffc_init_reinitialize); + DEFSUBR (Ffc_init_bring_up_to_date); #endif /* FONTCONFIG_EXPOSE_CONFIG */ } @@ -1345,7 +1348,7 @@ /* #### The next two DEFVARs belong somewhere else. */ /* #### I know, but the right fix is use the generic debug facility. */ - DEFVAR_INT ("xft-debug-level", &debug_xft /* + DEFVAR_INT ("debug-xft", &debug_xft /* Level of debugging messages to issue to stderr for Xft. A nonnegative integer. Set to 0 to suppress all warnings. Default is 1 to ensure a minimum of debugging output at initialization. @@ -1353,12 +1356,12 @@ */ ); debug_xft = 0; - DEFVAR_CONST_INT("xft-version", &xft_version /* + DEFVAR_CONST_INT ("xft-version", &xft_version /* The major version number of the Xft library being used. */ ); xft_version = XFT_VERSION; - DEFVAR_CONST_INT("fc-version", &fc_version /* + DEFVAR_CONST_INT ("fc-version", &fc_version /* The version number of fontconfig.h. It can be checked against `(fc-get-version)', which is the version of the .so. It's probably not a disaster if `(> (fc-get-version) fc-version)'. @@ -1376,7 +1379,7 @@ staticpro (&Vfc_config_weak_list); #endif - DEFVAR_LISP("xft-xlfd-font-regexp", &Vxlfd_font_name_regexp /* + DEFVAR_LISP ("xft-xlfd-font-regexp", &Vxlfd_font_name_regexp /* The regular expression used to match XLFD font names. */ ); Vxlfd_font_name_regexp = make_xlfd_font_regexp();