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