summaryrefslogtreecommitdiff
path: root/games/znibbles/files/patch-src::Options.C
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2002-10-26 14:05:11 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2002-10-26 14:05:11 +0000
commitf8f04af8cae40a244ede4a3db744dee28c32a02a (patch)
treed7972e07690f0808e673c29177a612a5d2f62b58 /games/znibbles/files/patch-src::Options.C
parentCorrect RUN_DEPENDS. (diff)
Makes games/znibbles compiling again with gcc 3.2.1.
The patch has become somebody bigger than I was hoping for. And the original author is MIA... Approved by: Yin-Jieh Chen <yinjieh@csie.nctu.edu.tw> (maintainer)
Notes
Notes: svn path=/head/; revision=68869
Diffstat (limited to 'games/znibbles/files/patch-src::Options.C')
-rw-r--r--games/znibbles/files/patch-src::Options.C114
1 files changed, 114 insertions, 0 deletions
diff --git a/games/znibbles/files/patch-src::Options.C b/games/znibbles/files/patch-src::Options.C
new file mode 100644
index 000000000000..9eee99273470
--- /dev/null
+++ b/games/znibbles/files/patch-src::Options.C
@@ -0,0 +1,114 @@
+--- src/Options.C Wed May 12 11:40:13 1999
++++ src/Options.C Sat Oct 26 00:41:03 2002
+@@ -35,7 +35,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
+
+ #include "Options.H"
+
+@@ -150,7 +150,7 @@
+ case 'p':
+ _port = atoi(optarg);
+ if (_port == 0) { // cannot be 0
+- cerr << *argv << ": port: invalid argument: " << optarg << endl;
++ std::cerr << *argv << ": port: invalid argument: " << optarg << std::endl;
+ bad_params = true;
+ }
+ break;
+@@ -160,7 +160,7 @@
+ if (2 != (ooo = sscanf(optarg, "%dx%d", &_width, &_height)) ||
+ _height == 0 ||
+ _width == 0) {
+- cerr << *argv << ": size: invalid argument: " << optarg << endl;
++ std::cerr << *argv << ": size: invalid argument: " << optarg << std::endl;
+ bad_params = true;
+ }
+ break;
+@@ -168,8 +168,8 @@
+ case 'g': // height (server only)
+ _height = atoi(optarg);
+ if (_height == 0) { // cannot be 0
+- cerr << *argv << ": height: invalid argument: " << optarg \
+- << endl;
++ std::cerr << *argv << ": height: invalid argument: " << optarg \
++ << std::endl;
+ bad_params = true;
+ }
+ break;
+@@ -177,8 +177,8 @@
+ case 'w': // width (server only)
+ _width = atoi(optarg);
+ if (_width == 0) { // cannot be 0
+- cerr << *argv << ": width: invalid argument: " << optarg \
+- << endl;
++ std::cerr << *argv << ": width: invalid argument: " << optarg \
++ << std::endl;
+ bad_params = true;
+ }
+ break;
+@@ -194,7 +194,7 @@
+
+ if (_set == OPTIONS_CLIENT_SET) {
+ if (argv[optind] == NULL) {
+- cerr << *argv << ": missing player name" << endl;
++ std::cerr << *argv << ": missing player name" << std::endl;
+ bad_params = true;
+ }
+ else {
+@@ -208,7 +208,7 @@
+ if (p != 0)
+ _port = p;
+ else {
+- cerr << *argv << ": too many parameters: " << argv[optind] << endl;
++ std::cerr << *argv << ": too many parameters: " << argv[optind] << std::endl;
+ bad_params = true;
+ }
+ }
+@@ -227,34 +227,34 @@
+ options.set_option_set(0);
+
+ if (!options.parse(argc, argv)) {
+- cout << "usage: .... " << endl;
++ std::cout << "usage: .... " << std::endl;
+ delete &options;
+ return 1;
+ }
+
+ if (options.is_help()) {
+- cout << "help: ..." << endl;
++ std::cout << "help: ..." << std::endl;
+ delete &options;
+ return 0;
+ }
+
+ if (options.is_version()) {
+- cout << "... version ... " << endl;
++ std::cout << "... version ... " << std::endl;
+ delete &options;
+ return 0;
+ }
+
+- cout << "host: " << options.get_host_name() << ":" \
+- << options.get_port() << endl;
+- cout << "message_file: " << options.get_message_file() << endl;
+- cout << "twokey(" << options.is_twokey() << ") debug(" \
+- << options.is_debug() <<")" << endl;
++ std::cout << "host: " << options.get_host_name() << ":" \
++ << options.get_port() << std::endl;
++ std::cout << "message_file: " << options.get_message_file() << std::endl;
++ std::cout << "twokey(" << options.is_twokey() << ") debug(" \
++ << options.is_debug() <<")" << std::endl;
+
+ int i = options.get_nonoption_index();
+- cout << "argv left = " << endl;
++ std::cout << "argv left = " << std::endl;
+ argv += i;
+ while (*argv) {
+- cout << " " << *argv++ << endl;
++ std::cout << " " << *argv++ << std::endl;
+ }
+
+ delete &options;