Rewrite to account for the fact that feof() does _not_ return TRUE on
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite to account for the fact that feof() does _not_ return TRUE on errors, and thus avoid infinite loops when trying to use gdk_pixmap_create_from_xpm() on unreadable values.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
Sat Jan 22 12:40:48 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixmap.c (gdk_pixmap_seek_string): Rewrite
|
||||
to account for the fact that feof() does _not_
|
||||
return TRUE on errors, and thus avoid infinite loops
|
||||
when trying to use gdk_pixmap_create_from_xpm()
|
||||
on unreadable values.
|
||||
|
||||
Fri Jan 21 18:32:43 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaspectframe.h (struct _GtkAspectFrame): s/gint/gboolean/.
|
||||
|
||||
@@ -197,21 +197,23 @@ gdk_pixmap_seek_string (FILE *infile,
|
||||
{
|
||||
char instr[1024];
|
||||
|
||||
while (!feof (infile))
|
||||
while (1)
|
||||
{
|
||||
fscanf (infile, "%1023s", instr);
|
||||
if (fscanf (infile, "%1023s", instr) != 1)
|
||||
return FALSE;
|
||||
|
||||
if (skip_comments == TRUE && strcmp (instr, "/*") == 0)
|
||||
{
|
||||
fscanf (infile, "%1023s", instr);
|
||||
while (!feof (infile) && strcmp (instr, "*/") != 0)
|
||||
fscanf (infile, "%1023s", instr);
|
||||
fscanf(infile, "%1023s", instr);
|
||||
do
|
||||
{
|
||||
if (fscanf (infile, "%1023s", instr) != 1)
|
||||
return FALSE;
|
||||
}
|
||||
while (strcmp (instr, "*/") != 0);
|
||||
}
|
||||
if (strcmp (instr, str)==0)
|
||||
else if (strcmp (instr, str) == 0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gint
|
||||
|
||||
Reference in New Issue
Block a user