diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2002-11-19 01:59:27 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2002-11-19 01:59:27 +0000 |
commit | a59bb3d05b881856f251eddf14de0af5e57b51c7 (patch) | |
tree | 8688d4e0956b5c75db6618fbb15037e6a02a8e88 /devel/picprog | |
parent | Make devel/picprog compiling under -current again. (diff) |
While we're at it, just upgrade to version 1.1 too.
Informed the author about the missing gcc 3.2.1 complaints.
Diffstat (limited to 'devel/picprog')
-rw-r--r-- | devel/picprog/Makefile | 4 | ||||
-rw-r--r-- | devel/picprog/distinfo | 2 | ||||
-rw-r--r-- | devel/picprog/files/patch-Makefile | 15 | ||||
-rw-r--r-- | devel/picprog/files/patch-ab | 31 | ||||
-rw-r--r-- | devel/picprog/files/patch-hexfile.cc | 332 | ||||
-rw-r--r-- | devel/picprog/files/patch-hexfile.h | 21 | ||||
-rw-r--r-- | devel/picprog/files/patch-main.cc | 48 | ||||
-rw-r--r-- | devel/picprog/files/patch-picport.cc | 56 | ||||
-rw-r--r-- | devel/picprog/files/patch-program.cc | 118 | ||||
-rw-r--r-- | devel/picprog/files/patch-program.h | 7 |
10 files changed, 35 insertions, 599 deletions
diff --git a/devel/picprog/Makefile b/devel/picprog/Makefile index 5e563b9d0df0..dfcd1d0f5450 100644 --- a/devel/picprog/Makefile +++ b/devel/picprog/Makefile @@ -6,8 +6,7 @@ # PORTNAME= picprog -PORTVERSION= 1.0.1 -PORTREVISION= 1 +PORTVERSION= 1.1 CATEGORIES= devel MASTER_SITES= http://hyvatti.iki.fi/~jaakko/pic/ @@ -15,6 +14,7 @@ MAINTAINER= ports@FreeBSD.org LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt +USE_GMAKE= yes MAN1= picprog.1 post-install: diff --git a/devel/picprog/distinfo b/devel/picprog/distinfo index 4154aaf8f5d4..78f480406b2b 100644 --- a/devel/picprog/distinfo +++ b/devel/picprog/distinfo @@ -1 +1 @@ -MD5 (picprog-1.0.1.tar.gz) = 10bf65cd881d2421953c25c9c876d687 +MD5 (picprog-1.1.tar.gz) = 9bbb81b7557037aa436f8652c28237e1 diff --git a/devel/picprog/files/patch-Makefile b/devel/picprog/files/patch-Makefile new file mode 100644 index 000000000000..36424d732611 --- /dev/null +++ b/devel/picprog/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig Thu Feb 7 21:33:59 2002 ++++ Makefile Tue Nov 19 12:55:52 2002 +@@ -26,9 +26,9 @@ + + # Please use a reasonably recent GNU make. + +-CXX=g++ +-CXXFLAGS=-g -O2 -Wall -W -Wwrite-strings -Wmissing-prototypes +-LDFLAGS= ++CXX?=g++ ++CXXFLAGS=-g -O2 -Wall -W -Wwrite-strings -Wmissing-prototypes -I/usr/local/include ++LDFLAGS= -L/usr/local/lib -lgnugetopt + + OBJS=main.o picport.o hexfile.o program.o + PROG=picprog diff --git a/devel/picprog/files/patch-ab b/devel/picprog/files/patch-ab deleted file mode 100644 index 501f7bc91d8f..000000000000 --- a/devel/picprog/files/patch-ab +++ /dev/null @@ -1,31 +0,0 @@ ---- Makefile.orig Mon Jun 2 06:37:54 1997 -+++ Makefile Sun Oct 31 09:02:37 1999 -@@ -28,9 +28,10 @@ - - VERSION=1.0 - --CXX=g++ --CXXFLAGS=-O2 -Wall -Wmissing-prototypes --LDFLAGS= -+CXX?=g++ -+CXXFLAGS?=-O2 -Wall -Wmissing-prototypes -+CXXFLAGS+=-I${LOCALBASE}/include -+LDFLAGS=-L${LOCALBASE}/lib -lgnugetopt - - OBJS=main.o picport.o hexfile.o program.o stringc.o - PROG=picprog -@@ -53,12 +54,5 @@ - $(PROG)-$(VERSION)/*.{html,gif,diff,1,h,cc} - - install: all -- install -c -o 0 -g 0 -m 755 -s $(PROG) /usr/local/bin/ -- install -c -o 0 -g 0 -m 644 *.1 /usr/local/man/man1/ -- --# --# include a dependency file if one exists --# --ifeq (.depend,$(wildcard .depend)) --include .depend --endif -+ ${BSD_INSTALL_PROGRAM} $(PROG) $(PREFIX)/bin -+ ${BSD_INSTALL_MAN} picprog.1 $(PREFIX)/man/man1 diff --git a/devel/picprog/files/patch-hexfile.cc b/devel/picprog/files/patch-hexfile.cc deleted file mode 100644 index a612a1393bd9..000000000000 --- a/devel/picprog/files/patch-hexfile.cc +++ /dev/null @@ -1,332 +0,0 @@ ---- hexfile.cc.orig Tue Nov 19 12:33:41 2002 -+++ hexfile.cc Tue Nov 19 12:38:17 2002 -@@ -28,8 +28,8 @@ - - */ - --#include <iostream.h> --#include <iomanip.h> -+#include <iostream> -+#include <iomanip> - #include <sysexits.h> - #include <string.h> - #include <ctype.h> -@@ -50,7 +50,7 @@ - - int hexfile::load (const char *name) - { -- ifstream f(name); -+ std::ifstream f(name); - char buf [128]; - int line = 0; - enum formats format = unknown; -@@ -59,14 +59,14 @@ - - if (!f) { - e = errno; -- cerr << name << ":unable to load hexfile:" << strerror (e) << endl; -+ std::cerr << name << ":unable to load hexfile:" << strerror (e) << std::endl; - return EX_NOINPUT; - } - while (f.get (buf, sizeof (buf))) { - line++; - char c; - if (f.get (c) && '\n' != c) { -- cerr << name << ':' << line << ":long input line\n"; -+ std::cerr << name << ':' << line << ":long input line\n"; - return EX_DATAERR; - } - int len = strlen (buf); -@@ -85,7 +85,7 @@ - - if (i || ':' != buf [0] || 3 != (len & 3) || len < 15 - || '0' != buf [7] || '0' != buf [8]) { -- cerr << name << ':' << line << ":invalid input line\n"; -+ std::cerr << name << ':' << line << ":invalid input line\n"; - return EX_DATAERR; - } - check = strtol (buf + len - 2, 0, 16); -@@ -99,15 +99,15 @@ - else if (words * 2 + 11 == len) - format = ihx8m; - else { -- cerr << name << ':' << line << -+ std::cerr << name << ':' << line << - ":unknown input format, only ihx8m and ihx16 accepted\n"; - return EX_DATAERR; - } - } - if (words * (ihx16 == format ? 4 : 2) + 11 != len) { -- cerr << name << ':' << line << ":line length mismatch:" -+ std::cerr << name << ':' << line << ":line length mismatch:" - << (ihx16 == format ? "ihx16 " : "ihx8m ") -- << words * (ihx16 == format ? 4 : 2) + 11 << " != " << len << endl; -+ << words * (ihx16 == format ? 4 : 2) + 11 << " != " << len << std::endl; - return EX_DATAERR; - } - sum = words + addr + (addr >> 8); -@@ -120,8 +120,8 @@ - || (addr >= 0x2000 && addr+words <= 0x2004) - || (addr == 0x2007 && words == 1) - || (addr >= 0x2100 && addr+words <= 0x2140))) { -- cerr << name << ':' << line << ":invalid address " << hex -- << setw(4) << setfill('0') << addr << dec -+ std::cerr << name << ':' << line << ":invalid address " << std::hex -+ << std::setw(4) << std::setfill('0') << addr << std::dec - << ", possibly not a pic16c84 hex file?\n"; - return EX_DATAERR; - } -@@ -135,20 +135,20 @@ - pgm [addr + words] = word; - } - if (sum + check & 0xff) { -- cerr << name << ':' << line << ":checksum mismatch\n"; -+ std::cerr << name << ':' << line << ":checksum mismatch\n"; - return EX_DATAERR; - } - } - e = errno; - if (!f.eof ()) { -- cerr << name << ':' << line << ':' << strerror (e) << ":\n"; -+ std::cerr << name << ':' << line << ':' << strerror (e) << ":\n"; - return EX_IOERR; - } -- cerr << name << ':' << line << ":warning:unexpected eof\n"; -+ std::cerr << name << ':' << line << ":warning:unexpected eof\n"; - return EX_OK; - } - --void hexfile::save_line (ofstream& f, int begin, int len, enum hexfile::formats format) const -+void hexfile::save_line (std::ofstream& f, int begin, int len, enum hexfile::formats format) const - { - int p_begin, p_len, sum, i; - -@@ -160,21 +160,21 @@ - p_len = len; - } - -- f << ':' << setw (2) << p_len << setw (4) << p_begin << "00"; -+ f << ':' << std::setw (2) << p_len << std::setw (4) << p_begin << "00"; - - sum = p_len + p_begin + (p_begin >> 8); - for (i = begin; i < begin + len; i++) { - int word = pgm [i]; - if (ihx8m == format) - word = (word & 0xff) << 8 | (word & 0xff00) >> 8; -- f << setw (4) << word; -+ f << std::setw (4) << word; - sum += word + (word >> 8); - } - -- f << setw (2) << (-sum & 0xff) << endl; -+ f << std::setw (2) << (-sum & 0xff) << std::endl; - } - --void hexfile::save_region (ofstream& f, int addr, int end, enum hexfile::formats format, bool skip_ones) const -+void hexfile::save_region (std::ofstream& f, int addr, int end, enum hexfile::formats format, bool skip_ones) const - { - int len; - -@@ -201,15 +201,15 @@ - - int hexfile::save (const char *name, enum hexfile::formats format, bool skip_ones) const - { -- ofstream f (name); -+ std::ofstream f (name); - int e; - - if (!f) { - e = errno; -- cerr << name << ":unable to open save file:" << strerror (e) << endl; -+ std::cerr << name << ":unable to open save file:" << strerror (e) << std::endl; - return EX_IOERR; - } -- f << hex << setfill ('0') << setiosflags (ios::uppercase); -+ f << std::hex << std::setfill ('0') << setiosflags (std::ios::uppercase); - - save_region (f, 0, 0x400, format, skip_ones); - save_region (f, 0x2000, 0x2004, format, skip_ones); -@@ -236,24 +236,24 @@ - && (retval = pic.command (data ? picport::data_from_data - : picport::data_from_prog)) != pgm [addr]) { - if (-1 == retval) { -- cerr << pic.port() << ':' << hex << setfill ('0') << setw (4) << addr -- << dec << ":unable to read pic while programming\n"; -+ std::cerr << pic.port() << ':' << std::hex << std::setfill ('0') << std::setw (4) << addr -+ << std::dec << ":unable to read pic while programming\n"; - return EX_IOERR; - } - pic.command (data ? picport::data_for_data : picport::data_for_prog, - pgm [addr]); - pic.command (picport::beg_prog); - -- cout << hex << setfill ('0') << setw (4) << addr << ' ' -- << setw (4) << pic.address () << ' ' -- << setw (4) << pgm [addr] << dec << endl; -+ std::cout << std::hex << std::setfill ('0') << std::setw (4) << addr << ' ' -+ << std::setw (4) << pic.address () << ' ' -+ << std::setw (4) << pgm [addr] << std::dec << std::endl; - - // verify, but do not verify fuses if Code Protect bit is cleared! - - if ((pic.address () != 0x2007 || pgm [addr] & 0x10) - && pgm [addr] != pic.command (data ? picport::data_from_data - : picport::data_from_prog)) { -- cerr << pic.port() << ':' << hex << setw (4) << setfill ('0') << addr << dec -+ std::cerr << pic.port() << ':' << std::hex << std::setw (4) << std::setfill ('0') << addr << std::dec - << ":unable to verify pic while programming.\n" - "Is code protection enabled? " - "Use --erase option to disable code protection.\n"; -@@ -280,21 +280,21 @@ - if (reset) { - pic.reset_code_protection (); - pic.reset (); -- cout << "Removed code protection.\n"; -+ std::cout << "Removed code protection.\n"; - } - -- cout << "Burning program eeprom,\n"; -+ std::cout << "Burning program eeprom,\n"; - while (pic.address () < 0x400) { - if (EX_OK != (retval = program_location (pic, pic.address (), false))) - return retval; - pic.command (picport::inc_addr); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - } - -- cout << "burning data eeprom,\n"; -+ std::cout << "burning data eeprom,\n"; - while (pic.address () < 0x440) { - if (EX_OK != (retval = program_location (pic, - pic.address () + 0x2100 - 0x400, -@@ -302,19 +302,19 @@ - return retval; - pic.command (picport::inc_addr); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - } - -- cout << "burning id words,\n"; -+ std::cout << "burning id words,\n"; - pic.command (picport::load_conf, 0x3fff); // dummy value - while (pic.address () < 0x2004) { - if (EX_OK != (retval = program_location (pic, pic.address (), false))) - return retval; - pic.command (picport::inc_addr); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - } -@@ -323,17 +323,17 @@ - pic.command (picport::inc_addr); - pic.command (picport::inc_addr); - -- cout << "burning fuses,\n"; -+ std::cout << "burning fuses,\n"; - if (EX_OK != (retval = program_location (pic, pic.address (), false))) - return retval; -- cout << "done.\n"; -+ std::cout << "done.\n"; - } // scope of pic - - signal (SIGTERM, save_t); - signal (SIGQUIT, save_q); - signal (SIGINT, save_i); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - -@@ -352,47 +352,47 @@ - { - picport pic (port); - -- cout << "Reading program eeprom,\n"; -+ std::cout << "Reading program eeprom,\n"; - while (pic.address () < 0x400) { - if (-1 == (pgm [pic.address ()] = pic.command (picport::data_from_prog))) { -- cerr << port << ':' << hex << setfill ('0') << setw (4) << pic.address () << dec -+ std::cerr << port << ':' << std::hex << std::setfill ('0') << std::setw (4) << pic.address () << std::dec - << ":unable to read pic\n"; - return EX_IOERR; - } - pic.command (picport::inc_addr); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - } - -- cout << "reading data eeprom,\n"; -+ std::cout << "reading data eeprom,\n"; - while (pic.address () < 0x440) { - if (-1 == (pgm [pic.address () + 0x2100-0x400] - = pic.command (picport::data_from_data))) { -- cerr << port << ':' << hex << setfill ('0') << setw (4) -- << pic.address () + 0x2100-0x400 << dec -+ std::cerr << port << ':' << std::hex << std::setfill ('0') << std::setw (4) -+ << pic.address () + 0x2100-0x400 << std::dec - << ":unable to read pic data memory\n"; - return EX_IOERR; - } - pic.command (picport::inc_addr); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - } - pic.command (picport::load_conf, 0); - -- cout << "reading id words,\n"; -+ std::cout << "reading id words,\n"; - while (pic.address () < 0x2004) { - if (-1 == (pgm [pic.address ()] = pic.command (picport::data_from_prog))) { -- cerr << port << ':' << hex << setfill ('0') << setw (4) << pic.address () << dec -+ std::cerr << port << ':' << std::hex << std::setfill ('0') << std::setw (4) << pic.address () << std::dec - << ":unable to read pic id words\n"; - return EX_IOERR; - } - pic.command (picport::inc_addr); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - } -@@ -402,20 +402,20 @@ - pic.command (picport::inc_addr); - - // fuses -- cout << "reading fuses,\n"; -+ std::cout << "reading fuses,\n"; - if (-1 == (pgm [pic.address ()] = pic.command (picport::data_from_prog))) { -- cerr << port << ':' << hex << setfill ('0') << setw (4) << pic.address () << dec -+ std::cerr << port << ':' << std::hex << std::setfill ('0') << std::setw (4) << pic.address () << std::dec - << ":unable to read pic fuses\n"; - return EX_IOERR; - } -- cout << "done.\n"; -+ std::cout << "done.\n"; - } // pic scope - - signal (SIGTERM, save_t); - signal (SIGQUIT, save_q); - signal (SIGINT, save_i); - if (got_signal) { -- cerr << "Exiting.\n"; -+ std::cerr << "Exiting.\n"; - return EX_UNAVAILABLE; - } - diff --git a/devel/picprog/files/patch-hexfile.h b/devel/picprog/files/patch-hexfile.h index 68ec751e92be..6a825944f086 100644 --- a/devel/picprog/files/patch-hexfile.h +++ b/devel/picprog/files/patch-hexfile.h @@ -1,6 +1,6 @@ ---- hexfile.h.orig Tue Nov 19 12:23:13 2002 -+++ hexfile.h Tue Nov 19 12:23:46 2002 -@@ -43,7 +43,7 @@ +--- hexfile.h.orig Tue Nov 19 12:49:44 2002 ++++ hexfile.h Tue Nov 19 12:50:20 2002 +@@ -43,10 +43,11 @@ #ifndef H_HEXFILE #define H_HEXFILE @@ -9,14 +9,7 @@ #include "picport.h" -@@ -57,8 +57,8 @@ - enum formats { unknown = 0, ihx8m, ihx16 }; - - private: -- void save_line (ofstream& f, int begin, int len, enum formats format) const; -- void save_region (ofstream& f, int addr, int end, enum formats format, bool skip_ones) const; -+ void save_line (std::ofstream& f, int begin, int len, enum formats format) const; -+ void save_region (std::ofstream& f, int addr, int end, enum formats format, bool skip_ones) const; - public: - - hexfile () { ++using namespace std; + class hexfile { + static const int size = 0x4000; + short pgm [size]; diff --git a/devel/picprog/files/patch-main.cc b/devel/picprog/files/patch-main.cc index 7df119152601..c80f425c9813 100644 --- a/devel/picprog/files/patch-main.cc +++ b/devel/picprog/files/patch-main.cc @@ -1,50 +1,10 @@ ---- main.cc.orig Sat May 31 17:21:37 1997 -+++ main.cc Tue Nov 19 12:31:55 2002 -@@ -28,9 +28,10 @@ +--- main.cc.orig Tue Nov 19 12:50:51 2002 ++++ main.cc Tue Nov 19 12:51:11 2002 +@@ -32,6 +32,7 @@ - */ - --#include <iostream.h> -+#include <iostream> #include <sysexits.h> #include <unistd.h> -+#define HAVE_DECL_GETOPT 0 ++#define HAVE_DECL_GETOPT 1 #include <getopt.h> #include "hexfile.h" -@@ -105,7 +106,7 @@ - } - - if (!opt_quiet || opt_warranty || opt_copying || opt_usage) -- cerr << "Picprog version 1.0, Copyright © 1997 Jaakko Hyvätti\n" -+ std::cerr << "Picprog version 1.0, Copyright © 1997 Jaakko Hyvätti\n" - "Picprog comes with ABSOLUTELY NO WARRANTY; for details\n" - "type `" << prog.name << " --warranty'. This is free software,\n" - "and you are welcome to redistribute it under certain conditions;\n" -@@ -118,7 +119,7 @@ - prog.warranty (); - - if (opt_usage) { -- cerr << "Full documentation is at " -+ std::cerr << "Full documentation is at " - "<URL:http://www.iki.fi/hyvatti/pic/picprog.html>.\n" - "The author may be contacted at:\n\n" - -@@ -133,7 +134,7 @@ - return EX_OK; - - if (!opt_input && !opt_output) { -- cerr << "Please specify either input or output hexfile.\n"; -+ std::cerr << "Please specify either input or output hexfile.\n"; - prog.usage (long_opts, short_opts); - } - -@@ -150,7 +151,7 @@ - if (EX_OK != (retval = mem.program (opt_port, opt_erase))) - return retval; - } else -- cout << "No --burn option specified, device not programmed\n"; -+ std::cout << "No --burn option specified, device not programmed\n"; - - if (opt_cc) - if (EX_OK != (retval = mem.save (opt_cc, hexfile::formats (opt_format), diff --git a/devel/picprog/files/patch-picport.cc b/devel/picprog/files/patch-picport.cc index e67dad68d882..914ebda6a443 100644 --- a/devel/picprog/files/patch-picport.cc +++ b/devel/picprog/files/patch-picport.cc @@ -1,42 +1,6 @@ ---- picport.cc.orig Tue Nov 19 12:32:20 2002 -+++ picport.cc Tue Nov 19 12:33:13 2002 -@@ -28,7 +28,7 @@ - - */ - --#include <iostream.h> -+#include <iostream> - #include <sys/ioctl.h> - #include <fcntl.h> - #include <errno.h> -@@ -47,7 +47,7 @@ - { - if (0 > (fd = open (tty, O_RDWR))) { - int e = errno; -- cerr << "Unable to open tty " << tty << ":" << strerror (e) << "\n"; -+ std::cerr << "Unable to open tty " << tty << ":" << strerror (e) << "\n"; - exit (EX_IOERR); - } - tcgetattr (fd, &saved); -@@ -67,7 +67,7 @@ - || 0 > ioctl (fd, TIOCMBIC, &picport::dtr_bit)) { - int e = errno; - tcsetattr (fd, TCSANOW, &saved); -- cerr << "Unable to clear RTS/DTR on tty " << tty << ":" << strerror (e) << "\n"; -+ std::cerr << "Unable to clear RTS/DTR on tty " << tty << ":" << strerror (e) << "\n"; - exit (EX_IOERR); - } - usleep (50000); -@@ -75,7 +75,7 @@ - int e = errno; - ioctl (fd, TIOCCBRK, 0); - tcsetattr (fd, TCSANOW, &saved); -- cerr << "Unable to start break on tty " << tty << ":" << strerror (e) << "\n"; -+ std::cerr << "Unable to start break on tty " << tty << ":" << strerror (e) << "\n"; - exit (EX_IOERR); - } - usleep (1); -@@ -182,7 +182,7 @@ +--- picport.cc.orig Tue Nov 19 12:52:11 2002 ++++ picport.cc Tue Nov 19 12:52:20 2002 +@@ -192,7 +192,7 @@ // -1 == error, no programmer present @@ -45,17 +9,3 @@ { int tmp1, tmp2; -@@ -216,11 +216,11 @@ - // This detects if the programmer is not connected to the port. - - if (!tmp1 || !tmp2) { -- cerr << portname << ":PIC programmer or chip fault\n"; -+ std::cerr << portname << ":PIC programmer or chip fault\n"; - return -1; - } - if (data_from_data == comm && (shift & 0x3f00) != 0x3f00) { -- cerr << portname -+ std::cerr << portname - << ":PIC programmer or chip fault\n" - "Is code protection enabled? " - "Use --erase option to disable code protection.\n"; diff --git a/devel/picprog/files/patch-program.cc b/devel/picprog/files/patch-program.cc deleted file mode 100644 index 7d052e9d834c..000000000000 --- a/devel/picprog/files/patch-program.cc +++ /dev/null @@ -1,118 +0,0 @@ ---- program.cc.orig Tue Nov 19 12:38:52 2002 -+++ program.cc Tue Nov 19 12:39:56 2002 -@@ -28,7 +28,7 @@ - - */ - --#include <iostream.h> -+#include <iostream> - - #include <unistd.h> - #include <string.h> -@@ -258,7 +258,7 @@ - original licensor to copy, distribute or modify the Program subject to\n\ - these terms and conditions. You may not impose any further\n\ - restrictions on the recipients' exercise of the rights granted herein.\n\ --You are not responsible for enforcing compliance by third parties to\n\ -+You are not responsible for enforstd::cing compliance by third parties to\n\ - this License.\n\ - \n\ - 7. If, as a consequence of a court judgment or allegation of patent\n\ -@@ -356,7 +356,7 @@ - || 0 > ioctl (1, TIOCGWINSZ, &w) - || w.ws_row < 2 - || w.ws_col < 76) { -- cout << t; -+ std::cout << t; - return; - } - -@@ -368,17 +368,17 @@ - char *tmps = new char [end-start+1]; - memcpy (tmps, start, end-start); - tmps [end-start] = '\0'; -- cout << tmps; -+ std::cout << tmps; - delete [] tmps; - lines = 0; - start = end; -- cout << "Press enter to continue" << flush; -- while (cin.get(c) && '\n' != c) -+ std::cout << "Press enter to continue" << std::flush; -+ while (std::cin.get(c) && '\n' != c) - ; - } - } - if (*start) -- cout << start; // Print the last page. -+ std::cout << start; // Print the last page. - } - - void program::warranty () -@@ -394,7 +394,7 @@ - static void wrapif (int& column, int cols, int wid) - { - if (cols < (column += wid)) { -- cerr << endl; -+ std::cerr << std::endl; - column = wid; - } - } -@@ -413,7 +413,7 @@ - || w.ws_col < 40) - w.ws_col = 80; - -- cerr << "Usage: " << name; -+ std::cerr << "Usage: " << name; - column = 7 + strlen (name); - memset (charops, 0, sizeof (charops)); - for (op = long_opts; op->name; op++) { -@@ -422,23 +422,23 @@ - switch (op->has_arg) { - case required_argument: - wrapif (column, w.ws_col, 5 + strlen (op->name) + 6); -- cerr << " [ --" << op->name << "=arg ]"; -+ std::cerr << " [ --" << op->name << "=arg ]"; - if (!op->flag) { - wrapif (column, w.ws_col, 11); -- cerr << " [ -" << (char)op->val << " arg ]"; -+ std::cerr << " [ -" << (char)op->val << " arg ]"; - } - break; - case optional_argument: - wrapif (column, w.ws_col, 5 + strlen (op->name) + 9); -- cerr << " [ --" << op->name << "[=arg ] ]"; -+ std::cerr << " [ --" << op->name << "[=arg ] ]"; - if (!op->flag) { - wrapif (column, w.ws_col, 15); -- cerr << " [ -" << (char)op->val << " [ arg ] ]"; -+ std::cerr << " [ -" << (char)op->val << " [ arg ] ]"; - } - break; - default: - wrapif (column, w.ws_col, 5 + strlen (op->name) + 2); -- cerr << " [ --" << op->name << " ]"; -+ std::cerr << " [ --" << op->name << " ]"; - if (!op->flag) - charops [strlen (charops)] = op->val; - } -@@ -447,16 +447,16 @@ - if (' ' != *tmp_set && ':' != *tmp_set) { - if (':' == tmp_set [1]) { - wrapif (column, w.ws_col, 12); -- cerr << " [ -" << *tmp_set++ << " arg ]"; -+ std::cerr << " [ -" << *tmp_set++ << " arg ]"; - } else - charops [strlen (charops)] = *tmp_set; - } - } - if (charops[0]) { - wrapif (column, w.ws_col, 4 + strlen (charops) + 2); -- cerr << " [ -" << charops << " ]"; -+ std::cerr << " [ -" << charops << " ]"; - } -- cerr << endl; -+ std::cerr << std::endl; - exit (EX_USAGE); - } - diff --git a/devel/picprog/files/patch-program.h b/devel/picprog/files/patch-program.h index 60f79eff7da4..2dedb1df5bc3 100644 --- a/devel/picprog/files/patch-program.h +++ b/devel/picprog/files/patch-program.h @@ -1,10 +1,9 @@ ---- program.h.orig Fri May 30 22:24:52 1997 -+++ program.h Tue Nov 19 12:40:53 2002 -@@ -31,6 +31,8 @@ +--- program.h.orig Tue Nov 19 12:53:12 2002 ++++ program.h Tue Nov 19 12:53:20 2002 +@@ -31,6 +31,7 @@ #ifndef H_PROGRAM #define H_PROGRAM -+#include <unistd.h> +#define HAVE_DECL_GETOPT 1 #include <getopt.h> |