How to get a function key in BSD curses

Guy Harris guy at auspex.auspex.com
Sun Jul 8 03:57:13 AEST 1990


>>Sorry to correct you Greg, but as far as I know BSD curses (which is
>>where the question was about) doesn't have keypad(); it is a AT&T-ism.
>
>If you say so.

I say so too.

>I have used mostly System V, and my BSD exprience included systems
>that seemed to support the keypad() function just fine.

Well, on SunOS 4.0.3:

	#
	# Let's see if it's a macro in the BSD-environment "curses":
	#
	auspex% egrep keypad /usr/include/curses.h

	#
	# Well, I guess it's not.  Let's see if it's a library routine:
	#
	auspex% nm /usr/lib/libcurses.a | egrep keypad

	#
	# Nope, it's not a library routine, either.  Just for laughs,
	# let's see if it's a library routine in the S5-environment
	# "curses":
	#
	auspex% nm /usr/5lib/libcurses.a | egrep keypad
	keypad.o:
	00000000 T _keypad

	#
	# Sure is.  Let's take a look at the source from the 4.3BSD
	# tape, just for laughs:
	#
	auspex% pushd /home/unix_src/bsd4.3/usr.lib/libcurses
	/home/unix_src/bsd4.3/usr.lib/libcurses ~
	auspex% egrep keypad *
	egrep: Read error on profiled: Is a directory

	#
	# Nope - if the "curses" you tried really was a BSD-environment
	# curses, your vendor must have added it.
	#



More information about the Comp.unix.questions mailing list