equal
deleted
inserted
replaced
12 #include <cstdlib> |
12 #include <cstdlib> |
13 |
13 |
14 void usage (std::string progname) |
14 void usage (std::string progname) |
15 { |
15 { |
16 std::cout << "Benutzung: " << progname << " [-h] [-r <remotehost>] [-u <user>] [-p <password>] DATABASE\n"; |
16 std::cout << "Benutzung: " << progname << " [-h] [-r <remotehost>] [-u <user>] [-p <password>] DATABASE\n"; |
17 std::cout << "\t\t-r <remotehost>\t\tVerbindung zu Fremdrechner <remotehost>\n"; |
17 std::cout << "\t\t-r <remotehost>\t\tVerbindung zu Fremdrechner <remotehost>\n"; |
18 std::cout << "\t\t-u <user>\t\tAnmeldung als <user>\n"; |
18 std::cout << "\t\t-u <user>\t\tAnmeldung als <user>\n"; |
19 std::cout << "\t\t-p <password>\t\tAnmelden mit dem Passwort <password>\n"; |
19 std::cout << "\t\t-p <password>\t\tAnmelden mit dem Passwort <password>\n"; |
20 std::cout << "\n"; |
20 std::cout << "\n"; |
21 std::cout << "\t\tDATABASE\t\tVerbindung zur Datenbank DATABASE herstellen\n"; |
21 std::cout << "\t\tDATABASE\t\tVerbindung zur Datenbank DATABASE herstellen\n"; |
22 std::cout << "\nBerichten Sie Fehler oder Anregungen an mbroeker@largo.homelinux.org" << std::endl; |
22 std::cout << "\nBerichten Sie Fehler oder Anregungen an mbroeker@largo.homelinux.org" << std::endl; |
23 exit (0); |
23 exit (0); |
24 } |
24 } |
25 |
25 |
26 int main (int argc, char **argv) |
26 int main (int argc, char **argv) |
61 #else |
61 #else |
62 db = new MySQL_DB (host, user, pass, database); |
62 db = new MySQL_DB (host, user, pass, database); |
63 #endif |
63 #endif |
64 |
64 |
65 if (db->connect () == false) { |
65 if (db->connect () == false) { |
66 std::cerr << "Kann mich nicht zur Datenbank verbinden. Passwoerter falsch?" << std::endl; |
66 std::cerr << "Kann mich nicht zur Datenbank verbinden." << std::endl; |
67 return EXIT_FAILURE; |
67 return EXIT_FAILURE; |
68 } |
68 } |
69 |
69 |
70 for (;;) { |
70 for (;;) { |
71 std::cout << "DB_BRIDGE # "; |
71 std::cout << "DB_BRIDGE # "; |