/* * g e t b u f . c */ /*)LIBRARY */ #ifdef DOCUMENTATION title getbuf Get Fresh Edited Keyboard Input index get fresh Edited keyboard input synopsis int getbuf(buf,len,row,col) char *buf; /* destination buffer */ int len; /* maximum bytes to be read */ int row; /* input row on screen */ int col; /* input column on screen */ description getbuf(buf,len,row,col) gets input from the console, with editing facilities. The cursor is positioned at (row,col) on the screen, and the user inputs the data, terminated with a carrage return. The editing codes are described in documentation for edtbuf(). Returns '\r' or terminator. Before getbuf() can be used, zbegin() must be called. bugs author Machiavelli Systems #endif int getbuf(buf,len,row,col) /* as for edtbuf() but clean buffer first */ /* also terminate buffer with '\0' */ char *buf; /* 'len'+1 chars of data this will always terminate data with nuls */ int len; int row; int col; { zero(buf,len); return(edtbuf(buf,len,0,row,col)); }