1 /*- 2 * Copyright (c) 1985 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)linemod.c 5.4 (Berkeley) 04/22/91"; 10 #endif /* not lint */ 11 12 #include "imp.h" 13 14 /* 15 * Hack to set font. 16 */ 17 linemod(s) 18 char *s; 19 { 20 register char *tit; 21 register char *nam; 22 int siz = 0; 23 nam = s; 24 for(tit = "charset="; *tit; ) 25 if (*tit++ != *nam++) 26 return; 27 s = nam; 28 while(*nam) 29 switch(*nam++) { 30 case ',': 31 case '\n': 32 *--nam = 0; 33 } 34 siz = atoi(++nam); 35 if (siz == 0) { 36 while (*--nam >= '0' && *nam <= '9') 37 ; 38 siz = (atoi(++nam)*4)/3; 39 } 40 if (siz == 0) 41 siz = imPcsize; 42 setfont(s, siz); 43 } 44