From: skunz@iastate.edu (Steven L Kunz)
Subject: Re: curseperl on Ultrix 4.2a?
Organization: Iowa State University, Ames IA
Date: Wed, 22 Jul 1992 14:59:48 GMT

In <1842@ltb.ltb.bso.nl> wierda@ltb.ltb.bso.nl (Gerben Wierda) writes:

>I tried to link/compile curesperl on Ultrix 4.2a and I got all kinds of
>unresolved externals. I used bsdcurses.mus and changed termlib in the
>usub/Makefile to termcap (as stated in the curses man page). Still, I get
>unresolved externals like "baudrate", "idlok" etc.

>What am I forgetting here? Or is Ultrix again non-standard....?

Here some patches for ULTRIX 4.2a for the bsdcurses.mus file that comes with
the perl 4.19 and 4.35 releases (they are different).  Patch your bsdcurses.mus
with one of these (as appropriate) and it should work.  The 4.35 patch is
shorter because the 4.35 release fixed some stuff (but not all) for Ultrix.

Steve Kunz -- Iowa State University

-----------------  patch for perl 4.19 -----------------

*** bsdcurses.mus.dist	Tue May 19 14:46:32 1992
--- bsdcurses.mus	Tue May 19 14:46:45 1992
***************
*** 51,57 ****
      US_erase,
      US_werase,
      US_flushok,
-     US_idlok,
      US_insch,
      US_winsch,
      US_insertln,
--- 51,56 ----
***************
*** 80,98 ****
      US_noraw,
      US_scanw,
      US_wscanw,
-     US_baudrate,
      US_delwin,
      US_endwin,
-     US_erasechar,
      US_getcap,
      US_getyx,
      US_inch,
      US_winch,
      US_initscr,
-     US_killchar,
      US_leaveok,
      US_longname,
-     US_fullname,
      US_mvwin,
      US_newwin,
      US_nl,
--- 79,93 ----
***************
*** 99,106 ****
      US_nonl,
      US_scrollok,
      US_subwin,
-     US_touchline,
-     US_touchoverlap,
      US_touchwin,
      US_unctrl,
      US_gettmode,
--- 94,99 ----
***************
*** 158,164 ****
      make_usub("erase",		US_erase,	usersub, filename);
      make_usub("werase",		US_werase,	usersub, filename);
      make_usub("flushok",	US_flushok,	usersub, filename);
-     make_usub("idlok",		US_idlok,	usersub, filename);
      make_usub("insch",		US_insch,	usersub, filename);
      make_usub("winsch",		US_winsch,	usersub, filename);
      make_usub("insertln",	US_insertln,	usersub, filename);
--- 151,156 ----
***************
*** 187,205 ****
      make_usub("noraw",		US_noraw,	usersub, filename);
      make_usub("scanw",		US_scanw,	usersub, filename);
      make_usub("wscanw",		US_wscanw,	usersub, filename);
-     make_usub("baudrate",	US_baudrate,	usersub, filename);
      make_usub("delwin",		US_delwin,	usersub, filename);
      make_usub("endwin",		US_endwin,	usersub, filename);
-     make_usub("erasechar",	US_erasechar,	usersub, filename);
      make_usub("getcap",		US_getcap,	usersub, filename);
      make_usub("getyx",		US_getyx,	usersub, filename);
      make_usub("inch",		US_inch,	usersub, filename);
      make_usub("winch",		US_winch,	usersub, filename);
      make_usub("initscr",	US_initscr,	usersub, filename);
-     make_usub("killchar",	US_killchar,	usersub, filename);
      make_usub("leaveok",	US_leaveok,	usersub, filename);
      make_usub("longname",	US_longname,	usersub, filename);
-     make_usub("fullname",	US_fullname,	usersub, filename);
      make_usub("mvwin",		US_mvwin,	usersub, filename);
      make_usub("newwin",		US_newwin,	usersub, filename);
      make_usub("nl",		US_nl,		usersub, filename);
--- 179,193 ----
***************
*** 206,213 ****
      make_usub("nonl",		US_nonl,	usersub, filename);
      make_usub("scrollok",	US_scrollok,	usersub, filename);
      make_usub("subwin",		US_subwin,	usersub, filename);
-     make_usub("touchline",	US_touchline,	usersub, filename);
-     make_usub("touchoverlap",	US_touchoverlap,usersub, filename);
      make_usub("touchwin",	US_touchwin,	usersub, filename);
      make_usub("unctrl",		US_unctrl,	usersub, filename);
      make_usub("gettmode",	US_gettmode,	usersub, filename);
--- 194,199 ----
***************
*** 309,319 ****
  I	bool		boolf
  END
  
- CASE int idlok
- I	WINDOW*		win
- I	bool		boolf
- END
- 
  CASE int insch
  I	char		c
  END
--- 295,300 ----
***************
*** 463,471 ****
  CASE int noraw
  END
  
- CASE int baudrate
- END
- 
  CASE int delwin
  I	WINDOW*		win
  END
--- 444,449 ----
***************
*** 473,484 ****
  CASE int endwin
  END
  
! CASE int erasechar
! END
  
! CASE char* getcap
! I	char*		str
! END
  
      case US_getyx:
  	if (items != 3)
--- 451,471 ----
  CASE int endwin
  END
  
!     case US_getcap:
! 	if (items != 1)
! 	    fatal("Usage: &getcap($str)");
! 	else {
! 	    int retval;
! 	    char*	str =		(char*)		str_get(st[1]);
! 	    char output[50], temp_buf[1024], *outputp = output;
  
! 	    retval = tgetent(temp_buf, ttytype);
! 	    if (retval != 1)
! 		fatal("Cannot get termcap entry");
! 	    retval = tgetstr(str, &outputp);
! 	    str_set(st[0], output);
! 	}
! 	return sp;
  
      case US_getyx:
  	if (items != 3)
***************
*** 510,518 ****
  CASE WINDOW* initscr
  END
  
- CASE int killchar
- END
- 
  CASE int leaveok
  I	WINDOW*		win
  I	bool		boolf
--- 497,502 ----
***************
*** 523,533 ****
  IO	char*		name
  END
  
- CASE int fullname
- I	char*		termbuf
- IO	char*		name
- END
- 
  CASE int mvwin
  I	WINDOW*		win
  I	int		y
--- 507,512 ----
***************
*** 558,575 ****
  I	int		cols
  I	int		begin_y
  I	int		begin_x
- END
- 
- CASE int touchline
- I	WINDOW*		win
- I	int		y
- I	int		startx
- I	int		endx
- END
- 
- CASE int touchoverlap
- I	WINDOW*		win1
- I	WINDOW*		win2
  END
  
  CASE int touchwin
--- 537,542 ----
-----------------  patch for 4.35 -----------------

*** bsdcurses.mus.dist	Tue Jun  9 11:02:56 1992
--- bsdcurses.mus	Tue Jun  9 11:04:40 1992
***************
*** 54,60 ****
      US_erase,
      US_werase,
      US_flushok,
-     US_idlok,
      US_insch,
      US_winsch,
      US_insertln,
--- 54,59 ----
***************
*** 83,101 ****
      US_noraw,
      US_scanw,
      US_wscanw,
-     US_baudrate,
      US_delwin,
      US_endwin,
-     US_erasechar,
      US_getcap,
      US_getyx,
      US_inch,
      US_winch,
      US_initscr,
-     US_killchar,
      US_leaveok,
      US_longname,
-     US_fullname,
      US_mvwin,
      US_newwin,
      US_nl,
--- 82,96 ----
***************
*** 102,109 ****
      US_nonl,
      US_scrollok,
      US_subwin,
-     US_touchline,
-     US_touchoverlap,
      US_touchwin,
      US_unctrl,
      US_gettmode,
--- 97,102 ----
***************
*** 161,167 ****
      make_usub("erase",		US_erase,	usersub, filename);
      make_usub("werase",		US_werase,	usersub, filename);
      make_usub("flushok",	US_flushok,	usersub, filename);
-     make_usub("idlok",		US_idlok,	usersub, filename);
      make_usub("insch",		US_insch,	usersub, filename);
      make_usub("winsch",		US_winsch,	usersub, filename);
      make_usub("insertln",	US_insertln,	usersub, filename);
--- 154,159 ----
***************
*** 190,208 ****
      make_usub("noraw",		US_noraw,	usersub, filename);
      make_usub("scanw",		US_scanw,	usersub, filename);
      make_usub("wscanw",		US_wscanw,	usersub, filename);
-     make_usub("baudrate",	US_baudrate,	usersub, filename);
      make_usub("delwin",		US_delwin,	usersub, filename);
      make_usub("endwin",		US_endwin,	usersub, filename);
-     make_usub("erasechar",	US_erasechar,	usersub, filename);
      make_usub("getcap",		US_getcap,	usersub, filename);
      make_usub("getyx",		US_getyx,	usersub, filename);
      make_usub("inch",		US_inch,	usersub, filename);
      make_usub("winch",		US_winch,	usersub, filename);
      make_usub("initscr",	US_initscr,	usersub, filename);
-     make_usub("killchar",	US_killchar,	usersub, filename);
      make_usub("leaveok",	US_leaveok,	usersub, filename);
      make_usub("longname",	US_longname,	usersub, filename);
-     make_usub("fullname",	US_fullname,	usersub, filename);
      make_usub("mvwin",		US_mvwin,	usersub, filename);
      make_usub("newwin",		US_newwin,	usersub, filename);
      make_usub("nl",		US_nl,		usersub, filename);
--- 182,196 ----
***************
*** 209,216 ****
      make_usub("nonl",		US_nonl,	usersub, filename);
      make_usub("scrollok",	US_scrollok,	usersub, filename);
      make_usub("subwin",		US_subwin,	usersub, filename);
-     make_usub("touchline",	US_touchline,	usersub, filename);
-     make_usub("touchoverlap",	US_touchoverlap,usersub, filename);
      make_usub("touchwin",	US_touchwin,	usersub, filename);
      make_usub("unctrl",		US_unctrl,	usersub, filename);
      make_usub("gettmode",	US_gettmode,	usersub, filename);
--- 197,202 ----
***************
*** 312,322 ****
  I	bool		boolf
  END
  
- CASE int idlok
- I	WINDOW*		win
- I	bool		boolf
- END
- 
  CASE int insch
  I	char		c
  END
--- 298,303 ----
***************
*** 466,474 ****
  CASE int noraw
  END
  
- CASE int baudrate
- END
- 
  CASE int delwin
  I	WINDOW*		win
  END
--- 447,452 ----
***************
*** 476,484 ****
  CASE int endwin
  END
  
- CASE int erasechar
- END
- 
      case US_getcap:
  	if (items != 1)
  	    fatal("Usage: &getcap($str)");
--- 454,459 ----
***************
*** 522,530 ****
  CASE WINDOW* initscr
  END
  
- CASE int killchar
- END
- 
  CASE int leaveok
  I	WINDOW*		win
  I	bool		boolf
--- 497,502 ----
***************
*** 535,545 ****
  IO	char*		name
  END
  
- CASE int fullname
- I	char*		termbuf
- IO	char*		name
- END
- 
  CASE int mvwin
  I	WINDOW*		win
  I	int		y
--- 507,512 ----
***************
*** 570,587 ****
  I	int		cols
  I	int		begin_y
  I	int		begin_x
- END
- 
- CASE int touchline
- I	WINDOW*		win
- I	int		y
- I	int		startx
- I	int		endx
- END
- 
- CASE int touchoverlap
- I	WINDOW*		win1
- I	WINDOW*		win2
  END
  
  CASE int touchwin
--- 537,542 ----
-- 
Steven L. Kunz
Networking & Communications | Usenet News Admin.
Iowa State University Computation Center, Iowa State University, Ames  IA
INET: skunz@iastate.edu     BITNET: gr.slk@isumvs.bitnet
Newsgroups: comp.lang.perl