🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1377

possible bug report

#1377
From: Paul Sjoerdsma
Date: Sun, 10 Jan 1993 13:57
226 lines
4521 bytes
During compilation I encountered the next message:
This was done on a Sun-Sparc 1+ system with SunOs-4.1
The compiler version is gcc-2.3.2

Note:
	My mail system does not work properly at this moment, so I am not able
	to recieve any mail now. I hope you can do something with this
	message.

cd /staff_home/software/sware_c++/mp/
make
gcc -x c++  -O -Wall -I. -c mpcur.cpp
In file included from mpcur.cpp:10:
mpcur.h:32: parse error before `)'
mpcur.h:32: variable or field `wmove' declared void
mpcur.h:32: ANSI C++ forbids initialization of member `wmove'
mpcur.h:32: Internal compiler error.
mpcur.h:32: Please report this to `bug-g++@prep.ai.mit.edu'.
make: *** [mpcur.o] Error 1

Compilation exited abnormally with code 1 at Sun Jan 10 13:49:54



// This may look like C code, but it is really -*- C++ -*-
// $Id: config.h,v 1.1 1993/01/10 12:46:11 software Exp software $



#ifndef __iconfig_h


#define __iconfig_h 1


// This is the machine/compiler dependant configuration file.
// At this moment is has been configured for the gcc-2.3.2 compiler that is
// available from the GNU-project and the Turbo C++-compiler version 1.01
// The GNU-compiler was used in an Unix environment (Sun Sparc 1+)
// The Turbo-compiler was used in a Dos environment (80386 AT)

// At this moment the two switches are:
// Gnu_Unix || Turbo_Dos

#define Gnu_Unix 1

#if defined (Gnu_Unix)

#define DELETE_ARRAY delete []

#include <memory.h>
#include <unistd.h>
#include <curses.h>


#define READ_TEXT_MODE "r"

#define WRITE_TEXT_MODE "w"

#elif defined (Turbo_Dos)

#define DELETE_ARRAY delete

#include <mem.h>
#include <conio.h>
#include <dos.h>
#include <io.h>

#define READ_TEXT_MODE "rt"

#define WRITE_TEXT_MODE "wt"

#else
#error do no know this compiler_machine directive, adapt config.h
#endif


#define TIME_EXT         ".tim"
#define INPUT_EXT        ".inp"
#define OUTPUT_EXT       ".out"
#define STATISTICS_EXT   ".sta"
#define DEBUG_EXT        ".bug"


#endif //__iconfig_h


// This may look like C code, but it is really -*- C++ -*-
// $Id$


#ifndef __impcur_h


#ifdef __GNUG__
#pragma interface
#endif


#define __impcur_h 1

#include "config.h"

// the origin of the window is 0,0.
// !!!! 
// In the Turbo-C window environment the origin starts at 1,1. This class 
// will change this internally to be consistent with the curses-library
// !!!!
class mpcurWindow
{
private:
  int x, y, w, h;
  int cx, cy;
  
public:
  mpcurWindow();
  
  void            move(int, int);
  void            addstr(const char*);
  void            print(const char*, ...);
  void            clrtoeol();
  
};


inline
mpcurWindow::mpcurWindow()
{
  cx = cy = 0;
  
#if defined (Gnu_Unix)
  initscr ();
  clear ();
  refresh ();
  x = y = 0;
  w = COLS;
  h = LINES;
#elif defined (Turbo_Dos)
  x = y = 1;
  w = 80;
  h = 25;
  window (x, y, w, h);
  clrscr ();
#endif
}


inline void
mpcurWindow::move(int wx, int wy)
{
  cx = wx;
  cy = wy;
  
#if defined(Gnu_Unix)
  move (x + cx, y + cy);
#elif defined(Turbo_Dos)
  move (cx, cy);
#endif
}

inline void
mpcurWindow::addstr(const char * str)
{
#if defined(Gnu_Unix)
  addstr ((char*) str);
  refresh ();
  
#elif defined (Turbo_Dos)
  cputs (str);
  
#endif
}

inline void
mpcurWindow::clrtoeol()
{
#if defined(Gnu_Unix)
  clrtoeol ();
#elif defined(Turbo_Dos)
  delline ();
  
#endif
}

#endif // __impcur_h

// This may look like C code, but it is really -*- C++ -*-
// $Id$


#ifdef __GNUG__
#pragma implementation
#endif


#include "mpcur.h"

#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>

void
mpcurWindow::print(const char * fmt, ...)
{
  char buffer[1024]; // should be large enough

  va_list args;

  va_start (args, fmt);
  
  vsprintf (buffer, fmt, args);
  
  va_end (args);
  
#if defined (Gnu_Unix)
  addstr ((char*) buffer);

#elif defined (Turbo_Dos)
  cputs (buffer);
  
#endif
}



Paul Sjoerdsma
Technical Details
Message-ID: <9301101357.AA01016@omega.earth.ruu.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!earth.ruu.NL!software

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!earth.ruu.NL!software
From: software@earth.ruu.NL (Paul Sjoerdsma)
Subject: possible bug report
Message-ID: <9301101357.AA01016@omega.earth.ruu.nl>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sun, 10 Jan 1993 13:57:45 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 227