delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/06/07:19:01

From: ronenp AT netvision DOT net DOT il (Ronen Friedman)
Newsgroups: comp.os.msdos.djgpp
Subject: a problem with CURSES
Date: Sun, 06 Oct 1996 08:49:01 GMT
Organization: NetVision LTD.
Lines: 77
Message-ID: <537v35$7a2@news.NetVision.net.il>
NNTP-Posting-Host: ts013p3.pop9a.netvision.net.il
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Greetings,

I'm trying to incorporate PDCURSES into my C program. I'm using PDCURS22 
with gcc from DJGPP 2. The program runs OK in a PC window on my NT PC,
but (always) fails on the target, which is a PC104 without math co-proc,
running DR-DOS. Other (non-CURSES) DJGPP compiled programs are
executing happily there.

The compilation commands are:

LIBS= libsv.a libcurso.a
test_cur:	test_cur.c
	gcc -g -Wall -DNAMES -DDBG_1 -Id:/gnu/djgpp2/contrib/pdcurs22/include -o
		test_cur test_cur.c $(LIBS) -lemu

The traceback always shows that the problem occured in 
	_dj_movedata+33
	wnoutrefresh+319
	wrefresh()+50
	from line 29 in the attached program

Can any kind soul tell me what am I doing wrong?

Thanks
Ronen

ronen AT friendly DOT co DOT il

-----------------------------------

#include <curses.h>

WINDOW *win, *swin;

void init_curses_disp(
	WINDOW **win,		// main status win
	WINDOW **swin)		// scrolling messages win
{
	initscr();
	*win = newwin(12, 70, 5, 5);
	if (!*win) {
		endwin();
		puts("Creation of win failed\n");
	}

	*swin = newwin(9, 70, 17, 5);
	if (!*swin) {
		endwin();
		puts("Creation of swin failed\n");
	}

	//scrollok(*swin, TRUE);

	while (1) {
		mvwaddstr(*win, 5,5, "init...");
		wrefresh(*win);
		mvwprintw(*swin, 5, 5, "%s -", "init<");
		wrefresh(*swin);
		sleep(3);

		mvwaddstr(*win, 5,5, "         ");
		wrefresh(*win);
		mvwprintw(*swin, 5, 5, "%s -", "=====");
		wrefresh(*swin);
		sleep(3);
	}
}

int main(void)
{
	init_curses_disp(&win, &swin);
}





- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019