the good, old programming error:
* spoon= alloc(data, spoon);
* free(spoon); -> there is a spoon (missing)
Code indent with my buggy GNU Indent
* -> PLEASE GUYS, FIX IT!!
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/db_bridge/include/abstract_db.h
+++ b/db_bridge/include/abstract_db.h
@@ -17,7 +17,7 @@
std::string server;
public:
- typedef std::vector < std::vector<std::string> >DB_RESULT;
+ typedef std::vector <std::vector <std::string> >DB_RESULT;
typedef std::vector <std::string> DB_ROW;
virtual bool connect () = 0;
--- a/db_bridge/include/mysql_db.h
+++ b/db_bridge/include/mysql_db.h
@@ -17,9 +17,9 @@
MYSQL_RES *res;
public:
- MySQL_DB (std::string, std::string, std::string, std::string);
- virtual ~ MySQL_DB ();
- bool connect ();
- Abstract_DB::DB_RESULT query (std::string);
+ MySQL_DB (std::string, std::string, std::string, std::string);
+ virtual ~ MySQL_DB ();
+ bool connect ();
+ Abstract_DB::DB_RESULT query (std::string);
};
#endif
--- a/db_bridge/include/postgresql_db.h
+++ b/db_bridge/include/postgresql_db.h
@@ -16,12 +16,12 @@
private:
PGconn * conn;
PGresult *res;
- std::string conninfo;
+ std::string conninfo;
public:
- PostgreSQL_DB (std::string, std::string, std::string, std::string);
- virtual ~ PostgreSQL_DB ();
- bool connect ();
- Abstract_DB::DB_RESULT query (std::string);
+ PostgreSQL_DB (std::string, std::string, std::string, std::string);
+ virtual ~ PostgreSQL_DB ();
+ bool connect ();
+ Abstract_DB::DB_RESULT query (std::string);
};
#endif
--- a/libtest/func1.c
+++ b/libtest/func1.c
@@ -5,7 +5,7 @@
#include <stdio.h>
-void func1()
+void func1 ()
{
- printf("Func1: Implement me\n");
+ printf ("Func1: Implement me\n");
}
--- a/libtest/func2.c
+++ b/libtest/func2.c
@@ -5,7 +5,7 @@
#include <stdio.h>
-void func2()
+void func2 ()
{
- printf("Func2: Implement me\n");
+ printf ("Func2: Implement me\n");
}
--- a/libtest/main.c
+++ b/libtest/main.c
@@ -3,13 +3,13 @@
* Copyright (C) 2008 Markus Broeker
*/
-void func1();
-void func2();
+void func1 ();
+void func2 ();
-int main(int argc, char **argv)
+int main (int argc, char **argv)
{
- func1();
- func2();
+ func1 ();
+ func2 ();
- return 0;
+ return 0;
}
--- a/pmc/cube.cc
+++ b/pmc/cube.cc
@@ -32,8 +32,12 @@
void Cube::move (Vector location)
{
+ Vector *p_tmp;
+
for (int i = 0; i < 8; i++) {
- P[i] = new Vector (*P[i] + location);
+ p_tmp = new Vector (*P[i] + location);
+ delete P[i];
+ P[i] = p_tmp;
}
}
--- a/pmc/include/cube.h
+++ b/pmc/include/cube.h
@@ -15,10 +15,9 @@
Vector * P[8];
int height;
- Cube (Vector p1, Vector p2, Vector p3, Vector p4, int h);
- virtual ~ Cube ();
+ Cube (Vector p1, Vector p2, Vector p3, Vector p4, int h);
+ virtual ~ Cube ();
void show ();
void move (Vector);
};
-
#endif
--- a/pmc/include/object.h
+++ b/pmc/include/object.h
@@ -15,7 +15,7 @@
public:
virtual ~ Object () {
- std::cout << "Freeing Object " << name << std::endl;
- }
+ std::cout << "Freeing Object " << name << std::endl;
+ };
};
#endif
--- a/pmc/include/pmc.h
+++ b/pmc/include/pmc.h
@@ -19,8 +19,8 @@
public:
enum Mode { DEG, RAD, GRAD };
- Vector (int xx = 0, int yy = 0, int zz = 0);
- virtual ~ Vector ();
+ Vector (int xx = 0, int yy = 0, int zz = 0);
+ virtual ~ Vector ();
int X ();
int Y ();