Index: pangox.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pangox.c,v
retrieving revision 1.72
diff -u -r1.72 pangox.c
--- pangox.c	25 Mar 2002 20:22:52 -0000	1.72
+++ pangox.c	22 Apr 2002 08:13:36 -0000
@@ -71,12 +71,19 @@
 static PangoIntSet *
 parse_gintset_spec (char *s) 
 {
-  char *m = NULL;
+  char *cur, *p;
   PangoIntSet *set = pango_int_set_new ();
-  s = strtok_r (s, ",", &m);
-  while (s)
+
+  while ((cur = s))
     {
-      char *p = strchr (s, '-');
+      s = strchr (cur, ',');
+      if (s)
+	{
+	  *s = '\0';
+	  s++;
+	}
+      
+      p = strchr (cur, '-');
       if (!p) 
 	{
 	  int i = hex_to_integer (s);
@@ -93,7 +100,6 @@
 	  if (start != -1 && end != -1)
 	    pango_int_set_add_range (set, start, end);
 	}
-      s = strtok_r (NULL, ",", &m);
     }
   return set;
 }
@@ -1722,14 +1728,15 @@
         {
           if (fs->properties[i].name == this_atom) 
             {
-              char *val = g_strdup (pango_x_fontmap_name_from_atom (fontmap, fs->properties[i].card32));
-              char *p;
-              char *a = strtok_r (val, " ", &p);
-              while (a)
-                {
+              char **val = g_strsplit (pango_x_fontmap_name_from_atom (fontmap, fs->properties[i].card32), " ", -1);
+	      int j;
+	      char *a;
+
+	      for (j = 0; (a = val[j]); j++)
+		{
                   char *r;
-                  char *m;
                   char *q;
+		  char *q_next;
                   PangoXLigatureSource *source = NULL;
                   gunichar *dest = NULL;
                   int n_source = 0;
@@ -1804,10 +1811,16 @@
                           }
                         *r = 0;
                         r++;
-                        q = a;
-                        q = strtok_r (q, "+", &m);
-                        while (q) 
+                        q_next = a;
+                        while ((q = q_next))
                           {
+			    q_next = strchr (q, '+');
+			    if (q_next)
+			      {
+				*q_next = '\0';
+				q_next++;
+			      }
+
                             n_source ++;
                             source = g_realloc (source, n_source * 
                                                 sizeof (PangoXLigatureSource));
@@ -1839,12 +1852,17 @@
                                 source [n_source-1].is_set = 0;
                                 source [n_source-1].data.glyph = i;
                               }
-                            q = strtok_r (NULL, "+", &m);
                           }
-                        q = r;
-                        q = strtok_r (q, "+", &m);
-                        while (q) 
+                        q_next = r;
+                        while ((q = q_next)) 
                           {
+			    q_next = strchr (q, '+');
+			    if (q_next)
+			      {
+				*q_next = '\0';
+				q_next++;
+			      }
+
                             n_dest++;
                             dest = g_realloc (dest, n_dest * sizeof (gunichar));
                             
@@ -1873,7 +1891,6 @@
 				  }
 			      }
                             
-                            q = strtok_r (NULL, "+", &m);
                           }
                         
                         xli = linfo + n_linfo - 1;
@@ -1892,9 +1909,8 @@
                     }
                   
                   /* end switch */
-                  a = strtok_r (NULL, " ", &p);
                 }
-              g_free (val);
+              g_strfreev (val);
             }
         }
       list = g_list_next (list);
