mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 02:36:07 +00:00
s/g_str_freev/g_strfreev/ as that's the correct glib name
Sun Jun 18 02:50:47 2000 George Lebl <jirka@5z.com> * components/help/help-method.c (file_in_info_path): s/g_str_freev/g_strfreev/ as that's the correct glib name * components/help/hyperbola-main.c, components/help/hyperbola-nav-index.c, components/help/hyperbola-nav-search.c components/help/hyperbola-nav-tree.c, components/help/hyperbola-nav.h: Use hyperbola-nav.h as a header to put the prototypes from the hyperbola-nav-*.c files. And include this file in hyperbola-main.c and hyperbola-nav-*.c * libnautilus-extensions/nautilus-global-preferences.c (global_preferences_register_boolean_with_defaults) (global_preferences_register_enum_with_defaults), libnautilus-extensions/nautilus-preferences.c (preferences_hash_node_check_changes_func) (user_level_changed_callback): use GU?INT_TO_POINTER and GPOINTER_TO_U?INT macros to get and pass ints and uints as pointers. * librsvg/rsvg-bpath-util.c, test/nautilus-leak-checker.c: include <string.h> * test/nautilus-leak-checker.c (nautilus_leak_record_malloc) (nautilus_leak_record_realloc) (nautilus_leak_record_free) (print_one_leak): Store pointers in gulongs not guints and when printing size_t, cast to long and use %ld. * test/nautilus-leak-symbol-lookup.c (nautilus_leak_symbol_map_get_offsets): When reading in gint64, check if long is actually 64bit, in which case use %lx otherwise use %Lx for sscanf.
This commit is contained in:
parent
3db19cf0ab
commit
30675e99d6
35
ChangeLog
35
ChangeLog
|
@ -1,3 +1,38 @@
|
|||
Sun Jun 18 02:50:47 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* components/help/help-method.c (file_in_info_path):
|
||||
s/g_str_freev/g_strfreev/ as that's the correct glib name
|
||||
|
||||
* components/help/hyperbola-main.c,
|
||||
components/help/hyperbola-nav-index.c,
|
||||
components/help/hyperbola-nav-search.c
|
||||
components/help/hyperbola-nav-tree.c,
|
||||
components/help/hyperbola-nav.h: Use hyperbola-nav.h as a header
|
||||
to put the prototypes from the hyperbola-nav-*.c files. And
|
||||
include this file in hyperbola-main.c and hyperbola-nav-*.c
|
||||
|
||||
* libnautilus-extensions/nautilus-global-preferences.c
|
||||
(global_preferences_register_boolean_with_defaults)
|
||||
(global_preferences_register_enum_with_defaults),
|
||||
libnautilus-extensions/nautilus-preferences.c
|
||||
(preferences_hash_node_check_changes_func)
|
||||
(user_level_changed_callback):
|
||||
use GU?INT_TO_POINTER and GPOINTER_TO_U?INT macros to get and pass
|
||||
ints and uints as pointers.
|
||||
|
||||
* librsvg/rsvg-bpath-util.c, test/nautilus-leak-checker.c:
|
||||
include <string.h>
|
||||
|
||||
* test/nautilus-leak-checker.c (nautilus_leak_record_malloc)
|
||||
(nautilus_leak_record_realloc) (nautilus_leak_record_free)
|
||||
(print_one_leak): Store pointers in gulongs not guints and
|
||||
when printing size_t, cast to long and use %ld.
|
||||
|
||||
* test/nautilus-leak-symbol-lookup.c
|
||||
(nautilus_leak_symbol_map_get_offsets): When reading in gint64,
|
||||
check if long is actually 64bit, in which case use %lx otherwise
|
||||
use %Lx for sscanf.
|
||||
|
||||
2000-06-18 J Shane Culpepper <pepper@eazel.com>
|
||||
|
||||
* components/services/login/.cvsignore:
|
||||
|
|
|
@ -328,12 +328,12 @@ file_in_info_path (const char *file)
|
|||
|
||||
for (i = 0; info_path_strv [i] != NULL; i++) {
|
||||
if (strncmp (file, info_path_strv[i], strlen (info_path_strv[i])) == 0) {
|
||||
g_str_freev (info_path_strv);
|
||||
g_strfreev (info_path_strv);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_str_freev (info_path_strv);
|
||||
g_strfreev (info_path_strv);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
#include <gnome.h>
|
||||
#include <liboaf/liboaf.h>
|
||||
|
||||
/* In hyperbola-nav-tree.c */
|
||||
extern BonoboObject *hyperbola_navigation_tree_new(void);
|
||||
/* in hyperbola-nav-index.c */
|
||||
extern BonoboObject *hyperbola_navigation_index_new(void);
|
||||
/* in hyperbola-nav-search.c */
|
||||
extern BonoboObject *hyperbola_navigation_search_new(void);
|
||||
#include "hyperbola-nav.h"
|
||||
|
||||
static int object_count = 0;
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <dirent.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "hyperbola-nav.h"
|
||||
|
||||
typedef struct {
|
||||
NautilusView*view_frame;
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <dirent.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "hyperbola-nav.h"
|
||||
|
||||
typedef struct {
|
||||
NautilusView *nautilus_view;
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include "hyperbola-filefmt.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "hyperbola-nav.h"
|
||||
|
||||
typedef struct {
|
||||
NautilusView *view_frame;
|
||||
|
||||
|
@ -12,8 +14,6 @@ typedef struct {
|
|||
gint notify_count;
|
||||
} HyperbolaNavigationTree;
|
||||
|
||||
BonoboObject *hyperbola_navigation_tree_new(void);
|
||||
|
||||
static void hyperbola_navigation_tree_select_row(GtkCTree *ctree,
|
||||
GtkCTreeNode *node,
|
||||
gint column,
|
||||
|
|
11
components/help/hyperbola-nav.h
Normal file
11
components/help/hyperbola-nav.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef HYPERBOLA_NAV_H
|
||||
#define HYPERBOLA_NAV_H 1
|
||||
|
||||
/* In hyperbola-nav-tree.c */
|
||||
BonoboObject *hyperbola_navigation_tree_new(void);
|
||||
/* in hyperbola-nav-index.c */
|
||||
BonoboObject *hyperbola_navigation_index_new(void);
|
||||
/* in hyperbola-nav-search.c */
|
||||
BonoboObject *hyperbola_navigation_search_new(void);
|
||||
|
||||
#endif
|
|
@ -446,9 +446,9 @@ global_preferences_register_boolean_with_defaults (const char *name,
|
|||
global_preferences_register_with_defaults (name,
|
||||
description,
|
||||
NAUTILUS_PREFERENCE_BOOLEAN,
|
||||
(gconstpointer) novice_default,
|
||||
(gconstpointer) intermediate_default,
|
||||
(gconstpointer) hacker_default);
|
||||
(gconstpointer) GINT_TO_POINTER (novice_default),
|
||||
(gconstpointer) GINT_TO_POINTER (intermediate_default),
|
||||
(gconstpointer) GINT_TO_POINTER (hacker_default));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -476,9 +476,9 @@ global_preferences_register_enum_with_defaults (const char *name,
|
|||
global_preferences_register_with_defaults (name,
|
||||
description,
|
||||
NAUTILUS_PREFERENCE_ENUM,
|
||||
(gconstpointer) novice_default,
|
||||
(gconstpointer) intermediate_default,
|
||||
(gconstpointer) hacker_default);
|
||||
(gconstpointer) GINT_TO_POINTER (novice_default),
|
||||
(gconstpointer) GINT_TO_POINTER (intermediate_default),
|
||||
(gconstpointer) GINT_TO_POINTER (hacker_default));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -333,7 +333,7 @@ preferences_hash_node_check_changes_func (gpointer key,
|
|||
g_assert (value != NULL);
|
||||
|
||||
node = (PreferencesHashNode *) value;
|
||||
old_user_level = (guint) user_data;
|
||||
old_user_level = GPOINTER_TO_UINT (user_data);
|
||||
new_user_level = nautilus_user_level_manager_get_user_level ();
|
||||
|
||||
/* FIXME bugzilla.eazel.com 1273:
|
||||
|
@ -579,7 +579,7 @@ user_level_changed_callback (GtkObject *user_level_manager,
|
|||
|
||||
g_hash_table_foreach (GLOBAL.preference_table,
|
||||
preferences_hash_node_check_changes_func,
|
||||
(gpointer) GLOBAL.old_user_level);
|
||||
GUINT_TO_POINTER (GLOBAL.old_user_level));
|
||||
|
||||
GLOBAL.old_user_level = new_user_level;
|
||||
}
|
||||
|
|
|
@ -446,9 +446,9 @@ global_preferences_register_boolean_with_defaults (const char *name,
|
|||
global_preferences_register_with_defaults (name,
|
||||
description,
|
||||
NAUTILUS_PREFERENCE_BOOLEAN,
|
||||
(gconstpointer) novice_default,
|
||||
(gconstpointer) intermediate_default,
|
||||
(gconstpointer) hacker_default);
|
||||
(gconstpointer) GINT_TO_POINTER (novice_default),
|
||||
(gconstpointer) GINT_TO_POINTER (intermediate_default),
|
||||
(gconstpointer) GINT_TO_POINTER (hacker_default));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -476,9 +476,9 @@ global_preferences_register_enum_with_defaults (const char *name,
|
|||
global_preferences_register_with_defaults (name,
|
||||
description,
|
||||
NAUTILUS_PREFERENCE_ENUM,
|
||||
(gconstpointer) novice_default,
|
||||
(gconstpointer) intermediate_default,
|
||||
(gconstpointer) hacker_default);
|
||||
(gconstpointer) GINT_TO_POINTER (novice_default),
|
||||
(gconstpointer) GINT_TO_POINTER (intermediate_default),
|
||||
(gconstpointer) GINT_TO_POINTER (hacker_default));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -333,7 +333,7 @@ preferences_hash_node_check_changes_func (gpointer key,
|
|||
g_assert (value != NULL);
|
||||
|
||||
node = (PreferencesHashNode *) value;
|
||||
old_user_level = (guint) user_data;
|
||||
old_user_level = GPOINTER_TO_UINT (user_data);
|
||||
new_user_level = nautilus_user_level_manager_get_user_level ();
|
||||
|
||||
/* FIXME bugzilla.eazel.com 1273:
|
||||
|
@ -579,7 +579,7 @@ user_level_changed_callback (GtkObject *user_level_manager,
|
|||
|
||||
g_hash_table_foreach (GLOBAL.preference_table,
|
||||
preferences_hash_node_check_changes_func,
|
||||
(gpointer) GLOBAL.old_user_level);
|
||||
GUINT_TO_POINTER (GLOBAL.old_user_level));
|
||||
|
||||
GLOBAL.old_user_level = new_user_level;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include "rsvg-bpath-util.h"
|
||||
|
||||
/* This is adapted from gnome-canvas-bpath-util in libgnomeprint
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "nautilus-leak-checker-stubs.h"
|
||||
#include "nautilus-leak-hash-table.h"
|
||||
|
@ -255,13 +256,13 @@ nautilus_leak_record_malloc (void *ptr, size_t size)
|
|||
if (hash_table == NULL) {
|
||||
hash_table = nautilus_leak_hash_table_new (10 * 1024);
|
||||
}
|
||||
if (nautilus_leak_hash_table_find (hash_table, (guint)ptr) != NULL) {
|
||||
if (nautilus_leak_hash_table_find (hash_table, (gulong)ptr) != NULL) {
|
||||
printf("*** block %p appears to already be allocated "
|
||||
"- someone must have sneaked a free past us\n", ptr);
|
||||
nautilus_leak_hash_table_remove (hash_table, (guint)ptr);
|
||||
nautilus_leak_hash_table_remove (hash_table, (gulong)ptr);
|
||||
}
|
||||
/* insert a new item into the hash table, using the block address as the key */
|
||||
element = nautilus_leak_hash_table_add (hash_table, (guint)ptr);
|
||||
element = nautilus_leak_hash_table_add (hash_table, (gulong)ptr);
|
||||
|
||||
/* fill out the new allocated element */
|
||||
nautilus_leak_allocation_record_init (&element->data, ptr, size, trace_array, TRACE_ARRAY_MAX);
|
||||
|
@ -287,22 +288,22 @@ nautilus_leak_record_realloc (void *old_ptr, void *new_ptr, size_t size)
|
|||
/* must have hash table by now */
|
||||
g_assert (hash_table != NULL);
|
||||
/* must have seen the block already */
|
||||
if (nautilus_leak_hash_table_find (hash_table, (guint)old_ptr) == NULL) {
|
||||
if (nautilus_leak_hash_table_find (hash_table, (gulong)old_ptr) == NULL) {
|
||||
printf("*** we haven't seen block %p yet "
|
||||
"- someone must have sneaked a malloc past us\n", old_ptr);
|
||||
} else {
|
||||
nautilus_leak_hash_table_remove (hash_table, (guint)old_ptr);
|
||||
nautilus_leak_hash_table_remove (hash_table, (gulong)old_ptr);
|
||||
}
|
||||
|
||||
/* shouldn't have this block yet */
|
||||
if (nautilus_leak_hash_table_find (hash_table, (guint)new_ptr) != NULL) {
|
||||
if (nautilus_leak_hash_table_find (hash_table, (gulong)new_ptr) != NULL) {
|
||||
printf("*** block %p appears to already be allocated "
|
||||
"- someone must have sneaked a free past us\n", new_ptr);
|
||||
nautilus_leak_hash_table_remove (hash_table, (guint)new_ptr);
|
||||
nautilus_leak_hash_table_remove (hash_table, (gulong)new_ptr);
|
||||
}
|
||||
|
||||
/* insert a new item into the hash table, using the block address as the key */
|
||||
element = nautilus_leak_hash_table_add (hash_table, (guint)new_ptr);
|
||||
element = nautilus_leak_hash_table_add (hash_table, (gulong)new_ptr);
|
||||
|
||||
/* Fill out the new allocated element.
|
||||
* This way the last call to relloc will be the stack crawl that shows up in the
|
||||
|
@ -327,11 +328,11 @@ nautilus_leak_record_free (void *ptr)
|
|||
/* must have hash table by now */
|
||||
g_assert (hash_table != NULL);
|
||||
/* must have seen the block already */
|
||||
if (nautilus_leak_hash_table_find (hash_table, (guint)ptr) == NULL) {
|
||||
if (nautilus_leak_hash_table_find (hash_table, (gulong)ptr) == NULL) {
|
||||
printf("*** we haven't seen block %p yet "
|
||||
"- someone must have sneaked a malloc past us\n", ptr);
|
||||
} else {
|
||||
nautilus_leak_hash_table_remove (hash_table, (guint)ptr);
|
||||
nautilus_leak_hash_table_remove (hash_table, (gulong)ptr);
|
||||
}
|
||||
pthread_mutex_unlock (&nautilus_leak_hash_table_mutex);
|
||||
|
||||
|
@ -513,8 +514,8 @@ print_one_leak (NautilusLeakTableEntry *entry, void *context)
|
|||
int index;
|
||||
PrintOneLeakParams *params = (PrintOneLeakParams *)context;
|
||||
|
||||
printf("block %p total_size %d count %d\n", entry->sample_allocation->block,
|
||||
entry->total_size, entry->count);
|
||||
printf("block %p total_size %ld count %d\n", entry->sample_allocation->block,
|
||||
(long)entry->total_size, entry->count);
|
||||
|
||||
for (index = 0; index < params->stack_print_depth; index++) {
|
||||
/* only print stack_grouping worth of stack crawl -
|
||||
|
@ -715,4 +716,4 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -103,8 +103,14 @@ nautilus_leak_symbol_map_get_offsets (NautilusLeakSymbolLookupMap *map)
|
|||
|
||||
while (fgets(buffer, 1023, in)) {
|
||||
|
||||
/* if long is in fact the int64 type */
|
||||
#if G_MAXLONG == 9223372036854775807
|
||||
count = sscanf (buffer, "%lx-%lx %15s %*x %u:%u %lu %255s",
|
||||
&start, &end, perms, &major, &minor, &inode, file);
|
||||
#else
|
||||
count = sscanf (buffer, "%Lx-%Lx %15s %*x %u:%u %Lu %255s",
|
||||
&start, &end, perms, &major, &minor, &inode, file);
|
||||
#endif
|
||||
|
||||
if (count >= 6 && strcmp (perms, "r-xp") == 0) {
|
||||
if (stat (file, &entry_stat) != 0) {
|
||||
|
|
Loading…
Reference in a new issue