src/drv_ini.c
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
- vf_drv_init
1 /*
2 * drv_ini.c - Call initialization functions of font drivers
3 * by Hirotsugu Kakugawa
4 *
5 * 21 Jul 1998
6 *
7 */
8 /*
9 * Copyright (C) 1998 Hirotsugu Kakugawa.
10 * All rights reserved.
11 *
12 * This file is part of the VFlib Library. This library is free
13 * software; you can redistribute it and/or modify it under the terms of
14 * the GNU Library General Public License as published by the Free
15 * Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. This library is distributed in the hope
17 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
18 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 * PURPOSE. See the GNU Library General Public License for more details.
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 */
24
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include "VFlib-3_6.h"
28 #include "VFsys.h"
29 #include "with.h"
30
31 extern int VF_Init_Driver_BDF(void);
32 extern int VF_Init_Driver_PCF(void);
33 extern int VF_Init_Driver_HBF(void);
34 extern int VF_Init_Driver_ZEIT(void);
35 extern int VF_Init_Driver_JG(void);
36 extern int VF_Init_Driver_EKanji(void);
37 extern int VF_Init_Driver_Type1(void);
38 extern int VF_Init_Driver_TrueType(void);
39 extern int VF_Init_Driver_TeX(void);
40 extern int VF_Init_Driver_GF(void);
41 extern int VF_Init_Driver_PK(void);
42 extern int VF_Init_Driver_TFM(void);
43 extern int VF_Init_Driver_VF(void);
44 extern int VF_Init_Driver_JTEX(void);
45 extern int VF_Init_Driver_Try(void);
46 extern int VF_Init_Driver_Comic(void);
47 extern int VF_Init_Driver_Mojikmap(void);
48
49 struct drvtbl {
50 int (*func)();
51 char *name;
52 };
53
54 struct drvtbl installed_drivers[] = {
55 #ifdef WITH_BDF
56 { VF_Init_Driver_BDF, "BDF" },
57 #endif
58 #ifdef WITH_PCF
59 { VF_Init_Driver_PCF, "PCF" },
60 #endif
61 #ifdef WITH_HBF
62 { VF_Init_Driver_HBF, "HBF" },
63 #endif
64 #ifdef WITH_TRUETYPE
65 { VF_Init_Driver_TrueType, "TrueType" },
66 #endif
67 #ifdef WITH_TYPE1
68 { VF_Init_Driver_Type1, "Type1" },
69 #endif
70 #ifdef WITH_ZEIT
71 { VF_Init_Driver_ZEIT, "Syotai Kurabu (Zeit)" },
72 #endif
73 #ifdef WITH_JG
74 { VF_Init_Driver_JG, "JG" },
75 #endif
76 #ifdef WITH_EKANJI
77 { VF_Init_Driver_EKanji, "EKanji" },
78 #endif
79 #ifdef WITH_TEXFONTS
80 { VF_Init_Driver_TeX, "TeX Font Mapper" },
81 #ifdef WITH_GF
82 { VF_Init_Driver_GF, "TeX GF" },
83 #endif
84 #ifdef WITH_PK
85 { VF_Init_Driver_PK, "TeX PK" },
86 #endif
87 #ifdef WITH_TFM
88 { VF_Init_Driver_TFM, "TeX TFM" },
89 #endif
90 #ifdef WITH_VF
91 { VF_Init_Driver_VF, "TeX Virtual Font" },
92 #endif
93 #ifdef WITH_JTEX
94 { VF_Init_Driver_JTEX, "ASCII Japanese TeX Kanji" },
95 #endif
96 #endif /*WITH_TEXFONTS*/
97 #ifdef WITH_TRY
98 { VF_Init_Driver_Try, "Try" },
99 #endif
100 #ifdef WITH_COMIC
101 { VF_Init_Driver_Comic, "Japanese Comic Composer" },
102 #endif
103 #ifdef WITH_MOJIKMAP
104 { VF_Init_Driver_Mojikmap, "Mojikyo Mapper" },
105 #endif
106 { NULL, NULL }
107 };
108
109 Glocal int
110 vf_drv_init(void)
/* [<][>][^][v][top][bottom][index][help] */
111 {
112 int i;
113
114 for (i = 0; installed_drivers[i].func != NULL; i++){
115 if ((*installed_drivers[i].func)() < 0){
116 fprintf(stderr,
117 "VFlib warning: Failed to initialize a font driver: %s\n",
118 installed_drivers[i].name);
119 }
120 }
121
122 return 0;
123 }
124