Beispiel #1
0
/*! load Sppedo fonts */
void load_fontspeedo(void) {
	int nb_fonts, i;
	char fontname[128], temp[35];

	if(vq_vgdos() == GDOS_FSM) {
		graf_mouse(BUSYBEE , 0);
		nb_fonts = vst_load_fonts(work_display.handle, 0);
		fgdos = TRUE;
		i = 2;
		
		do {
			vqt_name(work_display.handle, i, temp);
			strcpy(fontname, "  ");
			strcat(fontname, temp);
			if(strlen(fontname) > 33)
				fontname[33] = '\0';
			set_text(ir_trindex[FONTS], i, fontname);
			ir_trindex[FONTS][i].ob_state &= ~DISABLED;
			i++;
		} while(((i - 1) <= nb_fonts) &&(i <= 41));
		graf_mouse(ARROW, 0);
		fid = 1;
	} /* if GDOS loaded */
	size = 13;
}	/* endof load_fontspeedo */
Beispiel #2
0
/****************************************
* check that ttf-gdos is loaded,
* save pointer to config info
* */
static bool is_ttf_gdos( void )
{
   /** look for ttf-gdos ... **/

   pInfo = (TTF_GDOS_INF_RECORD *)vq_vgdos();
   if( (int32)pInfo == GDOS_NONE	/* no gdos at all */
	|| ((int)pInfo&1) != 0		/* pointer to add address*/
	|| pInfo > (void *)get_sysvar(phystop)	/* points outside valid memory*/
	|| pInfo < (void *)0x800 /* bot of mem */
	|| pInfo->magic_nr != MAGIC_NR ) {	/* ttf-gdos not there */
	 return FALSE;
   } /* if */

   if( pInfo->version > MY_VERSION ) {
      form_alert( 1, "[3][please use latest version][good idea]");
      return FALSE;
   } /* if */

   if( pInfo->version < MY_VERSION ) {
      form_alert( 1, "[3][please upgrade to|latest version of ttf-gdos][OK]" );
      return FALSE;
   } /* if */

   return TRUE;

} /* is_ttf_gdos() */
Beispiel #3
0
/* ------------------------------------------------------------------- */
static bool is_ttf_gdos( void )
{
uint32 *p = (uint32 *)vq_vgdos();

   /** look for ttf-gdos ... **/

   return( p != (uint32*)GDOS_NONE
	&& ((uint8)p&1) == 0
	&& p <= (uint32 *)get_sysvar(phystop)
	&& p >= (uint32 *)0x800 /* bot of mem */
	&& *p == MAGIC_NR );
} /* is_ttf_gdos() */