changeset 414:ec86d759ed54

Trailing whitespace cleanup No real change.
author Mikael Berthe <mikael@lilotux.net>
date Tue, 30 Aug 2005 22:26:19 +0200
parents f7e4b0424081
children 5692c3a13202
files mcabber/connwrap/connwrap.c mcabber/connwrap/connwrap.h mcabber/connwrap/md5.h mcabber/libjabber/genhash.c mcabber/libjabber/jconn.c mcabber/libjabber/pool.c mcabber/libjabber/rate.c mcabber/libjabber/sha.c mcabber/libjabber/snprintf.c mcabber/libjabber/xmltok.c
diffstat 10 files changed, 42 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/connwrap/connwrap.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/connwrap/connwrap.c	Tue Aug 30 22:26:19 2005 +0200
@@ -290,7 +290,7 @@
 		p = getsock(sockfd);
 	    else
 		p = addsock(sockfd);
-	    
+
 	    rc = SSL_connect(p->ssl);
 	    switch(rc){
 	    case 1:
@@ -447,6 +447,6 @@
 	c = '-';
 	strncat(out, &c, 1);
     }
-    
+
     return out;
 }
--- a/mcabber/connwrap/connwrap.h	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/connwrap/connwrap.h	Tue Aug 30 22:26:19 2005 +0200
@@ -20,9 +20,10 @@
 #define CW_CONNECT_WANT_WRITE 0x8
 #define CW_CONNECT_WANT_SOMETHING 0xC
 #define CW_CONNECT_BLOCKING 0x10
-  
+
 /* non-blocking socket
-   state should be initialized with 0, subsequent calls should keep the modified state (state is a bitwise OR between CW_CONNECT_XXX)
+   state should be initialized with 0, subsequent calls should keep the
+   modified state (state is a bitwise OR between CW_CONNECT_XXX)
    returns 0 for OK, or if it wants subsequent calls
 	   -1 for a fatal error
  */
--- a/mcabber/connwrap/md5.h	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/connwrap/md5.h	Tue Aug 30 22:26:19 2005 +0200
@@ -61,7 +61,7 @@
 } md5_state_t;
 
 #ifdef __cplusplus
-extern "C" 
+extern "C"
 {
 #endif
 
--- a/mcabber/libjabber/genhash.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/genhash.c	Tue Aug 30 22:26:19 2005 +0200
@@ -345,7 +345,7 @@
 /*
     Description:
         Removes an entry from a hash table, given its key.
-    
+
     Input:
         Parameters:
         tbl - Hash table to remove from.
@@ -459,11 +459,11 @@
         Generates a hash code for a string.  This function uses the ELF hashing
         algorithm as reprinted in Andrew Binstock, "Hashing Rehashed," _Dr.
         Dobb's Journal_, April 1996.
- 
+
     Input:
         Parameters:
             s - The string to be hashed.
- 
+
     Output:
         Returns:
             A hash code for the string.
--- a/mcabber/libjabber/jconn.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/jconn.c	Tue Aug 30 22:26:19 2005 +0200
@@ -132,7 +132,7 @@
     char *t,*t2;
 
     if(!j || (j->state != JCONN_STATE_OFF && j->state != JCONN_STATE_CONNECTING) ) return;
-    
+
     if (!(j->cw_state & CW_CONNECT_WANT_SOMETHING)) { /* same as state != JCONN_STATE_CONNECTING */
 	j->parser = XML_ParserCreate(NULL);
 	XML_SetUserData(j->parser, (void *)j);
@@ -161,7 +161,7 @@
 	return;
     }
     change_socket_to_blocking(j->fd);
-    
+
     j->state = JCONN_STATE_CONNECTED;
     STATE_EVT(JCONN_STATE_CONNECTED)
 
--- a/mcabber/libjabber/pool.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/pool.c	Tue Aug 30 22:26:19 2005 +0200
@@ -15,26 +15,24 @@
  *
  *  Jabber
  *  Copyright (C) 1998-1999 The Jabber Team http://jabber.org/
- *  
+ *
  *  2/27/00:3am, random plans by jer
- *  
+ *
  *  ok based on gprof, we really need some innovation here... my thoughs are this:
- *  
+ *
  *  most things are strings, so have a string-based true-blue garbage collector
  *  one big global hash containing all the strings created by any pstrdup, returning const char *
  *  a refcount on each string block
  *  when a pool is freed, it moves down the refcount
  *  garbage collector collects pools on the free stack, and runs through the hash for unused strings
  *  j_strcmp can check for == (if they are both from a pstrdup)
- *  
+ *
  *  let's see... this would change:
  *  pstrdup: do a hash lookup, success=return, fail=pmalloc & hash put
- *  pool_free: 
- *  
- *  
- *  
- *  
- *  
+ *  pool_free:
+ *
+ *
+ *
  */
 
 #include "libxode.h"
@@ -190,7 +188,7 @@
    if (result != NULL)
 	   memset(result, c, size);
    return result;
-}  
+}
 
 /* easy safety utility (for creating blank mem for structs, etc) */
 void *pmalloco(pool p, int size)
@@ -198,7 +196,7 @@
     void *block = pmalloc(p, size);
     memset(block, 0, size);
     return block;
-}  
+}
 
 /* XXX efficient: move this to const char * and then loop throug the existing heaps to see if src is within a block in this pool */
 char *pstrdup(pool p, const char *src)
--- a/mcabber/libjabber/rate.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/rate.c	Tue Aug 30 22:26:19 2005 +0200
@@ -55,9 +55,9 @@
     { /* start a new key */
 	free(r->key);
 	if(key != NULL)
-	  /* We use strdup instead of pstrdup since r->key needs to be free'd before 
+	  /* We use strdup instead of pstrdup since r->key needs to be free'd before
 	     and more often than the rest of the rlimit structure */
-	    r->key = strdup(key); 
+	    r->key = strdup(key);
 	else
 	    r->key = NULL;
 	r->start = now;
--- a/mcabber/libjabber/sha.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/sha.c	Tue Aug 30 22:26:19 2005 +0200
@@ -1,29 +1,29 @@
-/* 
+/*
  * The contents of this file are subject to the Mozilla Public
  * License Version 1.1 (the "License"); you may not use this file
  * except in compliance with the License. You may obtain a copy of
  * the License at http://www.mozilla.org/MPL/
- * 
+ *
  * Software distributed under the License is distributed on an "AS
  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  * implied. See the License for the specific language governing
  * rights and limitations under the License.
- * 
+ *
  * The Original Code is SHA 180-1 Reference Implementation (Compact version)
- * 
+ *
  * The Initial Developer of the Original Code is Paul Kocher of
- * Cryptography Research.  Portions created by Paul Kocher are 
+ * Cryptography Research.  Portions created by Paul Kocher are
  * Copyright (C) 1995-9 by Cryptography Research, Inc.  All
  * Rights Reserved.
- * 
+ *
  * Contributor(s):
  *
  *     Paul Kocher
- * 
+ *
  * Alternatively, the contents of this file may be used under the
  * terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable 
- * instead of those above.  If you wish to allow use of your 
+ * "GPL"), in which case the provisions of the GPL are applicable
+ * instead of those above.  If you wish to allow use of your
  * version of this file only under the terms of the GPL and not to
  * allow others to use your version of this file under the MPL,
  * indicate your decision by deleting the provisions above and
@@ -189,7 +189,7 @@
     int x;
     char *pos;
     unsigned char hashval[20];
-    
+
     if(!str || strlen(str) == 0)
         return;
 
--- a/mcabber/libjabber/snprintf.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/snprintf.c	Tue Aug 30 22:26:19 2005 +0200
@@ -6,7 +6,7 @@
  * are met:
  *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
+ *    notice, this list of conditions and the following disclaimer.
  *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
@@ -364,7 +364,7 @@
         *is_negative = (num < 0);
 
         /*
-         * On a 2's complement machine, negating the most negative integer 
+         * On a 2's complement machine, negating the most negative integer
          * results in a number that cannot be represented as a signed integer.
          * Here is what we do to obtain the number's magnitude:
          *      a. add 1 to the number
@@ -381,7 +381,7 @@
     }
 
     /*
-     * We use a do-while loop so that we write at least 1 digit 
+     * We use a do-while loop so that we write at least 1 digit
      */
     do {
         register u_wide_int new_magnitude = magnitude / 10;
@@ -802,11 +802,11 @@
                 break;
 
                 /*
-                 * Always extract the argument as a "char *" pointer. We 
-                 * should be using "void *" but there are still machines 
+                 * Always extract the argument as a "char *" pointer. We
+                 * should be using "void *" but there are still machines
                  * that don't understand it.
                  * If the pointer size is equal to the size of an unsigned
-                 * integer we convert the pointer to a hex number, otherwise 
+                 * integer we convert the pointer to a hex number, otherwise
                  * we print "%p" to indicate that we don't handle "%p".
                  */
             case 'p':
@@ -864,7 +864,7 @@
                 PAD(min_width, s_len, pad_char);
             }
             /*
-             * Print the string s. 
+             * Print the string s.
              */
             for (i = s_len; i != 0; i--) {
                 INS_CHAR(*s, sp, bep, cc);
--- a/mcabber/libjabber/xmltok.c	Tue Aug 30 21:25:16 2005 +0200
+++ b/mcabber/libjabber/xmltok.c	Tue Aug 30 22:26:19 2005 +0200
@@ -643,7 +643,7 @@
 #define MINBPC(enc) 2
 /* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */
 #define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
-#define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p) 
+#define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p)
 #define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(enc, p, c)
 #define IS_NAME_CHAR(enc, p, n) 0
 #define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(enc, p)
@@ -782,7 +782,7 @@
 #define MINBPC(enc) 2
 /* CHAR_MATCHES is guaranteed to have MINBPC bytes available. */
 #define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
-#define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p) 
+#define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p)
 #define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(enc, p, c)
 #define IS_NAME_CHAR(enc, p, n) 0
 #define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(enc, p)