static void output_pmc( FILE *fp, fields *f ) { newstr s; int i; newstr_init( &s ); for ( i=0; i<fields_num( f ); ++i ) { if ( !fields_match_tag( f, i, "PMC" ) ) continue; pmc_to_url( f, i, "URL", &s ); if ( s.len ) fprintf( fp, "UR - %s\n", s.data ); } newstr_free( &s ); }
static void output_pmc( FILE *fp, fields *f ) { newstr pmc_url; int i, n; newstr_init( &pmc_url ); n = fields_num( f ); for ( i=0; i<n; ++i ) { if ( !fields_match_tag( f, i, "PMC" ) ) continue; pmc_to_url( f, i, "URL", &pmc_url ); if ( pmc_url.len ) fprintf( fp, "%%U %s\n", pmc_url.data ); } newstr_free( &pmc_url ); }