demos/pixbuf-demo.c M_PI -> G_PI.

2001-11-26  Tor Lillqvist  <tml@iki.fi>

	* demos/pixbuf-demo.c
	* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.

	* demos/gtk-demo/main.c (read_line): No flockfile() or
	getc_unlocked() on Win32.

2001-11-25  Tor Lillqvist  <tml@iki.fi>

	* configure.in
	* acconfig.h: As we now use GDir, no need to check for dirent.h.
This commit is contained in:
Tor Lillqvist 2001-11-25 23:36:29 +00:00 committed by Tor Lillqvist
parent 7a181cf52b
commit 9a60bfac0c
12 changed files with 113 additions and 13 deletions

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -1,3 +1,16 @@
2001-11-26 Tor Lillqvist <tml@iki.fi>
* demos/pixbuf-demo.c
* demos/gtk-demo/pixbufs.c: M_PI -> G_PI.
* demos/gtk-demo/main.c (read_line): No flockfile() or
getc_unlocked() on Win32.
2001-11-25 Tor Lillqvist <tml@iki.fi>
* configure.in
* acconfig.h: As we now use GDir, no need to check for dirent.h.
Sun Nov 25 23:18:39 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc

View File

@ -20,7 +20,6 @@
#undef HAVE_CATGETS
#undef HAVE_DIMM_H
#undef HAVE_DIRENT_H
#undef HAVE_GETTEXT
#undef HAVE_IPC_H
#undef HAVE_LC_MESSAGES

View File

@ -390,7 +390,6 @@ AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
*** GLIB is always available from ftp://ftp.gtk.org/.]),
gobject gmodule gthread)
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
@ -712,7 +711,6 @@ IFS="$gtk_save_ifs"
AC_SUBST(INCLUDED_LOADER_OBJ)
AC_SUBST(INCLUDED_LOADER_DEFINE)
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
AC_TYPE_SIGNAL

View File

@ -87,7 +87,9 @@ read_line (FILE *stream, GString *str)
{
int n_read = 0;
#ifndef G_OS_WIN32
flockfile (stream);
#endif
g_string_truncate (str, 0);
@ -95,7 +97,11 @@ read_line (FILE *stream, GString *str)
{
int c;
#ifndef G_OS_WIN32
c = getc_unlocked (stream);
#else
c = getc (stream);
#endif
if (c == EOF)
goto done;
@ -107,7 +113,11 @@ read_line (FILE *stream, GString *str)
case '\r':
case '\n':
{
#ifndef G_OS_WIN32
int next_c = getc_unlocked (stream);
#else
int next_c = getc (stream);
#endif
if (!(next_c == EOF ||
(c == '\r' && next_c == '\n') ||
@ -123,7 +133,9 @@ read_line (FILE *stream, GString *str)
done:
#ifndef G_OS_WIN32
funlockfile (stream);
#endif
return n_read > 0;
}

View File

@ -151,17 +151,17 @@ timeout (gpointer data)
GdkRectangle r1, r2, dest;
double k;
ang = 2.0 * M_PI * (double) i / N_IMAGES - f * 2.0 * M_PI;
ang = 2.0 * G_PI * (double) i / N_IMAGES - f * 2.0 * G_PI;
iw = gdk_pixbuf_get_width (images[i]);
ih = gdk_pixbuf_get_height (images[i]);
r = radius + (radius / 3.0) * sin (f * 2.0 * M_PI);
r = radius + (radius / 3.0) * sin (f * 2.0 * G_PI);
xpos = floor (xmid + r * cos (ang) - iw / 2.0 + 0.5);
ypos = floor (ymid + r * sin (ang) - ih / 2.0 + 0.5);
k = (i & 1) ? sin (f * 2.0 * M_PI) : cos (f * 2.0 * M_PI);
k = (i & 1) ? sin (f * 2.0 * G_PI) : cos (f * 2.0 * G_PI);
k = 2.0 * k * k;
k = MAX (0.25, k);
@ -184,8 +184,8 @@ timeout (gpointer data)
k, k,
GDK_INTERP_NEAREST,
((i & 1)
? MAX (127, fabs (255 * sin (f * 2.0 * M_PI)))
: MAX (127, fabs (255 * cos (f * 2.0 * M_PI)))));
? MAX (127, fabs (255 * sin (f * 2.0 * G_PI)))
: MAX (127, fabs (255 * cos (f * 2.0 * G_PI)))));
}
gtk_widget_queue_draw (da);

View File

@ -138,17 +138,17 @@ timeout (gpointer data)
GdkRectangle r1, r2, dest;
double k;
ang = 2.0 * M_PI * (double) i / N_IMAGES - f * 2.0 * M_PI;
ang = 2.0 * G_PI * (double) i / N_IMAGES - f * 2.0 * G_PI;
iw = gdk_pixbuf_get_width (images[i]);
ih = gdk_pixbuf_get_height (images[i]);
r = radius + (radius / 3.0) * sin (f * 2.0 * M_PI);
r = radius + (radius / 3.0) * sin (f * 2.0 * G_PI);
xpos = floor (xmid + r * cos (ang) - iw / 2.0 + 0.5);
ypos = floor (ymid + r * sin (ang) - ih / 2.0 + 0.5);
k = (i & 1) ? sin (f * 2.0 * M_PI) : cos (f * 2.0 * M_PI);
k = (i & 1) ? sin (f * 2.0 * G_PI) : cos (f * 2.0 * G_PI);
k = 2.0 * k * k;
k = MAX (0.25, k);
@ -171,8 +171,8 @@ timeout (gpointer data)
k, k,
GDK_INTERP_NEAREST,
((i & 1)
? MAX (127, fabs (255 * sin (f * 2.0 * M_PI)))
: MAX (127, fabs (255 * cos (f * 2.0 * M_PI)))));
? MAX (127, fabs (255 * sin (f * 2.0 * G_PI)))
: MAX (127, fabs (255 * cos (f * 2.0 * G_PI)))));
}
gtk_widget_queue_draw (da);