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

 
Output of file : MESSAGE.C contained in archive : VF.ZIP
/*
* message -- routines used to display and clear
* messages in a reserved message area
*/

#include "message.h"

MESSAGE Ml;
extern int writec(char, int, int);

/*
* set up the message-line manager
*/

void
initmsg(r, c, w, a, pg)
int r; /* message row */
int c; /* message column */
int w; /* width of message field */
unsigned char a; /* message field video attribute */
int pg; /* active page for messages */
{
MESSAGE *mp;
void clrmsg();

mp = &Ml;
mp->m_row = r;
mp->m_col = c;
mp->m_wid = w;
mp->m_attr = a;
mp->m_pg = pg;
mp->m_flag = 1;
clrmsg();
}


/*
* showmsg -- display a message and set the message flag
*/

void
showmsg(msg)
char *msg;
{
MESSAGE *mp;

mp = &Ml;
putcur(mp->m_row, mp->m_col, mp->m_pg);
writec(' ', mp->m_wid, mp->m_pg);
putstr(msg, mp->m_pg);
mp->m_flag = 1;
return;
}


/*
* clrmsg -- erase the message area and reset the message flag
*/

void
clrmsg()
{
MESSAGE *mp;

mp = &Ml;
if (mp->m_flag != 0) {
putcur(mp->m_row, mp->m_col, mp->m_pg);
writec(' ', mp->m_wid, mp->m_pg);
mp->m_flag = 0;
}
return;
}


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