home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
100-199
/
ff153.lzh
/
Dme
/
src
/
cmd3.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-06-15
|
1KB
|
81 lines
/*
* CMD3.C
*
* (C)Copyright 1988 by Matthew Dillon, All Rights Reserved
*/
#include "defs.h"
#include <local/xmisc.h>
#include <stdio.h>
extern FONT *OpenFont(), *OpenDiskFont();
/*
* SETFONT font size
*/
void
do_setfont()
{
FONT *font1;
TA Ta;
Ta.ta_Name = av[1];
Ta.ta_YSize = atoi(av[2]);
Ta.ta_Style = 0;
Ta.ta_Flags = 0;
font1 = OpenFont(&Ta);
if (font1 == NULL || font1->tf_YSize != Ta.ta_YSize) {
FONT *font2;
if (openlibs(DISKFONT_LIB)) {
if (font2 = OpenDiskFont(&Ta)) {
if (font1)
CloseFont(font1);
font1 = font2;
}
closelibs(DISKFONT_LIB);
} else {
title("diskfonts failed");
}
}
if (font1) {
if (Ep->Font)
CloseFont(Ep->Font);
Ep->Font = font1;
SetFont(Ep->Win->RPort, font1);
SetRast(Ep->Win->RPort, 0);
RefreshWindowFrame(Ep->Win);
set_window_params();
text_redisplay();
} else {
title("Unable to find font");
}
}
do_ignorecase()
{
register ED *ep = Ep;
if (av[1][0]) {
switch(av[1][1] & 0x1F) {
case 'n'&0x1F:
ep->IgnoreCase = 1;
break;
case 'f'&0x1F:
ep->IgnoreCase = 0;
break;
case 'o'&0x1F:
ep->IgnoreCase = 1 - ep->IgnoreCase;
break;
}
if (ep->IgnoreCase)
title("Case InSensitive");
else
title("Case Sensitive");
}
}