pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xosview/patches g++-3.x compliance. std names...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b750da80cc16
branches:  trunk
changeset: 462363:b750da80cc16
user:      christos <christos%pkgsrc.org@localhost>
date:      Tue Sep 30 23:03:59 2003 +0000

description:
g++-3.x compliance. std namespaces, etc.

diffstat:

 sysutils/xosview/patches/patch-ae |   47 +++++++--
 sysutils/xosview/patches/patch-ai |   21 ++++
 sysutils/xosview/patches/patch-aj |   21 ++++
 sysutils/xosview/patches/patch-ak |   42 +++++++++
 sysutils/xosview/patches/patch-al |   32 +++++++
 sysutils/xosview/patches/patch-am |  112 +++++++++++++++++++++++++
 sysutils/xosview/patches/patch-an |   28 ++++++
 sysutils/xosview/patches/patch-ao |   62 +++++++++++++
 sysutils/xosview/patches/patch-aq |  169 ++++++++++++++++++++++++++++++++++++++
 9 files changed, 521 insertions(+), 13 deletions(-)

diffs (truncated from 571 to 300 lines):

diff -r dfe803614d0b -r b750da80cc16 sysutils/xosview/patches/patch-ae
--- a/sysutils/xosview/patches/patch-ae Tue Sep 30 22:46:42 2003 +0000
+++ b/sysutils/xosview/patches/patch-ae Tue Sep 30 23:03:59 2003 +0000
@@ -1,14 +1,35 @@
-$NetBSD: patch-ae,v 1.7 2000/07/13 15:48:49 agc Exp $
+$NetBSD: patch-ae,v 1.8 2003/09/30 23:03:59 christos Exp $
 
-*** bsd/cpumeter.cc.orig       Tue Feb 16 14:09:22 1999
---- bsd/cpumeter.cc    Thu Jul 13 16:19:09 2000
-***************
-*** 16,19 ****
---- 16,22 ----
-  //
-  #include <sys/dkstat.h>         //  For CPUSTATES #define.  BCG
-+ #if defined(XOSVIEW_NETBSD) && !defined(CPUSTATES)
-+ #include <sys/sched.h>
-+ #endif
-  #include <stdlib.h>          //  For use of atoi  BCG
-  #include "general.h"
+--- bsd/cpumeter.cc.orig       1999-02-16 09:09:22.000000000 -0500
++++ bsd/cpumeter.cc    2003-09-30 18:34:41.000000000 -0400
+@@ -15,6 +15,9 @@
+ // $Id: patch-ae,v 1.8 2003/09/30 23:03:59 christos Exp $
+ //
+ #include <sys/dkstat.h>         //  For CPUSTATES #define.  BCG
++#if defined(XOSVIEW_NETBSD) && !defined(CPUSTATES)
++#include <sys/sched.h>
++#endif
+ #include <stdlib.h>           //  For use of atoi  BCG
+ #include "general.h"
+ #include "cpumeter.h"
+@@ -109,13 +112,13 @@
+     static int firstTime = 1;
+     if (firstTime) {
+       fprintf(stderr,
+-"  Warning:  the CPU tick counters are not changing.  This could
+-be due to running a kernel besides /netbsd (or the equivalent for FreeBSD).
+-  If this is the case, re-run xosview with the -N kernel-name option.
+-  If not, then this is a bug.  Please send a message to
+-bgrayson%ece.utexas.edu@localhost, in addition to any send-pr bug reports
+-(or in lieu of -- it ought to get fixed faster if you contact me
+-directly).  Thanks!\n");
++" Warning: The CPU tick counters are not changing.  This could"
++" be due to running a kernel besides /netbsd (or the equivalent for FreeBSD)."
++" If this is the case, re-run xosview with the -N kernel-name option."
++" If not, then this is a bug.  Please send a message to"
++" bgrayson%ece.utexas.edu@localhost, in addition to any send-pr bug reports"
++" (or in lieu of -- it ought to get fixed faster if you contact me"
++" directly).  Thanks!\n");
+       firstTime = 0;
+     }
+   }
diff -r dfe803614d0b -r b750da80cc16 sysutils/xosview/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-ai Tue Sep 30 23:03:59 2003 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-ai,v 1.1 2003/09/30 23:03:59 christos Exp $
+
+--- bsd/btrymeter.cc.orig      1999-02-16 09:09:22.000000000 -0500
++++ bsd/btrymeter.cc   2003-09-30 18:39:27.000000000 -0400
+@@ -11,6 +11,7 @@
+ //
+ #include "btrymeter.h"
+ #include "xosview.h"
++#include <iostream>
+ #include <fstream.h>
+ #include <stdlib.h>
+ 
+@@ -52,7 +53,7 @@
+   int loadinfo = open(APMFILENAME, O_RDONLY, 0);
+ 
+   if ( !loadinfo ){
+-    cerr <<"Can not open file : " <<APMFILENAME <<endl;
++    std::cerr <<"Can not open file : " <<APMFILENAME << std::endl;
+     parent_->done(1);
+     return;
+   }
diff -r dfe803614d0b -r b750da80cc16 sysutils/xosview/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-aj Tue Sep 30 23:03:59 2003 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-aj,v 1.1 2003/09/30 23:03:59 christos Exp $
+
+--- bsd/loadmeter.cc.orig      1999-02-16 09:09:21.000000000 -0500
++++ bsd/loadmeter.cc   2003-09-30 18:38:51.000000000 -0400
+@@ -15,6 +15,7 @@
+ //
+ // $Id: patch-aj,v 1.1 2003/09/30 23:03:59 christos Exp $
+ //
++#include <iostream>
+ #include <stdlib.h>  //  for getloadavg()
+ #include "general.h"
+ #include "loadmeter.h"
+@@ -58,7 +59,7 @@
+     //  prevent this whole problem, the load meter can not be a decay
+     //  meter.  The load is a decaying average kind of thing anyway,
+     //  so having a decaying load average is redundant.
+-    cerr << "Warning:  The loadmeter can not be configured as a decay\n"
++    std::cerr << "Warning:  The loadmeter can not be configured as a decay\n"
+          << "  meter.  See the source code (" << __FILE__ << ") for further\n"
+          << "  details.\n";
+     dodecay_ = 0;
diff -r dfe803614d0b -r b750da80cc16 sysutils/xosview/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-ak Tue Sep 30 23:03:59 2003 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-ak,v 1.1 2003/09/30 23:03:59 christos Exp $
+
+--- Host.cc.orig       1999-02-16 09:08:34.000000000 -0500
++++ Host.cc    2003-09-30 18:47:24.000000000 -0400
+@@ -168,7 +168,7 @@
+   return false;
+ }
+ 
+-ostream &Host::print(ostream& os) const {
++std::ostream &Host::print(std::ostream& os) const {
+   /*  Cast 'this' to a char*, so we don't need to create a Host::! operator.*/
+   if (!*((char*)this))
+     return os <<"Invalid Host.  h_errno was = " <<_failure <<"\n";
+--- Host.h.orig        1999-02-16 09:08:34.000000000 -0500
++++ Host.h     2003-09-30 18:47:52.000000000 -0400
+@@ -17,7 +17,7 @@
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <arpa/inet.h>
+-#include <iostream.h>
++#include <iostream>
+ #include "bool.h"
+ 
+ class Host {
+@@ -66,7 +66,7 @@
+ 
+   // Should not use this under linux for the same reashon as the above
+   // function.
+-  ostream &print(ostream &os) const;
++  std::ostream &print(std::ostream &os) const;
+ 
+ protected:
+ private:
+@@ -84,7 +84,7 @@
+ };
+ 
+ // Do not use this under linux until inet_ntoa() is fixed.
+-inline ostream &operator<<(ostream &os, const Host& host) {
++inline std::ostream &operator<<(std::ostream &os, const Host& host) {
+   return host.print(os);
+ }
+ 
diff -r dfe803614d0b -r b750da80cc16 sysutils/xosview/patches/patch-al
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-al Tue Sep 30 23:03:59 2003 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-al,v 1.1 2003/09/30 23:03:59 christos Exp $
+
+--- fieldmeter.cc.orig 1999-02-16 09:08:35.000000000 -0500
++++ fieldmeter.cc      2003-09-30 18:42:06.000000000 -0400
+@@ -6,6 +6,7 @@
+ //
+ // $Id: patch-al,v 1.1 2003/09/30 23:03:59 christos Exp $
+ //
++#include <iostream>
+ #include <fstream.h>
+ #include <stdlib.h>
+ #include "snprintf.h"
+@@ -294,14 +295,14 @@
+ bool FieldMeter::checkX(int x, int width) const {
+   if ((x < x_) || (x + width < x_)
+       || (x > x_ + width_) || (x + width > x_ + width_)){
+-    cerr << "FieldMeter::checkX() : bad horiz values for meter : "
+-         << name() << endl;
++    std::cerr << "FieldMeter::checkX() : bad horiz values for meter : "
++         << name() << std::endl;
+ 
+-    cerr <<"value "<<x<<", width "<<width<<", total_ = "<<total_<<endl;
++    std::cerr <<"value "<<x<<", width "<<width<<", total_ = "<<total_<<std::endl;
+ 
+     for (int i = 0 ; i < numfields_ ; i++)
+-      cerr <<"fields_[" <<i <<"] = " <<fields_[i] <<",";
+-    cerr <<endl;
++      std::cerr <<"fields_[" <<i <<"] = " <<fields_[i] <<",";
++    std::cerr <<std::endl;
+ 
+     return false;
+   }
diff -r dfe803614d0b -r b750da80cc16 sysutils/xosview/patches/patch-am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xosview/patches/patch-am Tue Sep 30 23:03:59 2003 +0000
@@ -0,0 +1,112 @@
+$NetBSD: patch-am,v 1.1 2003/09/30 23:03:59 christos Exp $
+
+--- Xrm.cc.orig        1999-02-16 09:08:35.000000000 -0500
++++ Xrm.cc     2003-09-30 18:44:38.000000000 -0400
+@@ -11,10 +11,13 @@
+ #include <stdlib.h>
+ #include <stdio.h>    //  For snprintf().
+ #include <ctype.h>
+-#include <iostream.h>
++#include <iostream>
+ #include <unistd.h>  //  for access(), etc.  BCG
+ #include "snprintf.h"
+ #include "general.h"
++#ifndef NULL
++#define NULL 0
++#endif
+ #include "Xrm.h"
+ #include "Xrmcommandline.h"
+ 
+@@ -29,7 +32,7 @@
+ bool Xrm::_initialized = false;
+ 
+ Xrm::Xrm(const char *instanceName, int argc, char **argv){
+-  cerr << " Error:  This constructor is not supported yet.\n";
++  std::cerr << " Error:  This constructor is not supported yet." << std::endl;
+   exit (-1);
+   _db = NULL;
+   _class = _instance = NULLQUARK;
+@@ -114,7 +117,7 @@
+   }
+   else
+   {
+-    cerr << "Error:  Xrm:loadAndMergeResources() called twice!\n";
++    std::cerr << "Error:  Xrm:loadAndMergeResources() called twice!" << std::endl;
+     exit (-1);
+   }
+   //  This is ugly code.  According to X and Xt rules, many files need
+@@ -218,14 +221,14 @@
+ 
+ 
+ //------------  Some debugging functions follow.  -----------------------
+-inline ostream &operator<<(ostream &os, const XrmBinding &b){
++inline std::ostream &operator<<(std::ostream &os, const XrmBinding &b){
+   switch (b){
+   case XrmBindTightly:
+     return os << ".";
+   case XrmBindLoosely:
+     return os << "*";
+   default:
+-    cerr <<"ostream operator<<(ostream &, const XrmBinding &) : "
++    std::cerr <<"std::ostream operator<<(std::ostream &, const XrmBinding &) : "
+       <<"Unknown XrmBinding!";
+     return os;
+   }
+@@ -233,7 +236,7 @@
+   return os;
+ }
+ 
+-ostream &Xrm::dump(ostream &os) const {
++std::ostream &Xrm::dump(std::ostream &os) const {
+   os <<"--- Xrm --- class: " <<XrmQuarkToString(_class)
+      <<", instance: " <<XrmQuarkToString(_instance) <<"\n";
+ 
+@@ -250,10 +253,10 @@
+                  XrmQuarkList quarks, XrmRepresentation *type,
+                  XrmValue *value, XPointer closure) {
+   
+-  ostream *os = (ostream *)closure;
++  std::ostream *os = (std::ostream *)closure;
+   (void) type;  //  Avoid gcc warnings.
+ 
+-  //cerr <<"type = " <<XrmQuarkToString(*type) <<endl;
++  //std::cerr <<"type = " <<XrmQuarkToString(*type) <<std::endl;
+ 
+   int i = 0;
+   while (quarks[i] != NULLQUARK){
+--- Xrm.h.orig 1999-02-16 09:08:34.000000000 -0500
++++ Xrm.h      2003-09-30 19:01:04.000000000 -0400
+@@ -10,14 +10,13 @@
+ #define _Xrm_h
+ 
+ #include "bool.h"
++#include <iostream>
+ 
+ #define XRM_H_CVSID "$Id: patch-am,v 1.1 2003/09/30 23:03:59 christos Exp $"
+ 
+ #include <X11/Xlib.h>
+ #include <X11/Xresource.h>
+ 
+-class ostream;
+-
+ class Xrm {
+ public:
+   Xrm(const char *className, const char *instanceName);
+@@ -31,7 +30,7 @@
+   const char* getDisplayName (int argc, char** argv);
+   void loadAndMergeResources(int& argc, char** argv, Display* display);
+ 
+-  ostream &dump(ostream &os) const;
++  std::ostream &dump(std::ostream &os) const;
+ 
+ private:
+   XrmDatabase _db;
+@@ -47,7 +46,7 @@
+   static bool _initialized;
+ };
+ 
+-inline ostream &operator<<(ostream &os, const Xrm &xrm){
++inline std::ostream &operator<<(std::ostream &os, const Xrm &xrm){
+   return xrm.dump(os);
+ }
+ 



Home | Main Index | Thread Index | Old Index