| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | [4/6] Formlib |
>>> Part 4 of 6...
oldy = fast_gety()+1;
fast_gotoxy(1,1);
switch(mode)
{
case 1 : fast_cprintf("OVR");break;
case 0 : fast_cprintf("INS");break;
}
fast_gotoxy(oldx,oldy);
}
char *get_FORM_data(struct form *f_f,int field)
{
if(field >= f_f->maxfields) return NULL;
if(!f_f->data[field]) return NULL;
return f_f->data[field];
}
int formfree(struct form* f_f)
{
free(f_f->formtitle);
free(f_f);
free(f_f->data);
return FORMTRUE;
}
/*
___--------------------------------------------------------------------
***********************************************************************
___--------------------------------------------------------------------
*/
/*
** fastprint.c
** these are the screen and cursor functions required by form.c
** Should not be a drama to substitute a faster_print library.
*/
#if !defined(__BORLANDC__) || !defined(__TURBOC__)
#include "MK_FP.H" /* Get it from SNIPPETS */
#else
#define FAR far
#endif
#include "fastprnt.h"
int Attrib;
char FAR *Vpos;
void fast_cprintf(char* fmt,...)
{
get_Vpos(fast_getx()+1,fast_gety()+1);
char buffer[256];
int ptr = 0;
va_list argptr;
va_start(argptr, fmt);
vsprintf(buffer, fmt, argptr);
va_end(argptr);
while (buffer[ptr])
{
if(isprint(buffer[ptr]))
{
*Vpos++ = buffer[ptr++];
*Vpos++ = Attrib;
}
}
}
void fast_putch(int ch)
{
get_Vpos(fast_getx()+1,fast_gety()+1);
*Vpos++ = ch;
*Vpos++ = Attrib;
}
int fast_setattrib(int fore,int back)
{
Attrib = ((back << 4 ) + fore) & 127 ;
return Attrib;
}
void fast_clreol()
{
unsigned poscount;
poscount = ((80*(fast_gety()-1))+fast_getx()-1) << 1;
get_Vpos(fast_getx()+1,fast_gety()+1);
while(poscount % 160)
{
*Vpos++ = ' ';
*Vpos++ = Attrib;
poscount+=2;
}
}
void fast_clrscr()
{
union REGS regs;
regs.h.ah = 6;
regs.h.al = 0;
regs.h.bl = Attrib;
regs.x.cx = 0;
regs.h.dl = 80;
regs.h.dh = 25;
int86(0x10,®s,®s);
}
void get_Vpos(int x,int y)
{
unsigned int offset;
offset = ((x-1) * 2) + ((y-1) * 160);
union REGS regs;
regs.h.ah = 0x0F;
int86(0x10,®s,®s);
regs.h.al == 7 ? Vpos = (char FAR*) MK_FP(0xB000,offset) :
Vpos = (char FAR*)MK_FP(0xB800,offset);
}
void fast_cursortype(int type)
{
union REGS regs;
regs.h.ah = 0x01;
switch (type)
{
case NORMALCURSOR : regs.h.ch = 7;
>>> Continued to next message...
___ Blue Wave/DOS v2.21
--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)SEEN-BY: 50/99 78/0 620/243 623/630 632/349 635/503 544 727 711/401 409 410 SEEN-BY: 711/413 430 808 809 932 934 712/515 713/888 714/906 800/1 7877/2809 @PATH: 635/544 50/99 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.