/* * bibprog.c * * Copyright (c) Chris Putnam 2004-2020 * * Source code released under the GPL version 2 * */ #include #include "bibutils.h" #include "bibprog.h" void bibprog( int argc, char *argv[], param *p ) { FILE *fp; bibl b; int err, i; bibl_init( &b ); if ( argc<2 ) { err = bibl_read( &b, stdin, "stdin", p ); if ( err ) bibl_reporterr( err ); } else { for ( i=1; iprogname ) fprintf( stderr, "%s: ", p->progname ); fprintf( stderr, "Processed %ld references.\n", b.n ); bibl_free( &b ); }