]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat: include/
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 29 Sep 2008 09:56:06 +0000 (22:56 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 29 Sep 2008 09:56:06 +0000 (22:56 +1300)
52 files changed:
include/Array.h
include/CbDataList.h
include/GNUregex.h
include/IPAddress.h
include/MemPool.h
include/Range.h
include/RefCount.h
include/SquidNew.h
include/Stack.h
include/asn1.h
include/assert.h
include/cache_snmp.h
include/config.h
include/getaddrinfo.h
include/getnameinfo.h
include/heap.h
include/inet_ntop.h
include/inet_pton.h
include/memMeter.h
include/ntlmauth.h
include/parse.h
include/profiling.h
include/radix.h
include/rfc1035.h
include/rfc2181.h
include/rfc2617.h
include/rfc3596.h
include/snmp-internal.h
include/snmp-mib.h
include/snmp.h
include/snmp_api.h
include/snmp_api_error.h
include/snmp_api_util.h
include/snmp_client.h
include/snmp_coexist.h
include/snmp_error.h
include/snmp_impl.h
include/snmp_msg.h
include/snmp_pdu.h
include/snmp_session.h
include/snmp_util.h
include/snmp_vars.h
include/splay.h
include/squid_endian.h
include/squid_mswin.h
include/squid_types.h
include/squid_windows.h
include/sspwin32.h
include/strsep.h
include/strtoll.h
include/tempnam.h
include/util.h

index 3c265840d20a7c0a43434aad1971f70fceb247ea..6f4745c5c5d0cc7d84ec1d29bd852bcd33908790 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 #ifndef SQUID_ARRAY_H
 #define SQUID_ARRAY_H
@@ -58,13 +58,11 @@ public:
     bool operator == (VectorIteratorBase const &rhs);
     VectorIteratorBase & operator ++();
     VectorIteratorBase operator ++(int);
-    typename C::value_type & operator *() const
-    {
+    typename C::value_type & operator *() const {
         return theVector->items[pos];
     }
 
-    typename C::value_type * operator -> () const
-    {
+    typename C::value_type * operator -> () const {
         return &theVector->items[pos];
     }
 
@@ -254,11 +252,11 @@ Vector<E>::prune(E item)
 {
     unsigned int n = 0;
     for (unsigned int i = 0; i < count; i++) {
-       if (items[i] != item) {
-           if (i != n)
-               items[n] = items[i];
-           n++;
-       }
+        if (items[i] != item) {
+            if (i != n)
+                items[n] = items[i];
+            n++;
+        }
     }
 
     count = n;
index 0aa43dba4021bfc22aac923ec97a86cf27d5a84e..79dcfef618eec2b86e13641934707cea46ed1bab 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -79,13 +79,13 @@ class CbDataListIterator
 public:
     CbDataListIterator(CbDataListContainer<C> const &list) : next_entry(list.head) {}
     const C & next() {
-       CbDataList<C> *entry = next_entry;
-       if (entry)
-           next_entry = entry->next;
-       return entry->element;
+        CbDataList<C> *entry = next_entry;
+        if (entry)
+            next_entry = entry->next;
+        return entry->element;
     }
     bool end() {
-       return next_entry == NULL;
+        return next_entry == NULL;
     }
 
 private:
@@ -148,7 +148,7 @@ CbDataList<C>::findAndTune(C const & toFind)
     CbDataList<C> *prev = NULL;
 
     for (CbDataList<C> *node = this; node; node = node->
-                                            next) {
+            next) {
         if (node->element == toFind) {
             if (prev != NULL) {
                 /* shift the element just found to the second position
index 2b890fbbace1916ba4354395e1b1ab2d86adf2ee..f04a019dd8288740ce0ba31df96060f9f03d70ba 100644 (file)
@@ -8,19 +8,19 @@
 
 /* Definitions for data structures and routines for the regular
  * expression library, version 0.12.
- * 
+ *
  * Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.  */
@@ -47,7 +47,7 @@ typedef unsigned reg_syntax_t;
 #define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
 
 /* If this bit is not set, then + and ? are operators, and \+ and \? are
- * literals. 
+ * literals.
  * If set, then \+ and \? are operators and + and ? are literals.  */
 #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
 
@@ -63,8 +63,8 @@ typedef unsigned reg_syntax_t;
  * ^  is an anchor if it is at the beginning of a regular
  * expression or after an open-group or an alternation operator;
  * $  is an anchor if it is at the end of a regular expression, or
- * before a close-group or an alternation operator.  
- * 
+ * before a close-group or an alternation operator.
+ *
  * This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
  * POSIX draft 11.2 says that * etc. in leading positions is undefined.
  * We already implemented a previous draft which made those constructs
@@ -74,7 +74,7 @@ typedef unsigned reg_syntax_t;
 /* If this bit is set, then special characters are always special
  * regardless of where they are in the pattern.
  * If this bit is not set, then special characters are special only in
- * some contexts; otherwise they are ordinary.  Specifically, 
+ * some contexts; otherwise they are ordinary.  Specifically,
  * * + ? and intervals are only special when not after the beginning,
  * open-group, or alternation operator.  */
 #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
@@ -96,7 +96,7 @@ typedef unsigned reg_syntax_t;
 #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
 
 /* If this bit is set, either \{...\} or {...} defines an
- * interval, depending on RE_NO_BK_BRACES. 
+ * interval, depending on RE_NO_BK_BRACES.
  * If not set, \{, \}, {, and } are literals.  */
 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
 
@@ -121,7 +121,7 @@ typedef unsigned reg_syntax_t;
  * If not set, then \<digit> is a back-reference.  */
 #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
 
-/* If this bit is set, then | is an alternation operator, and \| is literal. 
+/* If this bit is set, then | is an alternation operator, and \| is literal.
  * If not set, then \| is an alternation operator, and | is literal.  */
 #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
 
@@ -275,7 +275,7 @@ typedef enum {
  * private to the regex routines.  */
 
 struct re_pattern_buffer {
-/* [[[begin pattern_buffer]]] */
+    /* [[[begin pattern_buffer]]] */
     /* Space that holds the compiled pattern.  It is declared as
      * `unsigned char *' because its elements are
      * sometimes used as array indexes.  */
@@ -338,7 +338,7 @@ struct re_pattern_buffer {
     /* If true, an anchor at a newline matches.  */
     unsigned newline_anchor:1;
 
-/* [[[end pattern_buffer]]] */
+    /* [[[end pattern_buffer]]] */
 };
 
 typedef struct re_pattern_buffer regex_t;
@@ -399,10 +399,10 @@ typedef struct {
 extern int regcomp _RE_ARGS((regex_t * preg, const char *pattern, int cflags));
 extern int regexec
     _RE_ARGS((const regex_t * preg, const char *string, size_t nmatch,
-       regmatch_t pmatch[], int eflags));
+              regmatch_t pmatch[], int eflags));
 extern size_t regerror
-       _RE_ARGS((int errcode, const regex_t * preg, char *errbuf,
-       size_t errbuf_size));
+    _RE_ARGS((int errcode, const regex_t * preg, char *errbuf,
+              size_t errbuf_size));
 extern void regfree _RE_ARGS((regex_t * preg));
 
 #endif /* SQUID_REGEXP_LIBRARY_H */
index ce88e333214e15f9e0d36bafefa3053685c2ba35..6152c68b1259dd3ea5299aef1c7598c112f6bd46 100644 (file)
@@ -420,7 +420,7 @@ class IPAddress_list
 {
 public:
     IPAddress_list() { next = NULL; };
-    ~IPAddress_list() { if(next) delete next; next = NULL; };
+    ~IPAddress_list() { if (next) delete next; next = NULL; };
 
     IPAddress s;
     IPAddress_list *next;
index 90a998d95f6359aeb98a33df6a5540b6996c1474..95b773b9c88a74460396b3a5e2fae69dd472519c 100644 (file)
@@ -74,7 +74,7 @@ typedef struct _MemPoolGlobalStats MemPoolGlobalStats;
 /// \ingroup MemPoolsAPI
 class MemPoolIterator
 {
-  public:
+public:
     MemImplementingAllocator *pool;
     MemPoolIterator * next;
 };
@@ -85,8 +85,8 @@ class MemPoolIterator
  */
 class mgb_t
 {
-  public:
-    mgb_t() : count(0), bytes(0){}
+public:
+    mgb_t() : count(0), bytes(0) {}
     double count;
     double bytes;
 };
@@ -97,7 +97,7 @@ class mgb_t
  */
 class MemPoolMeter
 {
-  public:
+public:
     void flush();
     MemMeter alloc;
     MemMeter inuse;
@@ -116,9 +116,9 @@ class MemPoolMeter
 class MemImplementingAllocator;
 
 /// \ingroup MemPoolsAPI
-class MemPools 
+class MemPools
 {
-  public:
+public:
     static MemPools &GetInstance();
     MemPools();
     void init();
@@ -180,7 +180,7 @@ class MemPools
     int mem_idle_limit;
     int poolCount;
     bool defaultIsChunked;
-  private:
+private:
     static MemPools *Instance;
 };
 
@@ -249,7 +249,7 @@ private:
  */
 class MemAllocatorProxy
 {
-  public:
+public:
     inline MemAllocatorProxy(char const *aLabel, size_t const &);
 
     /**
@@ -273,7 +273,7 @@ class MemAllocatorProxy
     int getStats(MemPoolStats * stats);
 
     char const * objectType() const;
-  private:
+private:
     MemAllocator *getAllocator() const;
     const char *label;
     size_t size;
@@ -285,7 +285,7 @@ class MemAllocatorProxy
 /**
  \ingroup MemPoolsAPI
  \hideinitializer
- * 
+ *
  * This macro is intended for use within the declaration of a class.
  */
 #define MEMPROXY_CLASS(CLASS) \
@@ -296,7 +296,7 @@ class MemAllocatorProxy
 /**
  \ingroup MemPoolsAPI
  \hideinitializer
- * 
+ *
  * This macro is intended for use within the .h or .cci of a class as appropriate.
  */
 #define MEMPROXY_CLASS_INLINE(CLASS) \
@@ -324,7 +324,7 @@ CLASS::operator delete (void *address) \
 /// \ingroup MemPoolsAPI
 class MemImplementingAllocator : public MemAllocator
 {
-  public:
+public:
     MemImplementingAllocator(char const *aLabel, size_t aSize);
     virtual MemPoolMeter const &getMeter() const;
     virtual MemPoolMeter &getMeter();
@@ -347,14 +347,14 @@ class MemImplementingAllocator : public MemAllocator
     virtual void setChunkSize(size_t chunksize) {}
     virtual size_t objectSize() const;
     virtual int getInUseCount() = 0;
-  protected:
+protected:
     virtual void *allocate() = 0;
     virtual void deallocate(void *) = 0;
-  private:
+private:
     MemPoolMeter meter;
-  public:
+public:
     MemImplementingAllocator *next;
-  public:
+public:
     size_t alloc_calls;
     size_t free_calls;
     size_t obj_size;
@@ -363,7 +363,7 @@ class MemImplementingAllocator : public MemAllocator
 /// \ingroup MemPoolsAPI
 class MemPool : public MemImplementingAllocator
 {
-  public:
+public:
     friend class MemChunk;
     MemPool(const char *label, size_t obj_size);
     ~MemPool();
@@ -380,10 +380,10 @@ class MemPool : public MemImplementingAllocator
     void *get();
     void push(void *obj);
     virtual int getInUseCount();
-  protected:
+protected:
     virtual void *allocate();
     virtual void deallocate(void *);
-  public:
+public:
     /**
      * Allows you tune chunk size of pooling. Objects are allocated in chunks
      * instead of individually. This conserves memory, reduces fragmentation.
@@ -413,7 +413,7 @@ class MemPool : public MemImplementingAllocator
 /// \ingroup MemPoolsAPI
 class MemMalloc : public MemImplementingAllocator
 {
-  public:
+public:
     MemMalloc(char const *label, size_t aSize);
     virtual bool idleTrigger(int shift) const;
     virtual void clean(time_t maxage);
@@ -425,17 +425,17 @@ class MemMalloc : public MemImplementingAllocator
     virtual int getStats(MemPoolStats * stats);
 
     virtual int getInUseCount();
-  protected:
+protected:
     virtual void *allocate();
     virtual void deallocate(void *);
-  private:
+private:
     int inuse;
 };
 
 /// \ingroup MemPoolsAPI
 class MemChunk
 {
-  public:
+public:
     MemChunk(MemPool *pool);
     ~MemChunk();
     void *freeList;
@@ -450,7 +450,7 @@ class MemChunk
 /// \ingroup MemPoolsAPI
 class MemPoolStats
 {
-  public:
+public:
     MemAllocator *pool;
     const char *label;
     MemPoolMeter *meter;
@@ -472,8 +472,7 @@ class MemPoolStats
 
 /// \ingroup MemPoolsAPI
 /// \todo Classify and add constructor/destructor to initialize properly.
-struct _MemPoolGlobalStats
-{
+struct _MemPoolGlobalStats {
     MemPoolMeter *TheMeter;
 
     int tot_pools_alloc;
index 2023bafff1e7b0b53001bbefadf9f45acb0959c4..32405fa2decc8a351f100cf0ff784ec4196c0289 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -49,7 +49,7 @@ public:
     Range (C start_, C end_);
     C start;
     C end;
-    Range intersection (Range const &) const; 
+    Range intersection (Range const &) const;
     C size() const;
 };
 
index dd92597c559c39474845a28e548c84c1cc0adb31..03c737f9ccc0415d9bca26b5b360f424902778f6 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -48,18 +48,15 @@ public:
 
     RefCount (C const *p) : p_(p) { reference (*this); }
 
-    ~RefCount()
-    {
+    ~RefCount() {
         dereference();
     }
 
-    RefCount (const RefCount &p) : p_(p.p_)
-    {
+    RefCount (const RefCount &p) : p_(p.p_) {
         reference (p);
     }
 
-    RefCount& operator = (const RefCount& p)
-    {
+    RefCount& operator = (const RefCount& p) {
         // DO NOT CHANGE THE ORDER HERE!!!
         // This preserves semantics on self assignment
         C const *newP_ = p.p_;
@@ -68,7 +65,7 @@ public:
         return *this;
     }
 
-       bool operator !() const { return !p_; }
+    bool operator !() const { return !p_; }
 
     C const * operator-> () const {return p_; }
 
@@ -82,19 +79,16 @@ public:
 
     C * getRaw() {return const_cast<C *>(p_); }
 
-    bool operator == (const RefCount& p) const
-    {
+    bool operator == (const RefCount& p) const {
         return p.p_ == p_;
     }
 
-    bool operator != (const RefCount &p) const
-    {
+    bool operator != (const RefCount &p) const {
         return p.p_ != p_;
     }
 
 private:
-    void dereference(C const *newP = NULL)
-    {
+    void dereference(C const *newP = NULL) {
         /* Setting p_ first is important:
         * we may be freed ourselves as a result of
         * delete p_;
@@ -106,8 +100,7 @@ private:
             delete tempP_;
     }
 
-    void reference (const RefCount& p)
-    {
+    void reference (const RefCount& p) {
         if (p.p_)
             p.p_->RefCountReference();
     }
@@ -116,15 +109,13 @@ private:
 
 };
 
-struct RefCountable_
-{
-    RefCountable_():count_(0){}
+struct RefCountable_ {
+    RefCountable_():count_(0) {}
 
-    virtual ~RefCountable_(){}
+    virtual ~RefCountable_() {}
 
     /* Not private, to allow class hierarchies */
-    void RefCountReference() const
-    {
+    void RefCountReference() const {
 #if REFCOUNT_DEBUG
         debug (0,1)("Incrementing this %p from count %u\n",this,count_);
 #endif
@@ -132,8 +123,7 @@ struct RefCountable_
         ++count_;
     }
 
-    unsigned RefCountDereference() const
-    {
+    unsigned RefCountDereference() const {
 #if REFCOUNT_DEBUG
         debug (0,1)("Decrementing this %p from count %u\n",this,count_);
 #endif
index 5ddb2ee869c1a70b8477f3815215cd123d9718dd..10da4ee510f44f33aae95dc3ee0ffac8bf6c36a2 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 #ifndef SQUID_NEW_H
 #define SQUID_NEW_H
index a4c8b9baf9beda2b88169407832c2d919fdfa339..d54ed49f1dbd73420ec9c53fccf212b9e7f4ca0c 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 #ifndef SQUID_STACK_H
@@ -49,8 +49,7 @@ public:
     using Vector<S>::items;
     typedef typename Vector<S>::value_type value_type;
     typedef typename Vector<S>::pointer pointer;
-    value_type pop()
-    {
+    value_type pop() {
         if (!count)
             return value_type();
 
@@ -62,8 +61,7 @@ public:
     }
 
     /* todo, fatal on empty Top call */
-    value_type top() const
-    {
+    value_type top() const {
         return count ? items[count - 1] : value_type();
     }
 };
index 28187b767fcd25344fc057dd235f27ecd978faef..b1edf8f4a86487c95db42121ec9dcd581ac783c6 100644 (file)
@@ -11,9 +11,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -21,7 +21,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -29,9 +29,9 @@
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * $Id: asn1.h,v 1.13 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 #ifndef EIGHTBIT_SUBIDS
@@ -69,7 +69,8 @@ typedef u_char oid;
 #define IS_EXTENSION_ID(byte)  (((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID)
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     u_char *asn_build_header(u_char *, int *, u_char, int);
index 30130239d1331223f2c15ff94f8e19d948c14049..bed2a99da5d832e3a9eb05b3a215bb996fbed52a 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
index ac95622c153f1cfe034c303344e88c8af35f1488..f72b638b5ec90e4212b82ba8fcacf8dcf366b709 100644 (file)
@@ -54,7 +54,7 @@
 #define SQ_MESH  SQUIDMIB, 5          /* cacheMesh group { squid 5 }    */
 #define LEN_SQ_MESH LEN_SQUIDMIB+1
 
-/* 
+/*
  * cacheSystem group { squid 1 }
  */
 
@@ -69,7 +69,7 @@ enum {
 #define LEN_SYS LEN_SQ_SYS + 1
 #define LEN_SYS_INST LEN_SQ_SYS + 2
 
-/* 
+/*
  * cacheConfig group { squid 2 }
  */
 
@@ -88,7 +88,7 @@ enum {
 #define LEN_CONF_INST LEN_SQ_CONF + 2
 
 
-/* 
+/*
  * cacheStorageConfig group { cacheConfig 5 }
  */
 enum {
@@ -103,7 +103,7 @@ enum {
 #define LEN_CONF_ST LEN_CONF + 1
 #define LEN_CONF_ST_INST LEN_CONF + 2
 
-/* 
+/*
  * Cache Performance Group  {squid 3}
  */
 
@@ -176,7 +176,7 @@ enum {
     PERF_MEDIAN_ICP_REPLY, /* cacheIcpReplySvcTime */
     PERF_MEDIAN_DNS, /* cacheDnsSvcTime */
     PERF_MEDIAN_RHR, /* cacheRequestHitRatio */
-    PERF_MEDIAN_BHR, /* cacheRequestByteRatio */ 
+    PERF_MEDIAN_BHR, /* cacheRequestByteRatio */
     PERF_MEDIAN_HTTP_NH, /* cacheHttpNhSvcTime */
     PERF_MEDIAN_END
 };
@@ -184,7 +184,7 @@ enum {
 
 
 
-/* 
+/*
  * cacheNetwork group  { squid 4 }
  */
 
@@ -198,7 +198,7 @@ enum {
 
 /* cacheIpCache */
 enum {
-    IP_START, 
+    IP_START,
     IP_ENT, /* cacheIpEntrie */
     IP_REQ, /* cacheIpRequests */
     IP_HITS, /* acheIpHits */
@@ -236,19 +236,19 @@ enum {
 
 
 
-/* 
+/*
  * cacheMesh group { squid 5 }
  */
 
 enum {
-    MESH_START,  
+    MESH_START,
     MESH_PTBL,  /* cachePeerTable  */
     MESH_CTBL,  /* cacheClientTable */
     MESH_END
 };
 
 /* cachePeerEntry */
-enum {                 
+enum {
     MESH_PTBL_START,
     MESH_PTBL_INDEX, /* cachePeerIndex  */
     MESH_PTBL_NAME, /* cachePeerName  */
@@ -269,7 +269,7 @@ enum {
 };
 
 /* cacheClientEntry */
-enum {                         
+enum {
     MESH_CTBL_START,
     MESH_CTBL_ADDR_TYPE, /* cacheClientAddressType */
     MESH_CTBL_ADDR,      /* cacheClientAddress */
index cd7fb1a037635b44dbb475f591ade423a7e91389..8bfbe58ae354ae70f16150df4a2d4e13d3d2115e 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 #ifndef SQUID_CONFIG_H
 #elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
 #define _SQUID_OS2_
 /*
- *  FIXME: the os2 port of bash seems to have problems checking
- *  the return codes of programs in if statements.  These options
- *  need to be overridden.
- */
+*  FIXME: the os2 port of bash seems to have problems checking
+*  the return codes of programs in if statements.  These options
+*  need to be overridden.
+*/
 #endif
 
 /* FD_SETSIZE must be redefined before including sys/types.h */
@@ -320,20 +320,20 @@ typedef long mtyp_t;
 #if defined(_SQUID_SOLARIS_) && (defined(i386) || defined(__i386))
 #ifndef HAVE_PAD128_T
 typedef union {
-       long double     _q;
-       int32_t         _l[4];
+    long double        _q;
+    int32_t            _l[4];
 } pad128_t;
 #endif
 #ifndef HAVE_UPAD128_T
 typedef union {
-       long double     _q;
-       uint32_t        _l[4];
+    long double        _q;
+    uint32_t   _l[4];
 } upad128_t;
 #endif
 #endif
 
-/* 
- * Don't allow inclusion of malloc.h on FreeBSD, Next and OpenBSD 
+/*
+ * Don't allow inclusion of malloc.h on FreeBSD, Next and OpenBSD
  */
 #if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_))
 #undef HAVE_MALLOC_H
@@ -407,7 +407,7 @@ typedef union {
 
 /* gcc doesn't recognize the Windows native 64 bit formatting tags causing
  * the compile fail, so we must disable the check on native Windows.
- */  
+ */
 
 #if __GNUC__ && !defined(_SQUID_MSWIN_)
 #define PRINTF_FORMAT_ARG1 __attribute__ ((format (printf, 1, 2)))
index d5ac51adc02dfdde8806bc94822c7a23ca813e89..628c4016427031fe53180098808e91ee93d8eade 100644 (file)
@@ -46,7 +46,7 @@
 
 #ifdef HAVE_GETADDRINFO
 
-    /* These functions are provided by the OS */
+/* These functions are provided by the OS */
 #define xgetaddrinfo   getaddrinfo
 #define xfreeaddrinfo  freeaddrinfo
 #define xgai_strerror  gai_strerror
 #else /* !HAVE_GETADDRINFO */
 
 /* SG 23/09/2007:
-   On Windows the following definitions are already available, may be that
-   this could be needed on some other platform */
+On Windows the following definitions are already available, may be that
+this could be needed on some other platform */
 #if 0
-struct addrinfo
-  {
+struct addrinfo {
     int ai_flags;              /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
     int ai_family;             /* PF_xxx */
     int ai_socktype;           /* SOCK_xxx */
@@ -67,7 +66,7 @@ struct addrinfo
     char *ai_canonname;                /* canonical name for nodename */
     struct sockaddr *ai_addr;  /* binary address */
     struct addrinfo *ai_next;  /* next structure in linked list */
-  };
+};
 
 /* Supposed to be defined in <netdb.h> */
 #define AI_PASSIVE     1       /* Socket address is intended for `bind'.  */
@@ -102,7 +101,7 @@ struct addrinfo
 
 /* RFC 2553 / Posix resolver */
 SQUIDCEXTERN int xgetaddrinfo (const char *nodename, const char *servname,
-                const struct addrinfo *hints, struct addrinfo **res);
+                               const struct addrinfo *hints, struct addrinfo **res);
 
 /* Free addrinfo structure and associated storage */
 SQUIDCEXTERN void xfreeaddrinfo (struct addrinfo *ai);
index 71a386e742d91cbac160afb69cb246aca153122b..53a07787b60e88e60782ab3b4c77794d63b88167 100644 (file)
 
 #ifdef HAVE_GETNAMEINFO
 
-    /* These functions are provided by the OS */
+/* These functions are provided by the OS */
 #define xgetnameinfo   getnameinfo
 
 #else /* !HAVE_GETNAMEINFO */
 
 /* RFC 2553 / Posix resolver */
 SQUIDCEXTERN int xgetnameinfo(const struct sockaddr *sa,
-        socklen_t salen,
-        char *host,
-        size_t hostlen,
-        char *serv,
-        size_t servlen,
-        int flags );
+                              socklen_t salen,
+                              char *host,
+                              size_t hostlen,
+                              char *serv,
+                              size_t servlen,
+                              int flags );
 
 
 #endif /* HAVE_GETNAMEINFO */
index d5f23f516a4ab1695b053bde03f8f39e63c055e8..36efb22c3a7c87ebfc9181cc1bfab8885050349f 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 /****************************************************************************
@@ -88,12 +88,12 @@ typedef struct _heap {
  * Public functions
  ****************************************************************************/
 
-/* 
+/*
  * Create and initialize a new heap.
  */
 SQUIDCEXTERN heap *new_heap(int init_size, heap_key_func gen_key);
 
-/* 
+/*
  * Delete a heap and clean up its memory.  Does not delete what the heap
  * nodes are pointing to!
  */
@@ -122,7 +122,7 @@ SQUIDCEXTERN heap_t heap_delete(heap *, heap_node * elm);
  */
 SQUIDCEXTERN heap_t heap_update(heap *, heap_node * elm, heap_t dat);
 
-/* 
+/*
  * Generate a heap key for a given data object.  Alternative macro form:
  */
 #ifdef MACRO_DEBUG
@@ -132,14 +132,14 @@ SQUIDCEXTERN heap_key heap_gen_key(heap * hp, heap_t dat);
 #endif /* MACRO_DEBUG */
 
 
-/* 
+/*
  * Extract the minimum (root) element and maintain the heap property.
  * Returns the data pointed to by the root node, which the caller must
  * free as necessary.
  */
 SQUIDCEXTERN heap_t heap_extractmin(heap *);
 
-/* 
+/*
  * Extract the last leaf node (does not change the heap property).
  * Returns the data that had been in the heap which the caller must free if
  * necessary.  Note that the last node is guaranteed to be less than its
@@ -148,7 +148,7 @@ SQUIDCEXTERN heap_t heap_extractmin(heap *);
  */
 SQUIDCEXTERN heap_t heap_extractlast(heap * hp);
 
-/* 
+/*
  * Get the root key, the nth key, the root (smallest) element, or the nth
  * element.  None of these operations modify the heap.
  */
@@ -158,8 +158,8 @@ SQUIDCEXTERN heap_key heap_peepkey(heap *, int n);
 SQUIDCEXTERN heap_t heap_peepmin(heap *);
 SQUIDCEXTERN heap_t heap_peep(heap *, int n);
 
-/* 
- * Is the heap empty?  How many nodes (data objects) are in it? 
+/*
+ * Is the heap empty?  How many nodes (data objects) are in it?
  */
 #ifdef MACRO_DEBUG
 SQUIDCEXTERN int heap_empty(heap *);
@@ -169,7 +169,7 @@ SQUIDCEXTERN int heap_nodes(heap *);
 #define        heap_empty(heap)        (((heap)->last <= 0) ? 1 : 0)
 #endif /* MACRO_DEBUG */
 
-/* 
+/*
  * Print the heap or a node in the heap.
  */
 SQUIDCEXTERN void heap_print(heap *);
index 5b18fb207c583a9a89d7fbd4cfc17a033ade8042..a7bf206224b4e14c0a19fc25a512cb083266a99a 100644 (file)
 #else
 
 /* char *
- * inet_ntop(af, src, dst, size)
- *      convert a network format address to presentation format.
- * return:
- *      pointer to presentation format address (`dst'), or NULL (see errno).
- * author:
- *      Paul Vixie, 1996.
- */
+* inet_ntop(af, src, dst, size)
+*      convert a network format address to presentation format.
+* return:
+*      pointer to presentation format address (`dst'), or NULL (see errno).
+* author:
+*      Paul Vixie, 1996.
+*/
 SQUIDCEXTERN const char * xinet_ntop(int af, const void *src, char *dst, size_t size);
 
 #endif
index 1a7dbeee65dcd51f8aadcbdbb6552120076de008..5c95540dfa73f0062c7328c4d701305e55fcdf61 100644 (file)
 #else
 
 /* int
- * inet_pton(af, src, dst)
- *      convert from presentation format (which usually means ASCII printable)
- *      to network format (which is usually some kind of binary format).
- * return:
- *      1 if the address was valid for the specified address family
- *      0 if the address wasn't valid (`dst' is untouched in this case)
- *      -1 if some other error occurred (`dst' is untouched in this case, too)
- * author:
- *      Paul Vixie, 1996.
- */
+* inet_pton(af, src, dst)
+*      convert from presentation format (which usually means ASCII printable)
+*      to network format (which is usually some kind of binary format).
+* return:
+*      1 if the address was valid for the specified address family
+*      0 if the address wasn't valid (`dst' is untouched in this case)
+*      -1 if some other error occurred (`dst' is untouched in this case, too)
+* author:
+*      Paul Vixie, 1996.
+*/
 SQUIDCEXTERN int xinet_pton(int af, const char *src, void *dst);
 
 #endif
index 2ef24733c309d2eb7761529e5edef22cea15483d..1550ab5a72bef225c81470355b6267a680aa905c 100644 (file)
@@ -7,8 +7,9 @@
 #include "config.h"
 
 /* object to track per-action memory usage (e.g. #idle objects) */
-class MemMeter {
-  public:
+class MemMeter
+{
+public:
     MemMeter() : level(0), hwater_level(0), hwater_stamp(0) {}
     ssize_t level;              /* current level (count or volume) */
     ssize_t hwater_level;       /* high water mark */
index 049c9057e5973cce6622b07914949ec28d0e7db5..b51beac51fa8325bdc5d6b73f42fd6681edcb58d 100644 (file)
@@ -9,12 +9,12 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -156,10 +156,10 @@ typedef struct _ntlm_authenticate {
 } ntlm_authenticate;
 
 const char *ntlm_make_challenge(char *domain, char *domain_controller,
-    char *challenge_nonce, int challenge_nonce_len);
+                                char *challenge_nonce, int challenge_nonce_len);
 lstring ntlm_fetch_string(char *packet, int32_t length, strhdr * str);
 void ntlm_add_to_payload(char *payload, int *payload_length,
-    strhdr * hdr, char *toadd,
-    int toadd_length, int base_offset);
+                         strhdr * hdr, char *toadd,
+                         int toadd_length, int base_offset);
 
 #endif /* SQUID_NTLMAUTH_H */
index 63e13263fc17a3fe84827923b2f73745c6dfd401..80dd242525d1794322e79e3133d16d606b3d04c5 100644 (file)
@@ -9,13 +9,13 @@
 
                       All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of CMU not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -67,7 +67,8 @@ struct snmp_mib_tree {
 #define TYPE_NULL          10
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     void init_mib(char *);
@@ -79,9 +80,9 @@ extern "C" {
     void sprint_value(char *, oid *, int, struct variable_list *);
     void print_value(oid *, int, struct variable_list *);
 
-/*void print_variable_list(struct variable_list *); */
-/*void print_variable_list_value(struct variable_list *); */
-/*void print_type(struct variable_list *); */
+    /*void print_variable_list(struct variable_list *); */
+    /*void print_variable_list_value(struct variable_list *); */
+    /*void print_type(struct variable_list *); */
     void print_oid_nums(oid *, int);
 
     struct snmp_mib_tree *read_mib(char *);
index c6ab231361ddf4dc3ca1ba554b4db8165139837e..49768f0bf975dcdc1d2d57a43dbe25b682bd1e6a 100644 (file)
@@ -37,7 +37,7 @@ get_tick(void)
     uint32_t lo, hi;
     // Based on an example in Wikipedia
     /* We cannot use "=A", since this would use %rax on x86_64 */
-    asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
+asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
     return (hrtime_t)hi << 32 | lo;
 }
 
@@ -185,8 +185,7 @@ typedef struct _xprof_stats_node xprof_stats_node;
 
 typedef struct _xprof_stats_data xprof_stats_data;
 
-struct _xprof_stats_data
-{
+struct _xprof_stats_data {
     hrtime_t start;
     hrtime_t stop;
     hrtime_t delta;
@@ -197,8 +196,7 @@ struct _xprof_stats_data
     int64_t summ;
 };
 
-struct _xprof_stats_node
-{
+struct _xprof_stats_node {
     const char *name;
     xprof_stats_data accu;
     xprof_stats_data hist;
index e74131e9a0f64ac669e7b54d7aedb16b992b4405..060150f1711864966e0b854622381069365877d6 100644 (file)
@@ -46,8 +46,7 @@
  * Radix search tree node layout.
  */
 
-struct squid_radix_node
-{
+struct squid_radix_node {
 
     struct squid_radix_mask *rn_mklist;        /* list of masks contained in subtree */
 
@@ -93,8 +92,7 @@ struct squid_radix_node
  * Annotations to tree concerning potential routes applying to subtrees.
  */
 
-struct squid_radix_mask
-{
+struct squid_radix_mask {
     short rm_b;                        /* bit offset; -1-index(netmask) */
     char rm_unused;            /* cf. rn_bmask */
     unsigned char rm_flags;    /* cf. rn_flags */
@@ -108,8 +106,7 @@ struct squid_radix_mask
     int rm_refs;               /* # of references to this struct */
 };
 
-struct squid_radix_node_head
-{
+struct squid_radix_node_head {
 
     struct squid_radix_node *rnh_treetop;
     int rnh_addrsize;          /* permit, but not require fixed keys */
index 1f5d1a9eb268e46fac5bfd037f55ccd212a63b7f..3a8119e1356617901014afe38e63f3bfeb9556c3 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 #ifndef SQUID_RFC1035_H
 #define SQUID_RFC1035_H
@@ -94,19 +94,19 @@ struct _rfc1035_message {
 };
 
 SQUIDCEXTERN ssize_t rfc1035BuildAQuery(const char *hostname,
-    char *buf,
-    size_t sz,
-    unsigned short qid,
-    rfc1035_query * query);
+                                        char *buf,
+                                        size_t sz,
+                                        unsigned short qid,
+                                        rfc1035_query * query);
 SQUIDCEXTERN ssize_t rfc1035BuildPTRQuery(const struct in_addr,
-    char *buf,
-    size_t sz,
-    unsigned short qid,
-    rfc1035_query * query);
+        char *buf,
+        size_t sz,
+        unsigned short qid,
+        rfc1035_query * query);
 SQUIDCEXTERN void rfc1035SetQueryID(char *, unsigned short qid);
 SQUIDCEXTERN int rfc1035MessageUnpack(const char *buf,
-    size_t sz,
-    rfc1035_message ** answer);
+                                      size_t sz,
+                                      rfc1035_message ** answer);
 SQUIDCEXTERN int rfc1035QueryCompare(const rfc1035_query *, const rfc1035_query *);
 SQUIDCEXTERN void rfc1035RRDestroy(rfc1035_rr ** rr, int n);
 SQUIDCEXTERN void rfc1035MessageDestroy(rfc1035_message ** message);
@@ -119,18 +119,18 @@ SQUIDCEXTERN const char *rfc1035_error_message;
 #define RFC1035_CLASS_IN 1
 
 
-    /* Child Library RFC3596 Depends on some otherwise internal functions */
+/* Child Library RFC3596 Depends on some otherwise internal functions */
 SQUIDCEXTERN int rfc1035HeaderPack(char *buf,
-    size_t sz,
-    rfc1035_message * hdr);
+                                   size_t sz,
+                                   rfc1035_message * hdr);
 SQUIDCEXTERN int rfc1035HeaderUnpack(const char *buf,
-    size_t sz,
-    unsigned int *off,
-    rfc1035_message * h);
+                                     size_t sz,
+                                     unsigned int *off,
+                                     rfc1035_message * h);
 SQUIDCEXTERN int rfc1035QuestionPack(char *buf,
-     size_t sz,
-    const char *name,
-    const unsigned short type,
-    const unsigned short _class);
+                                     size_t sz,
+                                     const char *name,
+                                     const unsigned short type,
+                                     const unsigned short _class);
 
 #endif /* SQUID_RFC1035_H */
index e1662ef81055445d19defe77e763f90b6867ebc6..d5c7e1b6a2cb8476f207cdd4c2f71e2f787729e5 100644 (file)
@@ -21,7 +21,7 @@
  */
 #define RFC2181_MAXHOSTNAMELEN 256
 
- /// Back-port macro for old squid code still using SQUIDHOSTNAMELEN without RFC reference.
+/// Back-port macro for old squid code still using SQUIDHOSTNAMELEN without RFC reference.
 #define SQUIDHOSTNAMELEN       RFC2181_MAXHOSTNAMELEN
 
 #endif /* _SQUID_INCLUDE_RFC1123_H */
index f52156c5f1a116ca3c93b1aa2dd74f3a430e0b41..e44e3126cc8727c15090ea843f982fdff47f43cf 100644 (file)
@@ -5,7 +5,7 @@
  * The following copyright and licence statement covers all changes made to the
  * reference implementation.
  *
- * Key changes to the reference implementation were: 
+ * Key changes to the reference implementation were:
  * alteration to a plain C layout.
  * Create CvtBin function
  * Allow CalcHA1 to make use of precaculated username:password:realm hash's
index e5df1304110f7a210a73e09604799e6b2935a204..94125ecdd2fb77fd0a68b3c0e18f09817c84dc7a 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 #ifndef SQUID_RFC3596_H
index 020342f6d603f56bd411615f942ce6acd3c7b9e0..f3891edecfaa0942910682789c910e86dc72bbed 100644 (file)
@@ -5,9 +5,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -15,7 +15,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -23,9 +23,9 @@
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * $Id: snmp-internal.h,v 1.4 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 #define SNMP_PORT          161
index 33e56ca04ef7a325717475ebeac85028b23610cb..eeabf39e0004db975a10a414ad4a31cbf22b7281 100644 (file)
@@ -5,9 +5,9 @@
 /***************************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -15,7 +15,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
- * 
+ *
  * $Id: snmp-mib.h,v 1.4 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  ***************************************************************************/
 
 #include <asn1.h>              /* Need OID Definition */
index 2dc97322275933cf97a2371f3e43b31dd1dc5ced..33b2578b267f5439237419d60aaead5b0b561b17 100644 (file)
@@ -8,9 +8,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -18,7 +18,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -26,9 +26,9 @@
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * $Id: snmp.h,v 1.16 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 #if HAVE_SYS_TYPES_H
index 80caab04bc68c25489944eab936053935636ea17..3df9d406c1d9791cd9b15cf4d80d5cefdd712988 100644 (file)
 
                       All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of CMU not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -52,7 +52,8 @@ SOFTWARE.
 #define SNMP_DEFAULT_MACREPEATERS   0
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     /* Parse the buffer pointed to by arg3, of length arg4, into pdu arg2.
@@ -60,122 +61,122 @@ extern "C" {
      * Returns the community of the incoming PDU, or NULL
      */
     u_char *snmp_parse(struct snmp_session *, struct snmp_pdu *,
-       u_char *, int);
+                       u_char *, int);
 
-/* Encode pdu arg2 into buffer arg3.  arg4 contains the size of
- * the buffer.
- */
+    /* Encode pdu arg2 into buffer arg3.  arg4 contains the size of
    * the buffer.
    */
     int snmp_build(struct snmp_session *, struct snmp_pdu *,
-       u_char *, int *);
+                   u_char *, int *);
 
-/*
- * struct snmp_session *snmp_open(session)
- *      struct snmp_session *session;
- * 
- * Sets up the session with the snmp_session information provided
- * by the user.  Then opens and binds the necessary UDP port.
- * A handle to the created session is returned (this is different than
- * the pointer passed to snmp_open()).  On any error, NULL is returned
- * and snmp_errno is set to the appropriate error code.
- */
+    /*
    * struct snmp_session *snmp_open(session)
    *      struct snmp_session *session;
+     *
    * Sets up the session with the snmp_session information provided
    * by the user.  Then opens and binds the necessary UDP port.
    * A handle to the created session is returned (this is different than
    * the pointer passed to snmp_open()).  On any error, NULL is returned
    * and snmp_errno is set to the appropriate error code.
    */
 #if 0
     struct snmp_session *snmp_open(struct snmp_session *);
 
-/*
- * int snmp_close(session)
- *     struct snmp_session *session;
- * 
- * Close the input session.  Frees all data allocated for the session,
- * dequeues any pending requests, and closes any sockets allocated for
- * the session.  Returns 0 on error, 1 otherwise.
- */
+    /*
    * int snmp_close(session)
    *     struct snmp_session *session;
+     *
    * Close the input session.  Frees all data allocated for the session,
    * dequeues any pending requests, and closes any sockets allocated for
    * the session.  Returns 0 on error, 1 otherwise.
    */
     int snmp_close(struct snmp_session *);
 
 
-/*
- * int snmp_send(session, pdu)
- *     struct snmp_session *session;
- *     struct snmp_pdu  *pdu;
- * 
- * Sends the input pdu on the session after calling snmp_build to create
- * a serialized packet.  If necessary, set some of the pdu data from the
- * session defaults.  Add a request corresponding to this pdu to the list
- * of outstanding requests on this session, then send the pdu.
- * Returns the request id of the generated packet if applicable, otherwise 1.
- * On any error, 0 is returned.
- * The pdu is freed by snmp_send() unless a failure occured.
- */
+    /*
    * int snmp_send(session, pdu)
    *     struct snmp_session *session;
    *     struct snmp_pdu  *pdu;
+     *
    * Sends the input pdu on the session after calling snmp_build to create
    * a serialized packet.  If necessary, set some of the pdu data from the
    * session defaults.  Add a request corresponding to this pdu to the list
    * of outstanding requests on this session, then send the pdu.
    * Returns the request id of the generated packet if applicable, otherwise 1.
    * On any error, 0 is returned.
    * The pdu is freed by snmp_send() unless a failure occured.
    */
     int snmp_send(struct snmp_session *, struct snmp_pdu *);
 
-/*
- * void snmp_read(fdset)
- *     fd_set  *fdset;
- * 
- * Checks to see if any of the fd's set in the fdset belong to
- * snmp.  Each socket with it's fd set has a packet read from it
- * and snmp_parse is called on the packet received.  The resulting pdu
- * is passed to the callback routine for that session.  If the callback
- * routine returns successfully, the pdu and it's request are deleted.
- */
+    /*
    * void snmp_read(fdset)
    *     fd_set  *fdset;
+     *
    * Checks to see if any of the fd's set in the fdset belong to
    * snmp.  Each socket with it's fd set has a packet read from it
    * and snmp_parse is called on the packet received.  The resulting pdu
    * is passed to the callback routine for that session.  If the callback
    * routine returns successfully, the pdu and it's request are deleted.
    */
     void snmp_read(fd_set *);
 
 
-/*
- * int snmp_select_info(numfds, fdset, timeout, block)
- * int *numfds;
- * fd_set   *fdset;
- * struct timeval *timeout;
- * int *block;
- *
- * Returns info about what snmp requires from a select statement.
- * numfds is the number of fds in the list that are significant.
- * All file descriptors opened for SNMP are OR'd into the fdset.
- * If activity occurs on any of these file descriptors, snmp_read
- * should be called with that file descriptor set.
- *
- * The timeout is the latest time that SNMP can wait for a timeout.  The
- * select should be done with the minimum time between timeout and any other
- * timeouts necessary.  This should be checked upon each invocation of select.
- * If a timeout is received, snmp_timeout should be called to check if the
- * timeout was for SNMP.  (snmp_timeout is idempotent)
- *
- * Block is 1 if the select is requested to block indefinitely, rather than time out.
- * If block is input as 1, the timeout value will be treated as undefined, but it must
- * be available for setting in snmp_select_info.  On return, if block is true, the value
- * of timeout will be undefined.
- *
- * snmp_select_info returns the number of open sockets.  (i.e. The number of sessions open)
- */
+    /*
    * int snmp_select_info(numfds, fdset, timeout, block)
    * int *numfds;
    * fd_set   *fdset;
    * struct timeval *timeout;
    * int *block;
    *
    * Returns info about what snmp requires from a select statement.
    * numfds is the number of fds in the list that are significant.
    * All file descriptors opened for SNMP are OR'd into the fdset.
    * If activity occurs on any of these file descriptors, snmp_read
    * should be called with that file descriptor set.
    *
    * The timeout is the latest time that SNMP can wait for a timeout.  The
    * select should be done with the minimum time between timeout and any other
    * timeouts necessary.  This should be checked upon each invocation of select.
    * If a timeout is received, snmp_timeout should be called to check if the
    * timeout was for SNMP.  (snmp_timeout is idempotent)
    *
    * Block is 1 if the select is requested to block indefinitely, rather than time out.
    * If block is input as 1, the timeout value will be treated as undefined, but it must
    * be available for setting in snmp_select_info.  On return, if block is true, the value
    * of timeout will be undefined.
    *
    * snmp_select_info returns the number of open sockets.  (i.e. The number of sessions open)
    */
     int snmp_select_info(int *, fd_set *, struct timeval *, int *);
 
-/*
- * void snmp_timeout();
- * 
- * snmp_timeout should be called whenever the timeout from snmp_select_info expires,
- * but it is idempotent, so snmp_timeout can be polled (probably a cpu expensive
- * proposition).  snmp_timeout checks to see if any of the sessions have an
- * outstanding request that has timed out.  If it finds one (or more), and that
- * pdu has more retries available, a new packet is formed from the pdu and is
- * resent.  If there are no more retries available, the callback for the session
- * is used to alert the user of the timeout.
- */
+    /*
    * void snmp_timeout();
+     *
    * snmp_timeout should be called whenever the timeout from snmp_select_info expires,
    * but it is idempotent, so snmp_timeout can be polled (probably a cpu expensive
    * proposition).  snmp_timeout checks to see if any of the sessions have an
    * outstanding request that has timed out.  If it finds one (or more), and that
    * pdu has more retries available, a new packet is formed from the pdu and is
    * resent.  If there are no more retries available, the callback for the session
    * is used to alert the user of the timeout.
    */
     void snmp_timeout(void);
 
 
-/*
- * This routine must be supplied by the application:
- *
- * int callback(operation, session, reqid, pdu, magic)
- * int operation;
- * struct snmp_session *session;    The session authenticated under.
- * int reqid;                       The request id of this pdu (0 for TRAP)
- * struct snmp_pdu *pdu;            The pdu information.
- * void *magic                      A link to the data for this routine.
- *
- * Returns 1 if request was successful, 0 if it should be kept pending.
- * Any data in the pdu must be copied because it will be freed elsewhere.
- * Operations are defined below:
- */
+    /*
    * This routine must be supplied by the application:
    *
    * int callback(operation, session, reqid, pdu, magic)
    * int operation;
    * struct snmp_session *session;    The session authenticated under.
    * int reqid;                       The request id of this pdu (0 for TRAP)
    * struct snmp_pdu *pdu;            The pdu information.
    * void *magic                      A link to the data for this routine.
    *
    * Returns 1 if request was successful, 0 if it should be kept pending.
    * Any data in the pdu must be copied because it will be freed elsewhere.
    * Operations are defined below:
    */
 
 
 
index 3fbd14073b166a028f3676ebb53246636d9e6a0a..a138bd8ed883e0d3c2e59ce3970f7d0870d26e57 100644 (file)
@@ -5,9 +5,9 @@
 /***************************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -15,7 +15,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
- * 
+ *
  * $Id: snmp_api_error.h,v 1.5 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  ***************************************************************************/
 
 /* Error return values */
 #define SNMPERR_LAST            -16    /* Last error message */
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-/* extern int snmp_errno */
+    /* extern int snmp_errno */
 
     const char *snmp_api_error(int);
     int snmp_api_errno(void);
index c761f7aaff4ea460c517036b132920acafd71443..8c0223af6adcf5f1ad6e178b95d586911ff48779 100644 (file)
 
                       All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of CMU not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -85,7 +85,8 @@ struct snmp_internal_session {
 #endif /* HAVE_SRAND */
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     int snmp_get_socket_session(struct snmp_session *session_);
index 3158e34931119f89caca32701848da7c90904b89..73836fc09d9b34a65093592910d52fcd2c340095 100644 (file)
 
                       All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of CMU not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -32,7 +32,7 @@ SOFTWARE.
 struct synch_state {
     int waiting;
     int status;
-/* status codes */
+    /* status codes */
 #define STAT_SUCCESS   0
 #define STAT_ERROR     1
 #define STAT_TIMEOUT 2
@@ -41,20 +41,21 @@ struct synch_state {
 };
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     extern struct synch_state snmp_synch_state;
 
-/* Synchronize Input with Agent */
+    /* Synchronize Input with Agent */
     int snmp_synch_input(int, struct snmp_session *, int,
-       struct snmp_pdu *, void *);
+                         struct snmp_pdu *, void *);
 
-/* Synchronize Response with Agent */
+    /* Synchronize Response with Agent */
     int snmp_synch_response(struct snmp_session *, struct snmp_pdu *,
-       struct snmp_pdu **);
+                            struct snmp_pdu **);
 
-/* Synchronize Setup */
+    /* Synchronize Setup */
     void snmp_synch_setup(struct snmp_session *);
 
 #ifdef __cplusplus
index 4095345fa55a13e0685eaec7f44e42d53fd383b4..562a174ca2f9f94868b9f1c6914ee1dbe1345c8e 100644 (file)
@@ -5,9 +5,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -15,7 +15,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
- * 
+ *
  * $Id: snmp_coexist.h,v 1.4 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     int snmp_coexist_V2toV1(struct snmp_pdu *);
index 03c5c51b18039b27df2c26c735510d27664ae9c6..5447fed228f9d0bdb988ce50256dba4473bd8671 100644 (file)
@@ -5,9 +5,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -15,7 +15,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -23,9 +23,9 @@
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * $Id: snmp_error.h,v 1.5 2003/01/23 00:36:47 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 /*
@@ -56,7 +56,8 @@
 
 #ifdef __cplusplus
 
-extern "C" {
+extern "C"
+{
 #endif
 
     const char *snmp_errstring(int);
index 83ff0f10030c9f6e533f80e3b4fa68165f352948..a91f29187d2601aff36c7f2139e8a9c68fae15be 100644 (file)
 
                       All Rights Reserved
 
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
+both that copyright notice and this permission notice appear in
 supporting documentation, and that the name of CMU not be
 used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
+software without specific, written prior permission.
 
 CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
index 42900372abecf16a56e83529a82519e38384c9c3..d6be7c18979731aaf30b1c47881010c8e789b94d 100644 (file)
@@ -7,9 +7,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -17,7 +17,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
- * 
+ *
  * $Id: snmp_msg.h,v 1.4 2003/01/23 00:36:48 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 #define SNMP_VERSION_1     0   /* RFC 1157 */
 #define SNMP_VERSION_2     1   /* RFC 1901 */
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-u_char *snmp_msg_Encode(u_char *, int *, u_char *, int, int, struct snmp_pdu *);
-u_char *snmp_msg_Decode(u_char *, int *, u_char *, int *, int *, struct snmp_pdu *);
+    u_char *snmp_msg_Encode(u_char *, int *, u_char *, int, int, struct snmp_pdu *);
+    u_char *snmp_msg_Decode(u_char *, int *, u_char *, int *, int *, struct snmp_pdu *);
 
 #ifdef __cplusplus
 }
index ffab5b8e0a6d78242d867e03345685ace7b6aedc..ceb181ed9322de607cdd1b079c93b87792060f97 100644 (file)
@@ -13,9 +13,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -23,7 +23,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
- * 
+ *
  * $Id: snmp_pdu.h,v 1.11 2003/01/23 00:36:48 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-typedef struct sockaddr_in ipaddr;
+    typedef struct sockaddr_in ipaddr;
 
-/* An SNMP PDU */
-struct snmp_pdu {
-    int command;               /* Type of this PDU */
-    ipaddr address;            /* Address of peer */
+    /* An SNMP PDU */
+    struct snmp_pdu {
+        int command;           /* Type of this PDU */
+        ipaddr address;                /* Address of peer */
 
-    int reqid;                 /* Integer32: Request id */
-    int errstat;               /* INTEGER:   Error status */
-    int errindex;              /* INTEGER:   Error index */
+        int reqid;                     /* Integer32: Request id */
+        int errstat;           /* INTEGER:   Error status */
+        int errindex;          /* INTEGER:   Error index */
 
-    /* SNMPv2 Bulk Request */
-    int non_repeaters;         /* INTEGER: */
-    int max_repetitions;       /* INTEGER: */
+        /* SNMPv2 Bulk Request */
+        int non_repeaters;             /* INTEGER: */
+        int max_repetitions;   /* INTEGER: */
 
-    struct variable_list *variables;   /* Variable Bindings */
+        struct variable_list *variables;       /* Variable Bindings */
 
-    /* Trap information */
-    oid *enterprise;           /* System OID */
-    int enterprise_length;
-    ipaddr agent_addr;         /* address of object generating trap */
-    int trap_type;             /* generic trap type */
-    int specific_type;         /* specific type */
-    u_int time;                        /* Uptime */
-};
+        /* Trap information */
+        oid *enterprise;               /* System OID */
+        int enterprise_length;
+        ipaddr agent_addr;             /* address of object generating trap */
+        int trap_type;         /* generic trap type */
+        int specific_type;             /* specific type */
+        u_int time;                    /* Uptime */
+    };
 
-struct snmp_pdu *snmp_pdu_create(int);
-struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *);
-struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int);
-struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int);
-void snmp_free_pdu(struct snmp_pdu *);
-void snmp_pdu_free(struct snmp_pdu *);
+    struct snmp_pdu *snmp_pdu_create(int);
+    struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *);
+    struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int);
+    struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int);
+    void snmp_free_pdu(struct snmp_pdu *);
+    void snmp_pdu_free(struct snmp_pdu *);
 
-u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *);
-u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *);
+    u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *);
+    u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *);
 
     /* Add a NULL Variable to a PDU */
-void snmp_add_null_var(struct snmp_pdu *, oid *, int);
-
-/* RFC 1905: Protocol Operations for SNMPv2
- *
- * RFC 1157: A Simple Network Management Protocol (SNMP)
- *
- * PDU Types
- */
+    void snmp_add_null_var(struct snmp_pdu *, oid *, int);
+
+    /* RFC 1905: Protocol Operations for SNMPv2
    *
    * RFC 1157: A Simple Network Management Protocol (SNMP)
    *
    * PDU Types
    */
 #define SNMP_PDU_GET       (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
 #define SNMP_PDU_GETNEXT    (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
 #define SNMP_PDU_RESPONSE   (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
@@ -106,12 +107,12 @@ void snmp_add_null_var(struct snmp_pdu *, oid *, int);
 #define SNMP_DEFAULT_ADDRESS       0
 #define SNMP_DEFAULT_REQID         0
 
-/* RFC 1907: Management Information Base for SNMPv2
- *
- * RFC 1157: A Simple Network Management Protocol (SNMP)
- *
- * Trap Types
- */
+    /* RFC 1907: Management Information Base for SNMPv2
    *
    * RFC 1157: A Simple Network Management Protocol (SNMP)
    *
    * Trap Types
    */
 #if UNUSED_CODE
 #define SNMP_TRAP_COLDSTART             (0x0)
 #define SNMP_TRAP_WARMSTART             (0x1)
index c8d77250bc4bc6c469a2df3564f151482524e425..b6d1805eb74dd7057e4030d42969fc20e33303fd 100644 (file)
@@ -7,9 +7,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -17,7 +17,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -25,9 +25,9 @@
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * $Id: snmp_session.h,v 1.5 2003/01/23 00:36:48 robertc Exp $
- * 
+ *
  **********************************************************************/
 
 struct snmp_session {
index dc0fec111ef1daa73a1734c43a10a885abc2769b..28432e20cb1b12255eda9426139c683480c6657b 100644 (file)
@@ -7,50 +7,51 @@
 #include "config.h"
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-/* call a function at regular intervals (in seconds): */
-extern void snmp_alarm(int ival, void (*handler) (void));
+    /* call a function at regular intervals (in seconds): */
+    extern void snmp_alarm(int ival, void (*handler) (void));
 
 
-/* service for filedescriptors: */
+    /* service for filedescriptors: */
 
-extern void fd_add(int fd, void (*func) (int fd));
-extern void fd_service(void);
+    extern void fd_add(int fd, void (*func) (int fd));
+    extern void fd_service(void);
 
 
-/* ---------------------------------------------------------------------- */
+    /* ---------------------------------------------------------------------- */
 
-/*
- * SNMP Agent extension for Spacer-Controler Management
- *
- * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy
- */
+    /*
    * SNMP Agent extension for Spacer-Controler Management
    *
    * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy
    */
 
 
-/* Function to safely copy a string, and ensure the last
- * character is always '\0'. */
-void strcpy_safe(char *str, int str_len, char *val);
+    /* Function to safely copy a string, and ensure the last
    * character is always '\0'. */
+    void strcpy_safe(char *str, int str_len, char *val);
 
-/* Function to get IP address of this agent
- * WARNING: this scans all interfaces (slow) */
-u_long Util_local_ip_address(void);
+    /* Function to get IP address of this agent
    * WARNING: this scans all interfaces (slow) */
+    u_long Util_local_ip_address(void);
 
-/* Function to get the current time in seconds */
-long Util_time_now(void);
+    /* Function to get the current time in seconds */
+    long Util_time_now(void);
 
-/* Function to determine how long the agent has been running
- * (WARNING: this seems rather slow) */
-long Util_time_running();
+    /* Function to determine how long the agent has been running
    * (WARNING: this seems rather slow) */
+    long Util_time_running();
 
-/* Read data from file */
-int Util_file_read(char *file, int offset, char *data, int dataSz);
+    /* Read data from file */
+    int Util_file_read(char *file, int offset, char *data, int dataSz);
 
-/* Write data into file */
-int Util_file_write(char *file, int offset, char *data, int dataSz);
+    /* Write data into file */
+    int Util_file_write(char *file, int offset, char *data, int dataSz);
 
-/* ---------------------------------------------------------------------- */
+    /* ---------------------------------------------------------------------- */
 
 #ifdef __cplusplus
 }
index c2ad04dd95ec2950186c1a7279fc2280bfc022e6..4ccfcea231b7110013f89716519772a62123875b 100644 (file)
@@ -4,9 +4,9 @@
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
- * 
+ *
  *                       All Rights Reserved
- * 
+ *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted,
  * provided that the above copyright notice appear in all copies and that
@@ -14,7 +14,7 @@
  * supporting documentation, and that the name of CMU not be
  * used in advertising or publicity pertaining to distribution of the
  * software without specific, written prior permission.
- * 
+ *
  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
- * 
+ *
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
- * 
+ *
  * $Id: snmp_vars.h,v 1.14 2007/12/14 23:11:44 amosjeffries Exp $
- * 
+ *
  **********************************************************************/
 
 #include "asn1.h"
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-struct variable_list {
-    struct variable_list *next_variable;       /* NULL for last variable */
-    oid *name;                 /* Object identifier of variable */
-    int name_length;           /* number of subid's in name */
-    u_char type;               /* ASN type of variable */
-    union {                    /* value of variable */
-       int *integer;
-       u_char *string;
-       oid *objid;
-    } val;
-    int val_len;
-};
-
-struct variable_list *snmp_var_new(oid *, int);
-struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char);
-struct variable_list *snmp_var_clone(struct variable_list *);
-void snmp_var_free(struct variable_list *);
-
-u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int);
-u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
+    struct variable_list {
+        struct variable_list *next_variable;   /* NULL for last variable */
+        oid *name;                     /* Object identifier of variable */
+        int name_length;               /* number of subid's in name */
+        u_char type;           /* ASN type of variable */
+        union {                        /* value of variable */
+            int *integer;
+            u_char *string;
+            oid *objid;
+        } val;
+        int val_len;
+    };
+
+    struct variable_list *snmp_var_new(oid *, int);
+    struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char);
+    struct variable_list *snmp_var_clone(struct variable_list *);
+    void snmp_var_free(struct variable_list *);
+
+    u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int);
+    u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
 
 #define MAX_NAME_LEN   64      /* number of subid's in a objid */
 
-/* RFC 1902: Structure of Management Information for SNMPv2
- *
- * Defined Types
- */
+    /* RFC 1902: Structure of Management Information for SNMPv2
    *
    * Defined Types
    */
 #define SMI_INTEGER     ASN_INTEGER
 #define SMI_STRING      ASN_OCTET_STR
 #define SMI_OBJID       ASN_OBJECT_ID
@@ -75,11 +76,11 @@ u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
 #define SMI_COUNTER64  (ASN_APPLICATION | 6)   /* INTEGER */
 
 
-/* constants for enums for the MIB nodes
- * cachePeerAddressType (InetAddressType / ASN_INTEGER)
- * cacheClientAddressType (InetAddressType / ASN_INTEGER)
- * Defined Types
- */
+    /* constants for enums for the MIB nodes
    * cachePeerAddressType (InetAddressType / ASN_INTEGER)
    * cacheClientAddressType (InetAddressType / ASN_INTEGER)
    * Defined Types
    */
 
 #ifndef INETADDRESSTYPE_ENUMS
 #define INETADDRESSTYPE_ENUMS
@@ -94,28 +95,28 @@ u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
 #endif                          /* INETADDRESSTYPE_ENUMS */
 
 
-/*
- * RFC 1905: Protocol Operations for SNMPv2
- * 
- * Variable binding.
- * 
- * VarBind ::= 
- *   SEQUENCE {
- *     name ObjectName
- *     CHOICE {
- *       value ObjectSyntax
- *       unSpecified NULL
- *       noSuchObject[0] NULL
- *       noSuchInstance[1] NULL
- *       endOfMibView[2] NULL
- *     }
- *   }
- */
+    /*
    * RFC 1905: Protocol Operations for SNMPv2
+     *
    * Variable binding.
+     *
+     * VarBind ::=
    *   SEQUENCE {
    *     name ObjectName
    *     CHOICE {
    *       value ObjectSyntax
    *       unSpecified NULL
    *       noSuchObject[0] NULL
    *       noSuchInstance[1] NULL
    *       endOfMibView[2] NULL
    *     }
    *   }
    */
 #define SMI_NOSUCHOBJECT   (ASN_CONTEXT | ASN_PRIMITIVE | 0x0) /* noSuchObject[0] */
 #define SMI_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x1) /* noSuchInstance[1] */
 #define SMI_ENDOFMIBVIEW   (ASN_CONTEXT | ASN_PRIMITIVE | 0x2) /* endOfMibView[2] */
-typedef struct variable variable;
-typedef struct variable_list variable_list;
+    typedef struct variable variable;
+    typedef struct variable_list variable_list;
 
 #ifdef __cplusplus
 }
index cca55b33317bc56aff2ac5afeb4c1aa05a1fdd90..ec8e80375d21f62115ad06bf386183514661a534 100644 (file)
@@ -33,7 +33,7 @@ public:
     SplayNode<V> const * finish() const;
 
     SplayNode<V> * remove
-        (const Value data, SPLAYCMP * compare);
+    (const Value data, SPLAYCMP * compare);
 
     SplayNode<V> * insert(Value data, SPLAYCMP * compare);
 
@@ -61,14 +61,14 @@ public:
     typedef void SPLAYFREE(Value &);
     typedef SplayIterator<V> iterator;
     typedef const SplayConstIterator<V> const_iterator;
-    Splay():head(NULL), elements (0){}
+    Splay():head(NULL), elements (0) {}
 
     mutable SplayNode<V> * head;
     template <class FindValue> Value const *find (FindValue const &, int( * compare)(FindValue const &a, Value const &b)) const;
     void insert(Value const &, SPLAYCMP *compare);
 
     void remove
-        (Value const &, SPLAYCMP *compare);
+    (Value const &, SPLAYCMP *compare);
 
     void destroy(SPLAYFREE *);
 
@@ -159,7 +159,7 @@ SplayNode<V>::destroy(SPLAYFREE * free_func)
 template<class V>
 SplayNode<V> *
 SplayNode<V>::remove
-    (Value const dataToRemove, SPLAYCMP * compare)
+(Value const dataToRemove, SPLAYCMP * compare)
 {
     if (this == NULL)
         return NULL;
@@ -312,7 +312,7 @@ Splay<V>::insert(Value const &value, SPLAYCMP *compare)
 template <class V>
 void
 Splay<V>::remove
-    (Value const &value, SPLAYCMP *compare)
+(Value const &value, SPLAYCMP *compare)
 {
     assert (find (value, compare));
 
index 05c46c3801fce0ff28f1bfd0a56934c144473f1a..a6f0b899f692e95b1d2607660b2abad783d7f50e 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 #ifndef SQUID_ENDIAN_H
@@ -61,7 +61,7 @@
 /*
  * Some systems define bswap_16() and bswap_32() in <byteswap.h>
  *
- * Some systems define bswap16() and bswap32() in <sys/bswap.h>.  
+ * Some systems define bswap16() and bswap32() in <sys/bswap.h>.
  *
  * Some systems define htobe16()/be16toh() and friends in <sys/endian.h>.
  */
 #    define le16toh(x) bswap16(x)
 #    define le32toh(x) bswap32(x)
 #  else /* ! WORDS_BIGENDIAN */
-       /*
-        * XXX: What about unusual byte orders like 3412 or 2143 ?
-        *      Nothing else in squid seems to care about them,
-        *      so we don't worry about them here either.
-        */
+/*
+* XXX: What about unusual byte orders like 3412 or 2143 ?
+*      Nothing else in squid seems to care about them,
+*      so we don't worry about them here either.
+*/
 #    define htole16(x) (x)
 #    define htole32(x) (x)
 #    define le16toh(x) (x)
 #    define le32toh(x) (x)
 #  endif /* ! WORDS_BIGENDIAN */
 #endif /* ! HAVE_HTOLE16 && ! defined(htole16) */
+
 #endif /* SQUID_ENDIAN_H */
index b035499e8c66e1b089e5d90a27b6cf71f69ccb36..abae268fb54e618e491683d48a153f99e75cef04 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -188,24 +188,23 @@ struct group {
 };
 
 struct statfs {
-   long    f_type;     /* type of filesystem (see below) */
-   long    f_bsize;    /* optimal transfer block size */
-   long    f_blocks;   /* total data blocks in file system */
-   long    f_bfree;    /* free blocks in fs */
-   long    f_bavail;   /* free blocks avail to non-superuser */
-   long    f_files;    /* total file nodes in file system */
-   long    f_ffree;    /* free file nodes in fs */
-   long    f_fsid;     /* file system id */
-   long    f_namelen;  /* maximum length of filenames */
-   long    f_spare[6]; /* spare for later */
+    long    f_type;     /* type of filesystem (see below) */
+    long    f_bsize;    /* optimal transfer block size */
+    long    f_blocks;   /* total data blocks in file system */
+    long    f_bfree;    /* free blocks in fs */
+    long    f_bavail;   /* free blocks avail to non-superuser */
+    long    f_files;    /* total file nodes in file system */
+    long    f_ffree;    /* free file nodes in fs */
+    long    f_fsid;     /* file system id */
+    long    f_namelen;  /* maximum length of filenames */
+    long    f_spare[6]; /* spare for later */
 };
 
 #ifndef HAVE_GETTIMEOFDAY
-struct timezone 
-  {
+struct timezone {
     int        tz_minuteswest; /* minutes west of Greenwich */
     int        tz_dsttime;     /* type of dst correction */
-  };
+};
 #endif
 
 #define CHANGE_FD_SETSIZE 1
@@ -245,7 +244,7 @@ typedef char * caddr_t;
 #undef FD_READ
 #undef FD_WRITE
 #define EISCONN WSAEISCONN
-#define EINPROGRESS WSAEINPROGRESS 
+#define EINPROGRESS WSAEINPROGRESS
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #define EALREADY WSAEALREADY
 #define ETIMEDOUT WSAETIMEDOUT
@@ -297,14 +296,14 @@ typedef char * caddr_t;
 
 /* internal to Microsoft CRTLIB */
 typedef struct {
-        long osfhnd;    /* underlying OS file HANDLE */
-        char osfile;    /* attributes of file (e.g., open in text mode?) */
-        char pipech;    /* one char buffer for handles opened on pipes */
+    long osfhnd;    /* underlying OS file HANDLE */
+    char osfile;    /* attributes of file (e.g., open in text mode?) */
+    char pipech;    /* one char buffer for handles opened on pipes */
 #ifdef _MT
-        int lockinitflag;
-        CRITICAL_SECTION lock;
+    int lockinitflag;
+    CRITICAL_SECTION lock;
 #endif  /* _MT */
-    }   ioinfo;
+}   ioinfo;
 #define IOINFO_L2E          5
 #define IOINFO_ARRAY_ELTS   (1 << IOINFO_L2E)
 #define _pioinfo(i) ( __pioinfo[(i) >> IOINFO_L2E] + ((i) & (IOINFO_ARRAY_ELTS - 1)) )
@@ -337,18 +336,17 @@ int close(int fd)
     int l_so_type_siz = sizeof(l_so_type);
     SOCKET sock = _get_osfhandle(fd);
 
-    if (::getsockopt(sock, SOL_SOCKET, SO_TYPE, l_so_type, &l_so_type_siz) == 0){
+    if (::getsockopt(sock, SOL_SOCKET, SO_TYPE, l_so_type, &l_so_type_siz) == 0) {
         int result = 0;
-           if (closesocket(sock) == SOCKET_ERROR) {
-               errno = WSAGetLastError();
-               result = 1;
-           }
-           _free_osfhnd(fd);
-           _osfile(fd) = 0;
-           return result;
-    }
-    else
-           return _close(fd);
+        if (closesocket(sock) == SOCKET_ERROR) {
+            errno = WSAGetLastError();
+            result = 1;
+        }
+        _free_osfhnd(fd);
+        _osfile(fd) = 0;
+        return result;
+    } else
+        return _close(fd);
 }
 
 #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
@@ -376,9 +374,9 @@ int read(int fd, void * buf, size_t siz)
     SOCKET sock = _get_osfhandle(fd);
 
     if (::getsockopt(sock, SOL_SOCKET, SO_TYPE, l_so_type, &l_so_type_siz) == 0)
-       return ::recv(sock, (char FAR *) buf, (int)siz, 0);
+        return ::recv(sock, (char FAR *) buf, (int)siz, 0);
     else
-       return _read(fd, buf, (unsigned int)siz);
+        return _read(fd, buf, (unsigned int)siz);
 }
 
 inline
@@ -389,19 +387,20 @@ int write(int fd, const void * buf, size_t siz)
     SOCKET sock = _get_osfhandle(fd);
 
     if (::getsockopt(sock, SOL_SOCKET, SO_TYPE, l_so_type, &l_so_type_siz) == 0)
-       return ::send(sock, (char FAR *) buf, siz, 0);
+        return ::send(sock, (char FAR *) buf, siz, 0);
     else
-       return _write(fd, buf, siz);
+        return _write(fd, buf, siz);
 }
 
-inline 
+inline
 char *index(const char *s, int c)
 {
     return (char *)strchr(s,c);
 }
 
 /** \cond AUTODOCS-IGNORE */
-namespace Squid {
+namespace Squid
+{
 /** \endcond */
 
 inline
@@ -409,43 +408,39 @@ int accept(int s, struct sockaddr * a, size_t * l)
 {
     SOCKET result;
     if ((result = ::accept(_get_osfhandle(s), a, (int *)l)) == INVALID_SOCKET) {
-       if (WSAEMFILE == (errno = WSAGetLastError()))
-           errno = EMFILE;
-       return -1;
-    }
-    else
-       return _open_osfhandle(result, 0);
+        if (WSAEMFILE == (errno = WSAGetLastError()))
+            errno = EMFILE;
+        return -1;
+    } else
+        return _open_osfhandle(result, 0);
 }
 
 inline
 int bind(int s, struct sockaddr * n, int l)
 {
     if (::bind(_get_osfhandle(s),n,l) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 
 inline
 int connect(int s, const struct sockaddr * n, int l)
 {
     if (::connect(_get_osfhandle(s),n,l) == SOCKET_ERROR) {
-       if (WSAEMFILE == (errno = WSAGetLastError()))
-           errno = EMFILE;
-       return -1;
-    }
-    else
-       return 0;
+        if (WSAEMFILE == (errno = WSAGetLastError()))
+            errno = EMFILE;
+        return -1;
+    } else
+        return 0;
 }
 
-inline 
-struct hostent * gethostbyname (const char *n)
-{
-    HOSTENT FAR * result; 
+inline
+struct hostent * gethostbyname (const char *n) {
+    HOSTENT FAR * result;
     if ((result = ::gethostbyname(n)) == NULL)
-       errno = WSAGetLastError();
+        errno = WSAGetLastError();
     return result;
 }
 #define gethostbyname(n) Squid::gethostbyname(n)
@@ -455,7 +450,7 @@ SERVENT FAR* getservbyname (const char * n, const char * p)
 {
     SERVENT FAR * result;
     if ((result = ::getservbyname(n, p)) == NULL)
-       errno = WSAGetLastError();
+        errno = WSAGetLastError();
     return result;
 }
 #define getservbyname(n,p) Squid::getservbyname(n,p)
@@ -465,7 +460,7 @@ HOSTENT FAR * gethostbyaddr(const char * a, int l, int t)
 {
     HOSTENT FAR * result;
     if ((result = ::gethostbyaddr(a, l, t)) == NULL)
-       errno = WSAGetLastError();
+        errno = WSAGetLastError();
     return result;
 }
 #define gethostbyaddr(a,l,t) Squid::gethostbyaddr(a,l,t)
@@ -474,22 +469,20 @@ inline
 int getsockname(int s, struct sockaddr * n, size_t * l)
 {
     if ((::getsockname(_get_osfhandle(s), n, (int *)l)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 
 inline
 int gethostname(char * n, size_t l)
 {
     if ((::gethostname(n, l)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 #define gethostname(n,l) Squid::gethostname(n,l)
 
@@ -498,11 +491,10 @@ int getsockopt(int s, int l, int o, void * v, int * n)
 {
     Sleep(1);
     if ((::getsockopt(_get_osfhandle(s), l, o,(char *) v, n)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 
 /* Simple ioctl() emulation */
@@ -510,34 +502,31 @@ inline
 int ioctl(int s, int c, void * a)
 {
     if ((::ioctlsocket(_get_osfhandle(s), c, (u_long FAR *)a)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 
 inline
 int ioctlsocket(int s, long c, u_long FAR * a)
 {
     if ((::ioctlsocket(_get_osfhandle(s), c, a)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 
 inline
 int listen(int s, int b)
 {
     if (::listen(_get_osfhandle(s), b) == SOCKET_ERROR) {
-       if (WSAEMFILE == (errno = WSAGetLastError()))
-           errno = EMFILE;
-       return -1;
-    }
-    else
-       return 0;
+        if (WSAEMFILE == (errno = WSAGetLastError()))
+            errno = EMFILE;
+        return -1;
+    } else
+        return 0;
 }
 #define listen(s,b) Squid::listen(s,b)
 
@@ -546,10 +535,9 @@ int recv(int s, void * b, size_t l, int f)
 {
     int result;
     if ((result = ::recv(_get_osfhandle(s), (char *)b, l, f)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
+        errno = WSAGetLastError();
         return -1;
-    }
-    else
+    } else
         return result;
 }
 
@@ -558,10 +546,9 @@ int recvfrom(int s, void * b, size_t l, int f, struct sockaddr * fr, size_t * fl
 {
     int result;
     if ((result = ::recvfrom(_get_osfhandle(s), (char *)b, l, f, fr, (int *)fl)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
+        errno = WSAGetLastError();
+        return -1;
+    } else
         return result;
 }
 
@@ -570,10 +557,9 @@ int select(int n, fd_set * r, fd_set * w, fd_set * e, struct timeval * t)
 {
     int result;
     if ((result = ::select(n,r,w,e,t)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
+        errno = WSAGetLastError();
+        return -1;
+    } else
         return result;
 }
 #define select(n,r,w,e,t) Squid::select(n,r,w,e,t)
@@ -583,10 +569,9 @@ int send(int s, const void * b, size_t l, int f)
 {
     int result;
     if ((result = ::send(_get_osfhandle(s), (char *)b, l, f)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
+        errno = WSAGetLastError();
+        return -1;
+    } else
         return result;
 }
 
@@ -595,10 +580,9 @@ int sendto(int s, const void * b, size_t l, int f, const struct sockaddr * t, in
 {
     int result;
     if ((result = ::sendto(_get_osfhandle(s), (char *)b, l, f, t, tl)) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
+        errno = WSAGetLastError();
+        return -1;
+    } else
         return result;
 }
 
@@ -612,8 +596,7 @@ int setsockopt(SOCKET s, int l, int o, const char * v, int n)
     if (::setsockopt(socket, l, o, v, n) == SOCKET_ERROR) {
         errno = WSAGetLastError();
         return -1;
-    }
-    else
+    } else
         return 0;
 }
 #define setsockopt(s,l,o,v,n) Squid::setsockopt(s,l,o,v,n)
@@ -622,11 +605,10 @@ inline
 int shutdown(int s, int h)
 {
     if (::shutdown(_get_osfhandle(s),h) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
-       return 0;
+        errno = WSAGetLastError();
+        return -1;
+    } else
+        return 0;
 }
 
 inline
@@ -634,12 +616,11 @@ int socket(int f, int t, int p)
 {
     SOCKET result;
     if ((result = ::socket(f, t, p)) == INVALID_SOCKET) {
-       if (WSAEMFILE == (errno = WSAGetLastError()))
-           errno = EMFILE;
-       return -1;
-    }
-    else
-       return _open_osfhandle(result, 0);
+        if (WSAEMFILE == (errno = WSAGetLastError()))
+            errno = EMFILE;
+        return -1;
+    } else
+        return _open_osfhandle(result, 0);
 }
 #define socket(f,t,p) Squid::socket(f,t,p)
 
@@ -647,10 +628,9 @@ inline
 int WSAAsyncSelect(int s, HWND h, unsigned int w, long e)
 {
     if (::WSAAsyncSelect(_get_osfhandle(s), h, w, e) == SOCKET_ERROR) {
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
+        errno = WSAGetLastError();
+        return -1;
+    } else
         return 0;
 }
 
@@ -663,29 +643,26 @@ int WSADuplicateSocket(int s, DWORD n, LPWSAPROTOCOL_INFO l)
 #else
     if (::WSADuplicateSocketA(_get_osfhandle(s), n, l) == SOCKET_ERROR) {
 #endif
-       errno = WSAGetLastError();
-       return -1;
-    }
-    else
+        errno = WSAGetLastError();
+        return -1;
+    } else
         return 0;
 }
 
 #undef WSASocket
 inline
-int WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f)
-{
+int WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f) {
     SOCKET result;
 #ifdef UNICODE
     if ((result = ::WSASocketW(a, t, p, i, g, f)) == INVALID_SOCKET) {
 #else
     if ((result = ::WSASocketA(a, t, p, i, g, f)) == INVALID_SOCKET) {
 #endif
-       if (WSAEMFILE == (errno = WSAGetLastError()))
-           errno = EMFILE;
-       return -1;
-    }
-    else
-       return _open_osfhandle(result, 0);
+        if (WSAEMFILE == (errno = WSAGetLastError()))
+            errno = EMFILE;
+        return -1;
+    } else
+        return _open_osfhandle(result, 0);
 }
 
 } /* namespace Squid */
@@ -721,22 +698,22 @@ int WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f)
 #define        RUSAGE_CHILDREN -1              /* terminated child processes */
 
 struct rusage {
-       struct timeval ru_utime;        /* user time used */
-       struct timeval ru_stime;        /* system time used */
-       long ru_maxrss;                 /* integral max resident set size */
-       long ru_ixrss;                  /* integral shared text memory size */
-       long ru_idrss;                  /* integral unshared data size */
-       long ru_isrss;                  /* integral unshared stack size */
-       long ru_minflt;                 /* page reclaims */
-       long ru_majflt;                 /* page faults */
-       long ru_nswap;                  /* swaps */
-       long ru_inblock;                /* block input operations */
-       long ru_oublock;                /* block output operations */
-       long ru_msgsnd;                 /* messages sent */
-       long ru_msgrcv;                 /* messages received */
-       long ru_nsignals;               /* signals received */
-       long ru_nvcsw;                  /* voluntary context switches */
-       long ru_nivcsw;                 /* involuntary context switches */
+    struct timeval ru_utime;   /* user time used */
+    struct timeval ru_stime;   /* system time used */
+    long ru_maxrss;                    /* integral max resident set size */
+    long ru_ixrss;                     /* integral shared text memory size */
+    long ru_idrss;                     /* integral unshared data size */
+    long ru_isrss;                     /* integral unshared stack size */
+    long ru_minflt;                    /* page reclaims */
+    long ru_majflt;                    /* page faults */
+    long ru_nswap;                     /* swaps */
+    long ru_inblock;           /* block input operations */
+    long ru_oublock;           /* block output operations */
+    long ru_msgsnd;                    /* messages sent */
+    long ru_msgrcv;                    /* messages received */
+    long ru_nsignals;          /* signals received */
+    long ru_nvcsw;                     /* voluntary context switches */
+    long ru_nivcsw;                    /* involuntary context switches */
 };
 
 #undef ACL
index 4492d2ebb6f3b301f3a671aded97d440c6a31109..017c46d36af5df1daf5115a4184d9515bf334ff1 100644 (file)
@@ -9,12 +9,12 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 #include <netinet/in_systm.h>
 #endif
 
-/* 
+/*
  * ISO C99 Standard printf() macros for 64 bit integers
  * On some 64 bit platform, HP Tru64 is one, for printf must be used
- * "%lx" instead of "%llx" 
+ * "%lx" instead of "%llx"
  */
 #ifndef PRId64
 #ifdef _SQUID_MSWIN_           /* Windows native port using MSVCRT */
index 5b0e72cfad0bff41331086a7b3c9fb0d693f71c8..1a83a04ca1241fd439439743b6c06c5d3d9cfebc 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
index 4357c85a767956da7b86d3d01272372f06d0b4d4..4fa0a12689878d56b3bd1aa2a6b7790f547c3749 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
index b896debc9fbb3ff317e0fc99f0b4358e3b7e7336..40d2ad22e2a3a50be2a6fe5213b5785491c4d417 100644 (file)
 
 /**
 \par
-   Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
-   If one is found, it is overwritten with a NULL, and *STRINGP is advanced
-   to point to the next char after it.  Otherwise, *STRINGP is set to NULL.
-   If *STRINGP was already NULL, nothing happens.
-   Returns the old value of *STRINGP.
+Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
+If one is found, it is overwritten with a NULL, and *STRINGP is advanced
+to point to the next char after it.  Otherwise, *STRINGP is set to NULL.
+If *STRINGP was already NULL, nothing happens.
+Returns the old value of *STRINGP.
 \par
-   This is a variant of strtok() that is multithread-safe and supports
-   empty fields.
+This is a variant of strtok() that is multithread-safe and supports
+empty fields.
 
 \note   Caveat: It modifies the original string.
 \note   Caveat: These functions cannot be used on constant strings.
 \note   Caveat: The identity of the delimiting character is lost.
 \note   Caveat: It doesn't work with multibyte strings unless all of the delimiter
-                characters are ASCII characters < 0x30.
+characters are ASCII characters < 0x30.
 
-   See also strtok_r().
- */
+See also strtok_r().
+*/
 SQUIDCEXTERN char *strsep(char **stringp, const char *delim);
 
 #endif /* HAVE_STRSEP */
index 01f9fb3c8f30a25d6d93a6d89f524fdfabb0b3f5..92e8edd044b689e0135b9847624d2288c4621976 100644 (file)
 #else
 
 /**
- \par
- * Convert a string to a int64 integer.
- \par
- * Ignores `locale' stuff.  Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
+\par
+* Convert a string to a int64 integer.
+\par
+* Ignores `locale' stuff.  Assumes that the upper and lower case
+* alphabets and digits are each contiguous.
+*/
 SQUIDCEXTERN int64_t strtoll(const char *nptr, char **endptr, int base);
 
 #endif /* !HAVE_STRTOLL */
index 1de398b62811b9c3c4300bf77f25bb3584a0230c..7a1a34c2b9ed46bedfc0dc3a89e96c4558e5a8af 100644 (file)
@@ -9,12 +9,12 @@
  * modify it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * The GNU C Library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Library General Public
  * License along with the GNU C Library; see the file COPYING.LIB.  If
  * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
index 07a1a5a2e04c1ab1b72b7eca370027ea2c11092b..d3f1d34f4641ddd02ff443b169b4b634d14616c5 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 #ifndef SQUID_UTIL_H
@@ -73,7 +73,7 @@ SQUIDCEXTERN void Tolower(char *);
 SQUIDCEXTERN void xfree(void *);
 SQUIDCEXTERN void xxfree(const void *);
 #ifdef __cplusplus
-/* 
+/*
  * Any code using libstdc++ must have externally resolvable overloads
  * for void * operator new - which means in the .o for the binary,
  * or in a shared library. static libs don't propogate the symbol
@@ -82,7 +82,7 @@ SQUIDCEXTERN void xxfree(const void *);
  */
 #ifndef _SQUID_EXTERNNEW_
 #if defined(_SQUID_SGI_) && !defined(_GNUC_)
-/* 
+/*
  * The gcc compiler treats extern inline functions as being extern,
  * while the SGI MIPSpro compilers treat them as inline. To get equivalent
  * behavior, remove the inline keyword.