diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 10 | ||||
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | pango/pangox.c | 56 | ||||
-rw-r--r-- | pango/querymodules.c | 20 |
9 files changed, 120 insertions, 19 deletions
@@ -1,3 +1,13 @@ +Mon May 13 14:58:12 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangox.c configure.in: Add a implementation + of strtok_r (copied from glibc) for machines that don't + have it. (#79472, Jacob Berkman.) + + * pango/querymodules.c: Use printf() rather than + g_print, since we don't want encoding conversion. + (#77341) + Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add compatibility diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 41bbfa93..fc375d05 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,13 @@ +Mon May 13 14:58:12 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangox.c configure.in: Add a implementation + of strtok_r (copied from glibc) for machines that don't + have it. (#79472, Jacob Berkman.) + + * pango/querymodules.c: Use printf() rather than + g_print, since we don't want encoding conversion. + (#77341) + Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add compatibility diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 41bbfa93..fc375d05 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,13 @@ +Mon May 13 14:58:12 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangox.c configure.in: Add a implementation + of strtok_r (copied from glibc) for machines that don't + have it. (#79472, Jacob Berkman.) + + * pango/querymodules.c: Use printf() rather than + g_print, since we don't want encoding conversion. + (#77341) + Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add compatibility diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 41bbfa93..fc375d05 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,13 @@ +Mon May 13 14:58:12 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangox.c configure.in: Add a implementation + of strtok_r (copied from glibc) for machines that don't + have it. (#79472, Jacob Berkman.) + + * pango/querymodules.c: Use printf() rather than + g_print, since we don't want encoding conversion. + (#77341) + Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add compatibility diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 41bbfa93..fc375d05 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,13 @@ +Mon May 13 14:58:12 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangox.c configure.in: Add a implementation + of strtok_r (copied from glibc) for machines that don't + have it. (#79472, Jacob Berkman.) + + * pango/querymodules.c: Use printf() rather than + g_print, since we don't want encoding conversion. + (#77341) + Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add compatibility diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 41bbfa93..fc375d05 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,13 @@ +Mon May 13 14:58:12 2002 Owen Taylor <otaylor@redhat.com> + + * pango/pangox.c configure.in: Add a implementation + of strtok_r (copied from glibc) for machines that don't + have it. (#79472, Jacob Berkman.) + + * pango/querymodules.c: Use printf() rather than + g_print, since we don't want encoding conversion. + (#77341) + Tue Apr 23 16:15:07 2002 Owen Taylor <otaylor@redhat.com> * pango/opentype/fterrcompat.h: Add compatibility diff --git a/configure.in b/configure.in index 1fa4aac2..51b9fa5d 100644 --- a/configure.in +++ b/configure.in @@ -424,8 +424,9 @@ AM_CONDITIONAL(INCLUDE_THAI_X,echo $included_modules | grep '\(^\|,\)thai-x\($\| # # We use flockfile to implement pango_getline() - should be moved to GLib +# strtok_r isn't present on some systems # -AC_CHECK_FUNCS(flockfile) +AC_CHECK_FUNCS(flockfile strtok_r) # # Check for Qt - which we use for building the viewer example, if diff --git a/pango/pangox.c b/pango/pangox.c index 3715cd87..d64d13fe 100644 --- a/pango/pangox.c +++ b/pango/pangox.c @@ -49,6 +49,46 @@ typedef struct _PangoXContextInfo PangoXContextInfo; typedef struct _PangoXLigatureInfo PangoXLigatureInfo; typedef struct _PangoXLigatureSource PangoXLigatureSource; +#ifndef HAVE_STRTOK_R +/* This implementation of strtok_r comes from the GNU C library. + * Copyright (C) 1991, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. + */ +static char * +my_strtok_r (char *s, + const char *delim, + char **save_ptr) +{ + char *token; + + if (s == NULL) + s = *save_ptr; + + /* Scan leading delimiters. */ + s += strspn (s, delim); + if (*s == '\0') + { + *save_ptr = s; + return NULL; + } + + /* Find the end of the token. */ + token = s; + s = strpbrk (token, delim); + if (s == NULL) + /* This token finishes the string. */ + *save_ptr = token + strlen (token); + else + { + /* Terminate the token and make *SAVE_PTR point past it. */ + *s = '\0'; + *save_ptr = s + 1; + } + return token; +} +#else +#define my_strtok_r strtok_r +#endif /* HAVE_STRTOK_R */ + static int hex_to_integer (const char *s) { @@ -73,7 +113,7 @@ parse_gintset_spec (char *s) { char *m = NULL; PangoIntSet *set = pango_int_set_new (); - s = strtok_r (s, ",", &m); + s = my_strtok_r (s, ",", &m); while (s) { char *p = strchr (s, '-'); @@ -93,7 +133,7 @@ parse_gintset_spec (char *s) if (start != -1 && end != -1) pango_int_set_add_range (set, start, end); } - s = strtok_r (NULL, ",", &m); + s = my_strtok_r (NULL, ",", &m); } return set; } @@ -1724,7 +1764,7 @@ font_struct_get_ligatures (PangoFontMap *fontmap, { char *val = g_strdup (pango_x_fontmap_name_from_atom (fontmap, fs->properties[i].card32)); char *p; - char *a = strtok_r (val, " ", &p); + char *a = my_strtok_r (val, " ", &p); while (a) { char *r; @@ -1805,7 +1845,7 @@ font_struct_get_ligatures (PangoFontMap *fontmap, *r = 0; r++; q = a; - q = strtok_r (q, "+", &m); + q = my_strtok_r (q, "+", &m); while (q) { n_source ++; @@ -1839,10 +1879,10 @@ font_struct_get_ligatures (PangoFontMap *fontmap, source [n_source-1].is_set = 0; source [n_source-1].data.glyph = i; } - q = strtok_r (NULL, "+", &m); + q = my_strtok_r (NULL, "+", &m); } q = r; - q = strtok_r (q, "+", &m); + q = my_strtok_r (q, "+", &m); while (q) { n_dest++; @@ -1873,7 +1913,7 @@ font_struct_get_ligatures (PangoFontMap *fontmap, } } - q = strtok_r (NULL, "+", &m); + q = my_strtok_r (NULL, "+", &m); } xli = linfo + n_linfo - 1; @@ -1892,7 +1932,7 @@ font_struct_get_ligatures (PangoFontMap *fontmap, } /* end switch */ - a = strtok_r (NULL, " ", &p); + a = my_strtok_r (NULL, " ", &p); } g_free (val); } diff --git a/pango/querymodules.c b/pango/querymodules.c index 4ffd383e..5ae7789a 100644 --- a/pango/querymodules.c +++ b/pango/querymodules.c @@ -89,27 +89,27 @@ query_module (const char *dir, const char *name) quoted_path = g_strdup (path); } - g_print ("%s%s%s %s %s %s ", quote, quoted_path, quote, - engines[i].id, engines[i].engine_type, engines[i].render_type); + printf ("%s%s%s %s %s %s ", quote, quoted_path, quote, + engines[i].id, engines[i].engine_type, engines[i].render_type); g_free (quoted_path); for (j=0; j < engines[i].n_ranges; j++) { if (j != 0) - g_print (" "); - g_print ("%d-%d:%s", - engines[i].ranges[j].start, - engines[i].ranges[j].end, - engines[i].ranges[j].langs); + printf (" "); + printf ("%d-%d:%s", + engines[i].ranges[j].start, + engines[i].ranges[j].end, + engines[i].ranges[j].langs); } - g_print ("\n"); - } + printf ("\n"); + } } else { fprintf (stderr, "%s does not export Pango module API\n", path); } - + g_free (path); if (module) g_module_close (module); |