summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-debug.c
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-05-06 04:39:44 +0000
committerDarin Adler <darin@src.gnome.org>2000-05-06 04:39:44 +0000
commitda87340b5494686fb229218df6145cde6b473575 (patch)
tree561bcf86abe8fb425290d4639ae1a7171fb23492 /libnautilus-private/nautilus-debug.c
parent3324b79c1bc6a9b2b70a700f06f3d3f959067d1b (diff)
downloadnautilus-da87340b5494686fb229218df6145cde6b473575.tar.gz
Ignore the new files that are generated by Gene's new .idl.
* libnautilus-extensions/.cvsignore: Ignore the new files that are generated by Gene's new .idl. * libnautilus-extensions/nautilus-debug.h: * libnautilus-extensions/nautilus-debug.c: (nautilus_get_available_file_descriptor_count): Changed the interface on Pavel's excellent new debugging function. * libnautilus-extensions/nautilus-directory.c: (file_open_callback), (file_close_callback), (open_and_close_one), (nautilus_self_check_directory): Added some checks for GNOME VFS in here. This is a bad place for them but it's better than not having them at all. * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_self_check_icon_factory): Updated self checks so they work again. John didn't notice that he needed to fix these when he added the 20-pixel size icon to the standard sizees.
Diffstat (limited to 'libnautilus-private/nautilus-debug.c')
-rw-r--r--libnautilus-private/nautilus-debug.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libnautilus-private/nautilus-debug.c b/libnautilus-private/nautilus-debug.c
index 438fc2d6a..4a67c211d 100644
--- a/libnautilus-private/nautilus-debug.c
+++ b/libnautilus-private/nautilus-debug.c
@@ -85,20 +85,20 @@ nautilus_make_warnings_and_criticals_stop_in_debugger (const char *first_domain,
va_end (domains);
}
-void
-nautilus_print_available_file_descriptor_count (const char *message)
+int
+nautilus_get_available_file_descriptor_count (void)
{
- int result;
+ int count;
GList *list;
GList *p;
FILE *file;
list = NULL;
-
- for (result = 0; ; result++) {
+ for (count = 0; ; count++) {
file = fopen("/dev/null", "r");
- if (file == NULL)
+ if (file == NULL) {
break;
+ }
list = g_list_prepend (list, file);
}
@@ -107,6 +107,5 @@ nautilus_print_available_file_descriptor_count (const char *message)
}
g_list_free (list);
- printf("%s %d file descriptors available\n",
- message == NULL ? "" : message, result);
+ return count;
}