projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
added code for terminals with underline glitch, changed -d messages, a few minor...
[unix-history]
/
usr
/
src
/
lib
/
libcurses
/
getstr.c
# include
"curses.ext"
/*
* This routine gets a string starting at (_cury,_curx)
*
* %G% (Berkeley) @(#)getstr.c 1.4
*/
wgetstr
(
win
,
str
)
reg WINDOW
*
win
;
reg
char
*
str
; {
while
((*
str
=
wgetch
(
win
)) !=
ERR
&& *
str
!=
'
\n
'
)
str
++;
if
(*
str
==
ERR
) {
*
str
=
'\0'
;
return
ERR
;
}
*
str
=
'\0'
;
return
OK
;
}