src/vfldrvs.c

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. main

   1 /* 
   2  * vfldrvs.c - print a list of installed font drivers
   3  * by Hirotsugu Kakugawa
   4  *
   5  *  22 Jul 1998   
   6  *
   7  */
   8 /*
   9  * Copyright (C) 1998 Hirotsugu Kakugawa. 
  10  * All rights reserved.
  11  *
  12  * This program is free software; you can redistribute it and/or modify
  13  * it under the terms of the GNU General Public License as published by
  14  * the Free Software Foundation; either version 2, or (at your option)
  15  * any later version.
  16  * 
  17  * This program is distributed in the hope that it will be useful,
  18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20  * GNU General Public License for more details.
  21  * 
  22  * You should have received a copy of the GNU General Public License
  23  * along with this program; if not, write to the Free Software
  24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
  25  */
  26 
  27 /*
  28  * Usage:  vfldrvs
  29  */
  30 
  31 #include "config.h"
  32 #include <stdio.h>
  33 #include <stdlib.h>
  34 #ifdef HAVE_UNISTD_H
  35 # include <unistd.h>
  36 #endif
  37 #include "VFlib-3_6.h"
  38 
  39 
  40 int
  41 main(int argc, char **argv)
     /* [<][>][^][v][top][bottom][index][help] */
  42 {
  43   int     i;
  44   char    *vfcap, **drv_list;
  45 
  46   vfcap = NULL;
  47   --argc; argv++;
  48   while (argc > 0){
  49     if ((argc >= 2) && (strcmp(argv[0], "-v") == 0)){
  50       --argc; argv++;
  51       vfcap = argv[0];
  52       --argc; argv++;
  53     } else {
  54       break;
  55     }
  56   }
  57 
  58   if ((VF_Init(vfcap, NULL) < 0) 
  59       || ((drv_list = VF_FontDriverList()) == NULL))
  60     exit(1);
  61 
  62   for (i = 0; drv_list[i] != NULL; i++)
  63     printf("%s\n", drv_list[i]);
  64 
  65   return 0;
  66 }

/* [<][>][^][v][top][bottom][index][help] */