Category : C Source Code
Archive   : CGRAPHIX.ZIP
Filename : KHEADER.C

 
Output of file : KHEADER.C contained in archive : CGRAPHIX.ZIP
/* ®RM120¯®PL99999¯®TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76¯ */
#include
#define EXTERN extern
#include


void SetHeaderOn()
{
HeaderGlb = TRUE;
}


void SetHeaderOff()
{
HeaderGlb = FALSE;
}


void SetHeaderToTop()
{
TopGlb = TRUE;
}


void SetHeaderToBottom()
{
TopGlb = FALSE;
}


void RemoveHeader(i)
int i;
{
if ((1 <= i) && (MaxWindowsGlb >= i)) {
window[i].drawn = FALSE;
window[i].top = TRUE;
*(window[i].header) = EOS;
}
else
error(22, 2);
}


void DefineHeader(i, hdr)
int i;
char *hdr;
{
if ((1 <= i) && (i <= MaxWindowsGlb))
strcpy(window[i].header, hdr);
else
error(3,2);
}


static void DrawHeaderBackground(y1, y2, xl1, xl2)
int y1, y2;
int xl1, xl2;
{
int i;

for (i = y1; i <= y2; i++)
DrawStraight(xl1 , xl2, i);
}


void DrawHeader(xl1, xl2)
int xl1, xl2;
{
int Y1Hdr, Y2Hdr, yl1, yl2;

if (window[WindowNdxGlb].drawn) {
if (window[WindowNdxGlb].top) {
ReDefineWindow(WindowNdxGlb, X1RefGlb, Y1RefGlb - HeaderSizeGlb,
X2RefGlb, Y2RefGlb);
SelectWindow(WindowNdxGlb);
}
else {
ReDefineWindow(WindowNdxGlb, X1RefGlb, Y1RefGlb, X2RefGlb,
Y2RefGlb + HeaderSizeGlb);
SelectWindow(WindowNdxGlb);
}
}
if (TopGlb) {
yl1 = Y1RefGlb+HeaderSizeGlb;
yl2 = Y2RefGlb;
Y1Hdr = Y1RefGlb;
Y2Hdr = Y1RefGlb+HeaderSizeGlb-1;
}
else {
yl1 = Y1RefGlb;
yl2 = Y2RefGlb-HeaderSizeGlb;
Y1Hdr = Y2RefGlb-HeaderSizeGlb+1;
Y2Hdr = Y2RefGlb;
}
window[WindowNdxGlb].top = TopGlb;
ReDefineWindow(WindowNdxGlb,X1RefGlb,yl1,X2RefGlb,yl2);
SelectWindow(WindowNdxGlb);
DrawHeaderBackground(Y1Hdr, Y2Hdr, xl1, xl2);
ColorGlb = 255-ColorGlb;
DrawText(xl1+2+(xl2-xl1-strlen(window[WindowNdxGlb].header)*6) / 2,
Y1Hdr+3,1,window[WindowNdxGlb].header);
DrawSquare((double)xl1, (double)Y1Hdr, (double)xl2, (double)Y2Hdr,
FALSE);
ColorGlb = 255-ColorGlb;
DrawSquare((double)xl1, (double)Y1RefGlb, (double)xl2,
(double)Y2RefGlb, FALSE);
window[WindowNdxGlb].drawn = TRUE;
}



  3 Responses to “Category : C Source Code
Archive   : CGRAPHIX.ZIP
Filename : KHEADER.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/