🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Amos A. Gouaux Sun, 10 Jan 1993 18:16
CursesWindow in libg++-2.3 using gcc-2.3.3
#679
Author: Amos A. Gouaux
Date: Sun, 10 Jan 1993 18:16
82 lines
2846 bytes
machine: solbourne series 5e/902 (sun sparc compatible)
system: os/mp 4.1A.3 (based on sunos4.1.1)

i was able to build gcc-2.3.3 without any problems.  i was also able
to build libg++-2.3 equally error free.  all the libg++ tests seem to
have run just fine.  however, when i tried to run "tCurses" down in
the tests directory, i discovered that certain output was missing.
in particular, the format strings for the *print* methods were never
displayed, not in any form.  for example, the following text was
missing from the output.

     begx=0,maxx=79,begy=0,maxy=23,height=24,width=80
     printw test:13, A, Cstar, -1, 3.141593, 3.183099
     enter an int:
     number = 
     enter a char:
     char = 

yet "123" and "a" _did_ appear.  most peculiar.  with gcc-2.2.2 and
libg++-2.2, i was able to produce this output from the very same source
file, which i have included below.  this source file is merely a simplified
version of tCurses.cc.

can someone tell me the reason for the above behavior?  is there
something that i'm doing wrong?  is this a bug with one of the packages?

amos


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <CursesW.h>

// a simple test/demo for CursesWindow.  with gcc-2.3.3 and libg++-2.3,
// none of the lines ending with "//**" produce the desired output strings.

int main
(void)
{
CursesWindow big(23, 79, 0, 0);

int i;
char c='A';

big.box('B','B');

big.refresh();

big.mvprintw(0,0,"begx=%d,maxx=%d,begy=%d,maxy=%d,height=%d,width=%d", //**
             big.begx(), big.maxx(), big.begy(), big.maxy(),
             big.height(), big.width());
big.refresh();

i=13;
const char * cptr = "Cstar";

long l = 0xffffffff;
double d= 3.1415926;
float f= 10.0/d;

big.mvprintw(2,2,"printw test:%d, %c, %s, %ld, %lf, %f\n",i,c,cptr,l,d,f); //**
big.refresh();

big.mvprintw(5,20,"enter an int:"); //**
big.refresh();
big.scanw("%d",&i);
big.move(6,20);
big.printw("number = %d\n",i); //**
big.refresh();

big.mvprintw(20,20,"enter a char:"); //**
big.refresh();
big.scanw("%c",&c);
big.move(21,20);
big.printw("char = %c\n",c); //**
big.refresh();
}

//_____________________________________________________________________________
-- 
amos@unt.edu                   Amos A. Gouaux                   (817) 565-4161
-= Academic Computing Services, University of North Texas, Denton, TX, USA. =-
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads