db_bridge/include/console.h
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:49:11 +0200
changeset 33 5e0a954f7c0b
parent 21 403742321c65
permissions -rw-r--r--
getpwnam_error: * getpwnam allocates memory for the struct and there is no way to free it. * it seems to be a bug in the library function. committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
#ifndef CONSOLE_H
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
#define CONSOLE_H
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
21
403742321c65 console functions work fine under linux and not under windows
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 20
diff changeset
     4
#ifdef WIN32
403742321c65 console functions work fine under linux and not under windows
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 20
diff changeset
     5
#define BS 127
403742321c65 console functions work fine under linux and not under windows
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 20
diff changeset
     6
#else
403742321c65 console functions work fine under linux and not under windows
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 20
diff changeset
     7
#define BS 127
403742321c65 console functions work fine under linux and not under windows
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 20
diff changeset
     8
#endif
403742321c65 console functions work fine under linux and not under windows
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 20
diff changeset
     9
19
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
#include <iostream>
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
namespace Console {
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
    int getch ();
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
    void getpass (std::string &);
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
};
933d86c1ff71 namespace console added for console tools, password entry and other stuff
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
#endif