]> arthur.barton.de Git - netatalk.git/blob - etc/papd/showppd.c
57fb79368b00b2c87f4bd7a40c4dc2294836c87c
[netatalk.git] / etc / papd / showppd.c
1 /*
2  * Copyright (c) 1995 Regents of The University of Michigan.
3  * All Rights Reserved.  See COPYRIGHT.
4  */
5
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <sys/syslog.h>
10 #include <sys/types.h>
11 #include <sys/param.h>
12 #include <sys/time.h>
13 #include <netatalk/at.h>
14 #include <atalk/atp.h>
15
16 #include "ppd.h"
17
18 extern struct ppd_font          *ppd_fonts;
19
20 extern struct ppd_feature       ppd_features[];
21
22
23 main( ac, av )
24     int         ac;
25     char        **av;
26 {
27     struct ppd_feature  *pfe;
28     struct ppd_font     *pfo;
29
30     if ( ac != 2 ) {
31         fprintf( stderr, "Usage:\t%s ppdfile\n", av[ 0 ] );
32         exit( 1 );
33     }
34
35     read_ppd( av[ 1 ], 0 );
36     for ( pfo = ppd_fonts; pfo; pfo = pfo->pd_next ) {
37         printf( "Font: %s\n", pfo->pd_font );
38     }
39     for ( pfe = ppd_features; pfe->pd_name; pfe++ ) {
40         printf( "Feature: %s %s\n", pfe->pd_name, pfe->pd_value );
41     }
42
43     exit( 0 );
44 }