Fixed whitespace in all files (no tabs)
[senf.git] / Packets / ParseInt.ih
index 48b5c9b..2eca988 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 //
-// Copyright (C) 2006 
+// Copyright (C) 2006
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
 //     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
@@ -30,7 +30,7 @@
 namespace senf {
 
 namespace impl {
-    
+
     ///////////////////////////////////////////////////////////////////////////
     // Integer operators
 
@@ -43,7 +43,7 @@ namespace impl {
         operator Value () const { return derived().value(); }
 
 #       define unary(op) \
-           Value operator op () const { return op derived().value(); }
+            Value operator op () const { return op derived().value(); }
 #       define mutator(op) \
             template <class Other> Derived const & operator op ## =  (Other other) \
                 { derived().value( derived().value() op other ); return derived(); }
@@ -65,7 +65,7 @@ namespace impl {
 
 #       undef unary
 #       undef mutator
-            
+
         Derived const & operator ++ ()
             { derived().value( derived.value()+1 ); return derived(); }
         Derived const & operator -- ()
@@ -80,10 +80,10 @@ namespace impl {
         Derived & derived() { return *static_cast<Derived *>(this); }
         Derived const & derived() const { return *static_cast<Derived const *>(this); };
     };
-    
+
     ///////////////////////////////////////////////////////////////////////////
     // Network byte order integer extraction
-    
+
     template <class Iterator>
     boost::uint16_t parse_uint16(Iterator const & i)
     {
@@ -134,13 +134,13 @@ namespace impl {
     {
         static boost::uint32_t parse(Iterator const & i) {
             return ( ( ( parse_uint32(i+offset+1)>>(40-end) ) // Beware of sign extension !!
-                       & boost::low_bits_mask_t<32-(40-end)>::sig_bits ) 
+                       & boost::low_bits_mask_t<32-(40-end)>::sig_bits )
                      | (i[offset]<<(32-(40-end))) )
                 & boost::low_bits_mask_t<end-start>::sig_bits;
         }
 
         static void write(Iterator const & i, boost::uint32_t v) {
-            write_uint32(i+offset+1, 
+            write_uint32(i+offset+1,
                          (parse_uint32(i+offset+1) & ~(boost::low_bits_mask_t<end-8>::sig_bits<<(40-end)))
                          | ((v & boost::low_bits_mask_t<end-8>::sig_bits) << (40-end)));
             i[offset] = (i[offset] & ~(boost::low_bits_mask_t<8-start>::sig_bits))
@@ -157,7 +157,7 @@ namespace impl {
         }
 
         static void write(Iterator const & i, boost::uint32_t v) {
-            write_uint32(i+offset, 
+            write_uint32(i+offset,
                          (parse_uint32(i+offset) & ~(boost::low_bits_mask_t<end-start>::sig_bits<<(32-end)))
                          | ((v & boost::low_bits_mask_t<end-start>::sig_bits) << (32-end)));
         }
@@ -172,7 +172,7 @@ namespace impl {
         }
 
         static void write(Iterator const & i, boost::uint32_t v) {
-            write_uint24(i+offset, 
+            write_uint24(i+offset,
                          (parse_uint24(i+offset) & ~(boost::low_bits_mask_t<end-start>::sig_bits<<(24-end)))
                          | ((v & boost::low_bits_mask_t<end-start>::sig_bits) << (24-end)));
         }
@@ -187,7 +187,7 @@ namespace impl {
         }
 
         static void write(Iterator const & i, boost::uint32_t v) {
-            write_uint16(i+offset, 
+            write_uint16(i+offset,
                          (parse_uint16(i+offset) & ~(boost::low_bits_mask_t<end-start>::sig_bits<<(16-end)))
                          | ((v & boost::low_bits_mask_t<end-start>::sig_bits) << (16-end)));
         }
@@ -197,7 +197,7 @@ namespace impl {
     struct parse_bitfield_i<Iterator, offset, 0, start, end>
     {
         static boost::uint32_t parse(Iterator const & i) {
-            return ( i[offset]>>(8-end) ) 
+            return ( i[offset]>>(8-end) )
                 & boost::low_bits_mask_t<end-start>::sig_bits;
         }
 
@@ -208,7 +208,7 @@ namespace impl {
     };
 
     template <class Iterator, unsigned start, unsigned end>
-    struct parse_bitfield 
+    struct parse_bitfield
         : public parse_bitfield_i<Iterator,start/8,(end-1)/8-start/8,start%8,end-8*(start/8)>
     {};
 
@@ -220,5 +220,8 @@ namespace impl {
 \f
 // Local Variables:
 // mode: c++
+// fill-column: 100
 // c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
 // End: