Exemple #1
0
static void
output_citeparts( fields *info, FILE *outptr, int level, int max, int type )
{
	convert origin[] = {
		{ "ADDRESS",	"b:City",	LEVEL_ANY },
		{ "PUBLISHER",	"b:Publisher",	LEVEL_ANY },
		{ "EDITION",	"b:Edition",	LEVEL_ANY }
	};
	int norigin = sizeof( origin ) / sizeof ( convert );
	
	convert parts[] = {
		{ "VOLUME",          "b:Volume",  LEVEL_ANY },
		{ "SECTION",         "b:Section", LEVEL_ANY },
		{ "ISSUE",           "b:Issue",   LEVEL_ANY },
		{ "NUMBER",          "b:Issue",   LEVEL_ANY },
		{ "PUBLICLAWNUMBER", "b:Volume",  LEVEL_ANY },
		{ "SESSION",         "b:Issue",   LEVEL_ANY },
	};
	int nparts=sizeof(parts)/sizeof(convert);
	
	output_bibkey( info, outptr );
	output_type( info, outptr, type );
	output_list( info, outptr, origin, norigin );
	output_date( info, outptr, level );
	output_includedin( info, outptr, type );
	output_list( info, outptr, parts, nparts );
	output_pages( info, outptr, level );
	output_names( info, outptr, level, type );
	output_title( info, outptr, 0 );
	output_comments( info, outptr, level );
}
Exemple #2
0
VIOAPI  VIO_Status  initialize_tag_file_output(
    FILE      *file,
    VIO_STR    comments,
    int       n_volumes )
{
    VIO_Status   status;

    /* parameter checking */

    status = VIO_OK;

    if( file == NULL )
    {
        print_error( "start_writing_tags(): passed NULL FILE ptr.\n");
        status = VIO_ERROR;
    }

    if( n_volumes != 1 && n_volumes != 2 )
    {
        print_error( "output_tag_points():" );
        print_error( " can only support 1 or 2 volumes;\n" );
        print_error( "     you've supplied %d.\n", n_volumes );
        status = VIO_ERROR;
    }

    if( status == VIO_OK )
    {
        /* okay write the file header and tag points header */

        (void) fprintf( file, "%s\n", TAG_FILE_HEADER );
        (void) fprintf( file, "%s = %d;\n", VOLUMES_STRING, n_volumes );
        output_comments( file, comments );
        (void) fprintf( file, "\n" );

        (void) fprintf( file, "%s =", TAG_POINTS_STRING );
    }

    return( status );
}
Exemple #3
0
static void
output_citeparts( fields *info, FILE *outptr, int level, int max, int type )
{
	convert origin[] = {
		{ "ADDRESS",	"b:City",	"", LEVEL_ANY },
		{ "PUBLISHER",	"b:Publisher",	"", LEVEL_ANY },
		{ "EDITION",	"b:Edition",	"", LEVEL_ANY }
	};
	int norigin = sizeof( origin ) / sizeof ( convert );
	
	convert parts[] = {
		{ "VOLUME",          "b:Volume",  "", LEVEL_ANY },
		{ "SECTION",         "b:Section", "", LEVEL_ANY },
		{ "ISSUE",           "b:Issue",   "", LEVEL_ANY },
		{ "NUMBER",          "b:Issue",   "", LEVEL_ANY },
		{ "PUBLICLAWNUMBER", "b:Volume",  "", LEVEL_ANY },
		{ "SESSION",         "b:Issue",   "", LEVEL_ANY },
		{ "URL",             "b:Url",     "", LEVEL_ANY },
		{ "JSTOR",           "b:Url",     "http://www.jstor.org/stable/", LEVEL_ANY },
		{ "ARXIV",           "b:Url",     "http://arxiv.org/abs/",        LEVEL_ANY },
		{ "PMID",            "b:Url",     "http://www.ncbi.nlm.nih.gov/pubmed/", LEVEL_ANY },
		{ "PMC",             "b:Url",     "http://www.ncbi.nlm.nih.gov/pmc/articles/", LEVEL_ANY },
		{ "DOI",             "b:Url",     "http://dx.doi.org/", LEVEL_ANY },
	};
	int nparts=sizeof(parts)/sizeof(convert);
	
	output_bibkey( info, outptr );
	output_type( info, outptr, type );
	output_list( info, outptr, origin, norigin );
	output_date( info, outptr, level );
	output_includedin( info, outptr, type );
	output_list( info, outptr, parts, nparts );
	output_pages( info, outptr, level );
	output_names( info, outptr, level, type );
	output_maintitle( info, outptr, 0 );
	output_comments( info, outptr, level );
}