home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * 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");
- }
- }
-
-