The indentation in LibGTop was done with the following command:

find . -name \*.[ch] | xargs -i emacs -batch {} \
		-l /gnome/compile/libgtop/misc/format.el -f save-buffer

December 26, 1999
Martin
This commit is contained in:
Martin Baulig
1999-12-26 14:05:32 +00:00
parent d7f088bef0
commit f1a6e1ead8
272 changed files with 6300 additions and 5751 deletions

View File

@@ -1,3 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* $Id$ */
/* Copyright (C) 1998-99 Martin Baulig
@@ -33,14 +35,14 @@ void *
glibtop_malloc_r (glibtop *server, size_t size)
{
#ifdef LIBGTOP_USE_GLIB_MALLOC
return g_malloc0 (size);
return g_malloc0 (size);
#else
void *buf = malloc (size);
void *buf = malloc (size);
if (!buf)
glibtop_error_io_r (server, "malloc %d bytes", size);
if (!buf)
glibtop_error_io_r (server, "malloc %d bytes", size);
return buf;
return buf;
#endif
}
@@ -48,15 +50,15 @@ void *
glibtop_calloc_r (glibtop *server, size_t nmemb, size_t size)
{
#ifdef LIBGTOP_USE_GLIB_MALLOC
return g_malloc0 (size * nmemb);
return g_malloc0 (size * nmemb);
#else
void *buf = calloc (nmemb, size);
void *buf = calloc (nmemb, size);
if (!buf)
glibtop_error_io_r (server, "calloc %d blocks (%d bytes each)",
nmemb, size);
if (!buf)
glibtop_error_io_r (server, "calloc %d blocks (%d bytes each)",
nmemb, size);
return buf;
return buf;
#endif
}
@@ -64,14 +66,14 @@ void *
glibtop_realloc_r (glibtop *server, void *ptr, size_t size)
{
#ifdef LIBGTOP_USE_GLIB_MALLOC
return g_realloc (ptr, size);
return g_realloc (ptr, size);
#else
void *buf = realloc (ptr, size);
void *buf = realloc (ptr, size);
if (!buf)
glibtop_error_io_r (server, "realloc %d bytes", size);
if (!buf)
glibtop_error_io_r (server, "realloc %d bytes", size);
return buf;
return buf;
#endif
}
@@ -79,9 +81,9 @@ char *
glibtop_strdup_r (glibtop *server, const char *string)
{
#ifdef LIBGTOP_USE_GLIB_MALLOC
return g_strdup (string);
return g_strdup (string);
#else
return strcpy (glibtop_malloc_r (server, strlen (string) + 1), string);
return strcpy (glibtop_malloc_r (server, strlen (string) + 1), string);
#endif
}
@@ -89,8 +91,8 @@ void
glibtop_free_r (glibtop *server, const void *ptr)
{
#ifdef LIBGTOP_USE_GLIB_MALLOC
g_free (ptr);
g_free (ptr);
#else
if (ptr) free ((void *) ptr);
if (ptr) free ((void *) ptr);
#endif
}