devhelp r1089 - in trunk: . src



Author: rhult
Date: Thu Oct  2 19:05:49 2008
New Revision: 1089
URL: http://svn.gnome.org/viewvc/devhelp?rev=1089&view=rev

Log:
2008-10-02  Richard Hult  <richard imendio com>

	* src/dh-error.c:
	* src/dh-link.c:
	* src/dh-link.h: Whitespace cleanup.


Modified:
   trunk/ChangeLog
   trunk/src/dh-error.c
   trunk/src/dh-link.c
   trunk/src/dh-link.h

Modified: trunk/src/dh-error.c
==============================================================================
--- trunk/src/dh-error.c	(original)
+++ trunk/src/dh-error.c	Thu Oct  2 19:05:49 2008
@@ -20,17 +20,16 @@
  */
 
 #include "config.h"
-
 #include "dh-error.h"
 
 GQuark
-dh_error_quark (void) 
+dh_error_quark (void)
 {
         static GQuark q = 0;
-        
+
         if (q == 0) {
                 q = g_quark_from_static_string ("dh-error-quark");
         }
-        
+
         return q;
 }

Modified: trunk/src/dh-link.c
==============================================================================
--- trunk/src/dh-link.c	(original)
+++ trunk/src/dh-link.c	Thu Oct  2 19:05:49 2008
@@ -37,7 +37,7 @@
   return type;
 }
 
-static void 
+static void
 link_free (DhLink *link)
 {
 	g_free (link->name);
@@ -49,10 +49,10 @@
 }
 
 DhLink *
-dh_link_new (DhLinkType   type, 
-	     const gchar *name, 
-	     const gchar *book, 
-	     const gchar *page, 
+dh_link_new (DhLinkType   type,
+	     const gchar *name,
+	     const gchar *book,
+	     const gchar *page,
 	     const gchar *uri)
 {
 	DhLink *link;
@@ -70,14 +70,14 @@
 	link->uri  = g_strdup (uri);
 
 	link->ref_count = 1;
-	
+
 	return link;
 }
 
 DhLink *
 dh_link_copy (const DhLink *link)
 {
-	return dh_link_new (link->type, link->name, link->book, 
+	return dh_link_new (link->type, link->name, link->book,
 			    link->page, link->uri);
 }
 
@@ -94,7 +94,7 @@
 		    ((DhLink *)b)->page == 0) {
 			page_diff = 0;
 		} else {
-			page_diff = 
+			page_diff =
 				(((DhLink *)a)->page && ((DhLink *)b)->page) ?
 				strcmp (((DhLink *)a)->page, ((DhLink *)b)->page) : -1;
 		}
@@ -114,7 +114,7 @@
 	g_return_val_if_fail (link != NULL, NULL);
 
 	link->ref_count++;
-	
+
 	return link;
 }
 
@@ -122,7 +122,7 @@
 dh_link_unref (DhLink *link)
 {
 	g_return_if_fail (link != NULL);
-	
+
 	link->ref_count--;
 
 	if (link->ref_count == 0) {
@@ -157,7 +157,7 @@
                 /* i18n: a search hit in the documentation, could be a
                  * function, macro, struct, etc */
                 return _("Keyword");
-	case DH_LINK_TYPE_FUNCTION:
+        case DH_LINK_TYPE_FUNCTION:
                 /* i18n: in the programming language context, if you don't
                  * have an ESTABLISHED term for it, leave it
                  * untranslated. */
@@ -175,7 +175,7 @@
 	case DH_LINK_TYPE_ENUM:
                 /* i18n: in the programming language context, if you don't
                  * have an ESTABLISHED term for it, leave it
-                 * untranslated. */ 
+                 * untranslated. */
                return _("Enum");
 	case DH_LINK_TYPE_TYPEDEF:
                 /* i18n: in the programming language context, if you don't

Modified: trunk/src/dh-link.h
==============================================================================
--- trunk/src/dh-link.h	(original)
+++ trunk/src/dh-link.h	Thu Oct  2 19:05:49 2008
@@ -2,6 +2,7 @@
 /*
  * Copyright (C) 2002 CodeFactory AB
  * Copyright (C) 2002 Mikael Hallendal <micke imendio com>
+ * Copyright (C) 2008 Imendio AB
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -19,41 +20,36 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __DH_LINK_H__ 
-#define __DH_LINK_H__ 
+#ifndef __DH_LINK_H__
+#define __DH_LINK_H__
 
-#include <glib.h>
 #include <glib-object.h>
 
-typedef struct _DhLink   DhLink;
-
-#define DH_LINK(x) ((DhLink *) x)
-
 typedef enum {
-	DH_LINK_TYPE_BOOK,
-	DH_LINK_TYPE_PAGE,
-	DH_LINK_TYPE_KEYWORD,
-	DH_LINK_TYPE_FUNCTION,
-	DH_LINK_TYPE_STRUCT,
-	DH_LINK_TYPE_MACRO,
-	DH_LINK_TYPE_ENUM,
-	DH_LINK_TYPE_TYPEDEF
+        DH_LINK_TYPE_BOOK,
+        DH_LINK_TYPE_PAGE,
+        DH_LINK_TYPE_KEYWORD,
+        DH_LINK_TYPE_FUNCTION,
+        DH_LINK_TYPE_STRUCT,
+        DH_LINK_TYPE_MACRO,
+        DH_LINK_TYPE_ENUM,
+        DH_LINK_TYPE_TYPEDEF
 } DhLinkType;
 
-struct _DhLink {
-	gchar       *name;
-	gchar       *book;
-	gchar       *page;
-	gchar       *uri;
-	DhLinkType   type;
-
-	/* FIXME: Use an enum or flags for this when we know more about what we
-	 * can do (or keep the actual deprecation string).
-	 */
-	gboolean     is_deprecated;
-	
-	guint        ref_count;
-};
+typedef struct {
+        gchar       *name;
+        gchar       *book;
+        gchar       *page;
+        gchar       *uri;
+        DhLinkType   type;
+
+        /* FIXME: Use an enum or flags for this when we know more about what we
+         * can do (or keep the actual deprecation string).
+         */
+        gboolean     is_deprecated;
+
+        guint        ref_count;
+} DhLink;
 
 #define DH_TYPE_LINK dh_link_get_type ()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]