HP 9000 Series 300 Tutorials Manual page 289

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

}
for (1=0; 1 < LINES; 1++) {
n = len(l);
for (i=O; i<n; i++)
putc(mvinch(l,i),fd);
putc('\n' ,fd);
}
fclose(fd);
endwinO;
exit(O);
len (lineno)
int
lineno;
{
int
linelen = COLS-1;
while (linelen >= 0
&&
mvinch(lineno,linelen)
" )
linelen--;
return linelen + 1;
}
/* Global value of current cursor position */
int
row,col;
, edit
0
{
int
c;
for (;;) {
move(row,col) ;
refreshO;
c = getchO;
switch(c) {
/* Editor commands */
/* hjkl and arrow keys: move cursor */
/* in direction indicated */
case
'h':
case
KEY_LEFT:
if (col > 0)
col--;
break;
case
'j' :
case
KEY_DOWN:
if (row < LINES-1)
row++;
break;
Program Operation
3-25

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents