Codebase indented by me and gnu-indent draft
authorMarkus Bröker <mbroeker@largo.homelinux.org>
Sat, 03 Jan 2009 01:28:28 +0100
changeset 4 fdf04a93faeb
parent 3 724e07a9f155
child 5 70980306fd61
Codebase indented by me and gnu-indent
PacketWriter.cpp
build
include/PacketParser.h
include/PacketReader.h
include/PacketWriter.h
include/monitor.h
include/readerthread.h
include/tools.h
main.cpp
monitor.cpp
readerthread.cpp
--- a/PacketWriter.cpp
+++ b/PacketWriter.cpp
@@ -11,7 +11,9 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-} PacketWriter::PacketWriter (char *hostname, int port)
+};
+
+PacketWriter::PacketWriter (char *hostname, int port)
 {
     unsigned int size;
     unsigned int fd;
--- a/build
+++ b/build
@@ -4,7 +4,7 @@
 # 
 
 rm -rf .moc .obj Makefile
-find -name *~ -exec rm -f {} \;
+find -name '*~' -exec rm -f {} \;
 
 rm -f *.o
 qmake-qt4 -project .ui
--- a/include/PacketParser.h
+++ b/include/PacketParser.h
@@ -17,7 +17,9 @@
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
 #include <netinet/ip_icmp.h>
-} class PacketParser:public PacketReader {
+};
+
+class PacketParser:public PacketReader {
   public:
     PacketParser (int tm = 500);
       PacketParser (std::string);
--- a/include/PacketReader.h
+++ b/include/PacketReader.h
@@ -33,5 +33,4 @@
     bool ready ();
     bool dataAvailable ();
 };
-
 #endif
--- a/include/PacketWriter.h
+++ b/include/PacketWriter.h
@@ -4,7 +4,8 @@
  */
 
 #ifndef PACKETWRITER_H
-#define PACKETWRITER_H 0x20053008
+#define PACKETWRITER_H
+
 #include <PacketReader.h>
 
 #include <sys/socket.h>
--- a/include/monitor.h
+++ b/include/monitor.h
@@ -28,7 +28,6 @@
 
     public slots:virtual void startCapture ();
     virtual void stopCapture ();
-
 };
 
 #endif
--- a/include/readerthread.h
+++ b/include/readerthread.h
@@ -18,15 +18,15 @@
 class DataChangeEvent:public QEvent {
   public:
     DataChangeEvent (QString msg_)
-    :QEvent ((QEvent::Type) MSG_EVENT) {
+    : QEvent ((QEvent::Type) MSG_EVENT) {
         msg = msg_;
 
-    }
+    };
     QString Text () const {
         return msg;
-    }
+    };
   private:
-      QString msg;
+    QString msg;
 };
 
 class readerThread:public QThread {
@@ -36,5 +36,4 @@
   private:
       Monitor * handle;
 };
-
 #endif
--- a/include/tools.h
+++ b/include/tools.h
@@ -9,5 +9,4 @@
 #include <sstream>
 
 std::string itoa (const int &i);
-
 #endif
--- a/main.cpp
+++ b/main.cpp
@@ -4,6 +4,7 @@
  */
 
 #include <QApplication>
+#include <cstdlib>
 
 #include "include/monitor.h"
 #include <version.h>
--- a/monitor.cpp
+++ b/monitor.cpp
@@ -49,8 +49,7 @@
 
     try {
         reader = new readerThread (this);
-    }
-    catch (std::exception const &e) {
+    } catch (std::exception const &e) {
         textEdit->append (e.what ());
         reader = NULL;
     }
--- a/readerthread.cpp
+++ b/readerthread.cpp
@@ -32,8 +32,7 @@
                 }
             }
         }
-    }
-    catch (std::exception const &e) {
+    } catch (std::exception const &e) {
         dce = new DataChangeEvent (e.what ());
         QApplication::postEvent ((QObject *) handle, (QEvent *) dce);
         std::cerr << e.what () << std::endl;