Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 251486
Collapse All | Expand All

(-)bo2k_console-0.0.2preb/src/cmdhandler.h (+1 lines)
Lines 1-6 Link Here
1
/** @file
1
/** @file
2
 * Header file for the commands handler. */
2
 * Header file for the commands handler. */
3
3
4
#include <cstring>
4
#include <string>
5
#include <string>
5
#include <map>
6
#include <map>
6
7
(-)bo2k_console-0.0.2preb/src/commands.cpp (+1 lines)
Lines 4-9 Link Here
4
#include "commands.h"
4
#include "commands.h"
5
#include "main.h"
5
#include "main.h"
6
#include "parser.h"
6
#include "parser.h"
7
#include <cstdlib>
7
#ifdef DEBUG
8
#ifdef DEBUG
8
#include <stdio.h>
9
#include <stdio.h>
9
#endif
10
#endif
(-)bo2k_console-0.0.2preb/src/inputloop.cpp (-13 / +12 lines)
Lines 1-5 Link Here
1
#include <iostream.h>
1
#include <iostream>
2
#include <string>
2
#include <cstring>
3
#include <cstdlib>
3
4
4
// For stat()
5
// For stat()
5
#include <sys/types.h>
6
#include <sys/types.h>
Lines 8-15 Link Here
8
#include <unistd.h>
9
#include <unistd.h>
9
#endif
10
#endif
10
#include <errno.h>
11
#include <errno.h>
11
#include <stdio.h>
12
#include <string.h>
13
12
14
#include "cmdhandler.h"
13
#include "cmdhandler.h"
15
#include "getline.h"
14
#include "getline.h"
Lines 37-43 int exec_file(const char* filename) { Link Here
37
				return 3;
36
				return 3;
38
		}
37
		}
39
38
40
		cout << buf << " : " <<  result.c_str() << endl;
39
		std::cout << buf << " : " <<  result.c_str() << std::endl;
41
	}
40
	}
42
	fclose(script);
41
	fclose(script);
43
	return error ? 2 : 0;
42
	return error ? 2 : 0;
Lines 96-111 int inputloop() { Link Here
96
95
97
		switch (g_cmdHandler.evalLine(cmd, &result)) {
96
		switch (g_cmdHandler.evalLine(cmd, &result)) {
98
		case 2:
97
		case 2:
99
			cout << "Hope you enjoyed the Bo2k Console Client\n";
98
		      std::cout << "Hope you enjoyed the Bo2k Console Client\n";
100
			term = true;
99
		      term = true;
101
			break;
100
		      break;
102
		case -1:
101
		case -1:
103
			cerr << "Command '" << cmd << "' not known." <<
102
		      std::cerr << "Command '" << cmd << "' not known." <<
104
				"Type 'help' for a listing of known commands.\n";
103
			"Type 'help' for a listing of known commands.\n";
105
			break;
104
		      break;
106
		default:
105
		default:
107
			cout << result.c_str() << endl;
106
		      std::cout << result.c_str() << std::endl;
108
			break;
107
		      break;
109
		}
108
		}
110
	}
109
	}
111
	return 0;
110
	return 0;

Return to bug 251486