diff options
author | Peter J. R. Moulder <pjmoulder@src.gnome.org> | 2008-03-30 05:43:43 +0000 |
---|---|---|
committer | Peter J. R. Moulder <pjmoulder@src.gnome.org> | 2008-03-30 05:43:43 +0000 |
commit | 8b60be7f9ac274c014294c51f88da884a3b0c99f (patch) | |
tree | 654b4d6a08a93e2bc0e957a010f87e8e597b5841 /src/cr-fonts.c | |
parent | 71b9dffeed9300e3c1c6168a6023a6ee9a086889 (diff) | |
download | libcroco-8b60be7f9ac274c014294c51f88da884a3b0c99f.tar.gz |
Add ‘const’ to various function prototypes, as discussed at http://www.mail-archive.com/libcroco-list@gnome.org/msg00049.html . This change is a noop in the sense that it has no effect on libcroco's object files, but does affect source-level compatibility, both forwards and backwards — though in practice I'd guess that no existing code will break from this.
svn path=/trunk/; revision=315
Diffstat (limited to 'src/cr-fonts.c')
-rw-r--r-- | src/cr-fonts.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/cr-fonts.c b/src/cr-fonts.c index 94c4f2c..6ef347e 100644 --- a/src/cr-fonts.c +++ b/src/cr-fonts.c @@ -27,10 +27,10 @@ #include <string.h> static enum CRStatus -cr_font_family_to_string_real (CRFontFamily * a_this, +cr_font_family_to_string_real (CRFontFamily const * a_this, gboolean a_walk_list, GString ** a_string) { - guchar *name = NULL; + guchar const *name = NULL; enum CRStatus result = CR_OK; if (!*a_string) { @@ -46,31 +46,31 @@ cr_font_family_to_string_real (CRFontFamily * a_this, switch (a_this->type) { case FONT_FAMILY_SANS_SERIF: - name = (guchar *) "sans-serif"; + name = (guchar const *) "sans-serif"; break; case FONT_FAMILY_SERIF: - name = (guchar *) "sans-serif"; + name = (guchar const *) "sans-serif"; break; case FONT_FAMILY_CURSIVE: - name = (guchar *) "cursive"; + name = (guchar const *) "cursive"; break; case FONT_FAMILY_FANTASY: - name = (guchar *) "fantasy"; + name = (guchar const *) "fantasy"; break; case FONT_FAMILY_MONOSPACE: - name = (guchar *) "monospace"; + name = (guchar const *) "monospace"; break; case FONT_FAMILY_NON_GENERIC: - name = (guchar *) a_this->name; + name = (guchar const *) a_this->name; break; default: - name = (guchar *) NULL; + name = NULL; break; } @@ -92,32 +92,32 @@ static const gchar * cr_predefined_absolute_font_size_to_string (enum CRPredefinedAbsoluteFontSize a_code) { - gchar *str = NULL; + gchar const *str = NULL; switch (a_code) { case FONT_SIZE_XX_SMALL: - str = (gchar *) "xx-small"; + str = "xx-small"; break; case FONT_SIZE_X_SMALL: - str = (gchar *) "x-small"; + str = "x-small"; break; case FONT_SIZE_SMALL: - str = (gchar *) "small"; + str = "small"; break; case FONT_SIZE_MEDIUM: - str = (gchar *) "medium"; + str = "medium"; break; case FONT_SIZE_LARGE: - str = (gchar *) "large"; + str = "large"; break; case FONT_SIZE_X_LARGE: - str = (gchar *) "x-large"; + str = "x-large"; break; case FONT_SIZE_XX_LARGE: - str = (gchar *) "xx-large"; + str = "xx-large"; break; default: - str = (gchar *) "unknown absolute font size value"; + str = "unknown absolute font size value"; } return str; } @@ -125,17 +125,17 @@ cr_predefined_absolute_font_size_to_string (enum CRPredefinedAbsoluteFontSize static const gchar * cr_relative_font_size_to_string (enum CRRelativeFontSize a_code) { - gchar *str = NULL; + gchar const *str = NULL; switch (a_code) { case FONT_SIZE_LARGER: - str = (gchar *) "larger"; + str = "larger"; break; case FONT_SIZE_SMALLER: - str = (gchar *) "smaller"; + str = "smaller"; break; default: - str = (gchar *) "unknown relative font size value"; + str = "unknown relative font size value"; break; } return str; @@ -179,7 +179,7 @@ cr_font_family_new (enum CRFontFamilyType a_type, guchar * a_name) * g_free(). */ guchar * -cr_font_family_to_string (CRFontFamily * a_this, +cr_font_family_to_string (CRFontFamily const * a_this, gboolean a_walk_font_family_list) { enum CRStatus status = CR_OK; @@ -383,7 +383,7 @@ cr_font_size_clear (CRFontSize * a_this) * Returns CR_OK upon successful completion, an error code otherwise. */ enum CRStatus -cr_font_size_copy (CRFontSize * a_dst, CRFontSize * a_src) +cr_font_size_copy (CRFontSize * a_dst, CRFontSize const * a_src) { g_return_val_if_fail (a_dst && a_src, CR_BAD_PARAM_ERROR); @@ -499,7 +499,7 @@ cr_font_size_set_to_inherit (CRFontSize *a_this) * Returns TRUE if the current instance is set to 'inherit'. */ gboolean -cr_font_size_is_set_to_inherit (CRFontSize *a_this) +cr_font_size_is_set_to_inherit (CRFontSize const *a_this) { g_return_val_if_fail (a_this, FALSE) ; @@ -514,7 +514,7 @@ cr_font_size_is_set_to_inherit (CRFontSize *a_this) * has to bee freed using g_free(). */ gchar * -cr_font_size_to_string (CRFontSize * a_this) +cr_font_size_to_string (CRFontSize const * a_this) { gchar *str = NULL; @@ -673,7 +673,7 @@ cr_font_size_is_predefined_absolute_font_size * Returns the serialized form of #CRFontSizeAdjust */ gchar * -cr_font_size_adjust_to_string (CRFontSizeAdjust * a_this) +cr_font_size_adjust_to_string (CRFontSizeAdjust const * a_this) { gchar *str = NULL; |