Category : C Source Code
Archive   : VF.ZIP
Filename : VF_DSPY.C

 
Output of file : VF_DSPY.C contained in archive : VF.ZIP
/*
* vf_dspy -- display a screen page
*/

#include
#include
#include
#include
#include
#include
#include
#include "vf.h"

/* number field width */
#define NFW 8

void
vf_dspy(buf, lp, os, numbers)
DNODE *buf;
register DNODE *lp;
int os;
BOOLEAN numbers;
{
register int i;
int j;
int textwidth;
char *cp;
char nbuf[NFW + 1];

textwidth = Maxcol[Vmode];
if (numbers == TRUE)
textwidth -= NFW;

for (i = 0; i < NROWS; ++i) {
putcur(TOPROW + i, 0, Vpage);
cp = lp->d_line;
if (numbers == TRUE) {
sprintf(nbuf, "%6u", lp->d_lnum);
putfld(nbuf, NFW, Vpage);
putcur(TOPROW + i, NFW, Vpage);
}
if (os < strlen(cp))
putfld(cp + os, textwidth, Vpage);
else
writec(' ', textwidth, Vpage);
if (lp == buf->d_prev) {
++i;
break; /* no more displayable lines */
}
else
lp = lp->d_next;
}

/* clear and mark any unused lines */
for ( ; i < NROWS; ++i) {
putcur(i + TOPROW, 0, Vpage);
writec(' ', Maxcol[Vmode], Vpage);
writec('~', 1, Vpage);
}
return;
}


  3 Responses to “Category : C Source Code
Archive   : VF.ZIP
Filename : VF_DSPY.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/