[monkey-bubble: 95/753] Use strtok_r instead of strtok. Likewise. (_XmHTMLLoadFontWithFace):



commit 8833df588d03c7fe13836bab480aa9cf1b8e33c5
Author: Ulrich Drepper <drepper cygnus com>
Date:   Wed Feb 17 06:38:33 1999 +0000

    Use strtok_r instead of strtok. Likewise. (_XmHTMLLoadFontWithFace):
    
    
    1999-02-16  Ulrich Drepper  <drepper cygnus com>
    
            * gtk-xmhtml/debug.c (__rsd_selectDebugLevels): Use strtok_r instead
            of strtok.
            * gtk-xmhtml/fonts.c (initializeFontSizeLists): Likewise.
            (_XmHTMLLoadFontWithFace): Likewise.
            * gtk-xmhtml/map.c (getCoordinates): Likewise.
            * libgnome/gnome-mime.c (add_to_key): Likewise.
            * libgnome/gnome-config.c (check_path): Likewise.
            * libgnome/gnome-score.c (gnome_score_get_notable): Likewise.
            * libgnomeui/gnome-about.c (gnome_about_display_comments): Likewise.
            * libgnomeui/gnome-dateedit.c (gnome_date_edit_get_date): Likewise.
            * libgnomeui/gnome-spell.c (gnome_spell_fill_info): Likewise.
            * libgnorba/goad.c (get_cmd): Likewise.

 libgnome/gnome-score.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libgnome/gnome-score.c b/libgnome/gnome-score.c
index 8ddae87..3380d9e 100644
--- a/libgnome/gnome-score.c
+++ b/libgnome/gnome-score.c
@@ -393,12 +393,14 @@ gnome_score_get_notable (gchar * gamename,
 	     fgets (buf, sizeof (buf), infile) && retval < NSCORES;
 	     retval++)
 	  {
+	     char *tokp;
+
 	     buf[strlen (buf) - 1] = 0;
-	     buf2 = strtok (buf, " ");
+	     buf2 = strtok_r (buf, " ", &tokp);
 	     (*scores)[retval] = atof (buf2);
-	     buf2 = strtok (NULL, " ");
+	     buf2 = strtok_r (NULL, " ", &tokp);
 	     (*scoretimes)[retval] = atoi (buf2);
-	     buf2 = strtok (NULL, "\n");
+	     buf2 = strtok_r (NULL, "\n", &tokp);
 	     (*names)[retval] = g_strdup (buf2);
 	  }
 	(*names)[retval] = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]