home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
prof_c
/
05oslib
/
bios
/
curback.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1988-08-11
|
378 b
|
24 lines
/*
* curback -- move cursor back (left); return the
* value of the new column position
*/
#include <local\bioslib.h>
int
curback(n, pg)
int n, pg;
{
int r, c;
/*
* move the cursor left by up to n positions but
* not past the beginning of the current line
*/
readcur(&r, &c, pg);
if (c - n < 0)
c = 0;
putcur(r, c, pg);
return (c);
}