diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-04-07 23:59:25 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-04-07 23:59:25 +0000 |
commit | 1c77b5f9269a9841b100664dae61a95e1810da38 (patch) | |
tree | 5661b1bee144dd558dc1681d34e0a20a13a38ae9 /gtk/gtkfilesel.c | |
parent | 13de9dc34f6340cfb33632e717728919d5cec96f (diff) | |
download | gtk+-1c77b5f9269a9841b100664dae61a95e1810da38.tar.gz |
Removed, because that's what a NULL comparison function means. And it
Tue Apr 7 19:36:48 1998 Owen Taylor <owt1@cornell.edu>
* gutils.c (g_direct_compare): Removed, because that's what
a NULL comparison function means. And it wasn't 64 bit safe.
Tue Apr 7 19:14:03 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Added maximum field widths to prevent
possible '%s' scanf overflows. Replaced scanf("%c")
with getc(), Don't interpret /*/ as a full comment. Use
g_realloc/g_new.
* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
instead of (GTK_WIDGET_FLAGS(widget) & FLAG)
* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
SunOS, because getcwd() hangs up in a wait4().
(Found by David Monniaux <monniaux@clipper.ens.fr>)
- Check device/inode/mtime not just inode/mtime, when
caching scanned directories.
(From: scottk@ig.utexas.edu (Scott Kempf))
* gdk/gdkpixmap.c: Check for 0 width/height when
creating pixmaps.
* gtk/*.c: Global substitution of recently introduced
"MAX (0," for allocations to "MAX (1,", since
creating a backing pixmap with a zero width or height
fails.
* gdk/gdkwindow.c (gdk_window_new): Don't set all the
WM properties for child windows. Don't set the base
size, since the value we set will be taken as a minimum
size.
Diffstat (limited to 'gtk/gtkfilesel.c')
-rw-r--r-- | gtk/gtkfilesel.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index a334c73f8c..f0e50a20ea 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -93,6 +93,7 @@ struct _CompletionDirSent { ino_t inode; time_t mtime; + dev_t device; gint entry_count; gchar *name_buffer; /* memory segment containing names of all entries */ @@ -1504,7 +1505,14 @@ cmpl_init_state (void) new_state = g_new (CompletionState, 1); + /* We don't use getcwd() on SUNOS, because, it does a popen("pwd") + * and, if that wasn't bad enough, hangs in doing so. + */ +#if defined(sun) && !defined(__SVR4) + if (!getwd (getcwd_buf)) +#else if (!getcwd (getcwd_buf, MAXPATHLEN)) +#endif { cmpl_errno = errno; return NULL; @@ -1856,6 +1864,7 @@ open_new_dir(gchar* dir_name, struct stat* sbuf) sent = g_new(CompletionDirSent, 1); sent->mtime = sbuf->st_mtime; sent->inode = sbuf->st_ino; + sent->device = sbuf->st_dev; path_buf_len = strlen(dir_name); @@ -1953,7 +1962,8 @@ open_dir(gchar* dir_name, CompletionState* cmpl_state) sent = cdsl->data; if(sent->inode == sbuf.st_ino && - sent->mtime == sbuf.st_mtime) + sent->mtime == sbuf.st_mtime && + sent->device == sbuf.st_dev) return attach_dir(sent, dir_name, cmpl_state); cdsl = cdsl->next; @@ -2108,7 +2118,11 @@ find_parent_dir_fullname(gchar* dirname) gchar buffer[MAXPATHLEN]; gchar buffer2[MAXPATHLEN]; +#if defined(sun) && !defined(__SVR4) + if(!getwd(buffer)) +#else if(!getcwd(buffer, MAXPATHLEN)) +#endif { cmpl_errno = errno; return NULL; @@ -2120,7 +2134,11 @@ find_parent_dir_fullname(gchar* dirname) return NULL; } +#if defined(sun) && !defined(__SVR4) + if(!getwd(buffer2)) +#else if(!getcwd(buffer2, MAXPATHLEN)) +#endif { chdir(buffer); cmpl_errno = errno; |