File: drv_ini.c

package info (click to toggle)
vflib3 3.6.14.dfsg-3+nmu3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 11,536 kB
  • ctags: 3,710
  • sloc: ansic: 35,811; sh: 10,357; asm: 3,290; makefile: 962; lisp: 123; perl: 109; awk: 43
file content (124 lines) | stat: -rw-r--r-- 3,252 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
 * drv_ini.c - Call initialization functions of font drivers
 * by Hirotsugu Kakugawa
 *
 * 21 Jul 1998  
 *
 */
/*
 * Copyright (C) 1998 Hirotsugu Kakugawa. 
 * All rights reserved.
 *
 * This file is part of the VFlib Library.  This library is free
 * software; you can redistribute it and/or modify it under the terms of
 * the GNU Library General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your
 * option) any later version.  This library is distributed in the hope
 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU Library General Public License for more details.
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#include <stdio.h>
#include <stdlib.h>
#include "VFlib-3_6.h"
#include "VFsys.h"
#include "with.h"

extern int  VF_Init_Driver_BDF(void);
extern int  VF_Init_Driver_PCF(void);
extern int  VF_Init_Driver_HBF(void);
extern int  VF_Init_Driver_ZEIT(void);
extern int  VF_Init_Driver_JG(void);
extern int  VF_Init_Driver_EKanji(void);
extern int  VF_Init_Driver_Type1(void);
extern int  VF_Init_Driver_TrueType(void);
extern int  VF_Init_Driver_TeX(void);
extern int  VF_Init_Driver_GF(void);
extern int  VF_Init_Driver_PK(void);
extern int  VF_Init_Driver_TFM(void);
extern int  VF_Init_Driver_VF(void);
extern int  VF_Init_Driver_JTEX(void);
extern int  VF_Init_Driver_Try(void);
extern int  VF_Init_Driver_Comic(void);
extern int  VF_Init_Driver_Mojikmap(void);

struct drvtbl {
  int   (*func)();
  char   *name;
};

struct drvtbl  installed_drivers[] = {
#ifdef WITH_BDF
  { VF_Init_Driver_BDF, "BDF" },
#endif
#ifdef WITH_PCF
  { VF_Init_Driver_PCF, "PCF" }, 
#endif
#ifdef WITH_HBF
  { VF_Init_Driver_HBF, "HBF" }, 
#endif
#ifdef WITH_TRUETYPE
  { VF_Init_Driver_TrueType, "TrueType" },
#endif
#ifdef WITH_TYPE1
  { VF_Init_Driver_Type1, "Type1" },
#endif
#ifdef WITH_ZEIT
  { VF_Init_Driver_ZEIT, "Syotai Kurabu (Zeit)" },
#endif
#ifdef WITH_JG
  { VF_Init_Driver_JG, "JG" },
#endif
#ifdef WITH_EKANJI
  { VF_Init_Driver_EKanji, "EKanji" },
#endif
#ifdef WITH_TEXFONTS
  { VF_Init_Driver_TeX, "TeX Font Mapper" },
#ifdef WITH_GF
  { VF_Init_Driver_GF, "TeX GF" },
#endif
#ifdef WITH_PK
  { VF_Init_Driver_PK, "TeX PK" },
#endif
#ifdef WITH_TFM
  { VF_Init_Driver_TFM, "TeX TFM" },
#endif
#ifdef WITH_VF
  { VF_Init_Driver_VF, "TeX Virtual Font" },
#endif
#ifdef WITH_JTEX
  { VF_Init_Driver_JTEX, "ASCII Japanese TeX Kanji" },
#endif
#endif /*WITH_TEXFONTS*/
#ifdef WITH_TRY
  { VF_Init_Driver_Try, "Try" },
#endif
#ifdef WITH_COMIC
  { VF_Init_Driver_Comic, "Japanese Comic Composer" },
#endif
#ifdef WITH_MOJIKMAP
  { VF_Init_Driver_Mojikmap, "Mojikyo Mapper" },
#endif
  { NULL, NULL }
};

Glocal int 
vf_drv_init(void)
{
  int   i;

  for (i = 0; installed_drivers[i].func != NULL; i++){
    if ((*installed_drivers[i].func)() < 0){
      fprintf(stderr,
	      "VFlib warning: Failed to initialize a font driver: %s\n",
	      installed_drivers[i].name);
    }
  }

  return 0;
}