static void output_citeparts( fields *f, FILE *outptr, int level, int max ) { int orig_level; output_title( f, outptr, level ); output_names( f, outptr, level ); output_origin( f, outptr, level ); output_type( f, outptr, level ); output_language( f, outptr, level ); output_description( f, outptr, level ); if ( level >= 0 && level < max ) { output_tag( outptr, lvl2indent(level), "relatedItem", NULL, TAG_OPEN, TAG_NEWLINE, "type", "host", NULL ); output_citeparts( f, outptr, incr_level(level,1), max ); output_tag( outptr, lvl2indent(level), "relatedItem", NULL, TAG_CLOSE, TAG_NEWLINE, NULL ); } /* Look for original item things */ orig_level = original_items( f, level ); if ( orig_level ) { output_tag( outptr, lvl2indent(level), "relatedItem", NULL, TAG_OPEN, TAG_NEWLINE, "type", "original", NULL ); output_citeparts( f, outptr, orig_level, max ); output_tag( outptr, lvl2indent(level), "relatedItem", NULL, TAG_CLOSE, TAG_NEWLINE, NULL ); } output_abs( f, outptr, level ); output_notes( f, outptr, level ); output_toc( f, outptr, level ); output_key( f, outptr, level ); output_sn( f, outptr, level ); output_url( f, outptr, level ); output_part( f, outptr, level ); output_recordInfo( f, outptr, level ); }
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 ); }
void adsout_write( fields *f, FILE *fp, param *p, unsigned long refnum ) { int type; fields_clearused( f ); type = get_type( f ); output_people( fp, f, "AUTHOR", "AUTHOR:ASIS", "AUTHOR:CORP", "%A", LEVEL_MAIN ); output_people( fp, f, "EDITOR", "EDITOR:ASIS", "EDITOR:CORP", "%E", LEVEL_ANY ); output_easy( fp, f, "TITLE", "%T", LEVEL_ANY ); if ( type==TYPE_ARTICLE || type==TYPE_MAGARTICLE ) output_title( fp, f, "TITLE", "SUBTITLE", "%J", LEVEL_HOST ); output_date( fp, f, "%D", LEVEL_ANY ); output_easy( fp, f, "VOLUME", "%V", LEVEL_ANY ); output_easy( fp, f, "ISSUE", "%N", LEVEL_ANY ); output_easy( fp, f, "NUMBER", "%N", LEVEL_ANY ); output_easy( fp, f, "LANGUAGE", "%M", LEVEL_ANY ); output_easyall( fp, f, "NOTES", "%X", LEVEL_ANY ); output_easy( fp, f, "ABSTRACT", "%B", LEVEL_ANY ); output_keys( fp, f, "KEYWORD", "%K", LEVEL_ANY ); output_easyall( fp, f, "URL", "%U", LEVEL_ANY ); output_easyall( fp, f, "FILEATTACH", "%U", LEVEL_ANY ); output_easyall( fp, f, "FIGATTACH", "%U", LEVEL_ANY ); output_pages( fp, f ); output_easyall( fp, f, "DOI", "%Y", LEVEL_ANY ); fprintf( fp, "%%W PHY\n%%G AUTHOR\n" ); output_Rtag( fp, f, "%R", type ); fprintf( fp, "\n" ); fflush( fp ); }
int print_midpoint_entry( FILE *stream, NUM planet, MIDPT *ptr, BITS mode, int file, char *name, int table, int global ) { const char *rpm; COUNT x; ASPEC *as; if ( ptr->total_minutes == -1 ) return( 1 ); rpm = get_report( table, global, CH__MID_PLANET ); if ( rpm == NULL ) return( 1 ); if ( output_midpoint_sign( stream, planet, ptr, name, (char *)rpm ) ) return( 1 ); if ( file != -1 ) /* show the text */ get_transfer_text_asp( planet, ptr->second_planet, ptr->sign, file, stream ); if ( mode & HOUSES ) { rpm = get_report( table, global, CH__MID_HOUSE ); if ( rpm == NULL ) return( 1 ); if ( output_midpoint_house( stream, planet, ptr, name, (char *)rpm ) ) return( 1 ); } else fputc( '\n', stream ); if ( ptr->no_aspect > 0 ) { rpm = get_report( table, global, CH__MID_ASPT ); if ( rpm == NULL ) return( 1 ); if ( output_title( stream, name, "", "", (char *)rpm ) ) return( 1 ); if ( ptr->no_aspect ) { rpm = get_report( table, global, CH__MID_ASPE ); if ( rpm == NULL ) return( 1 ); for ( x = 1, as = ptr->aspectr; x <= ptr->no_aspect; ++x, ++as ) { if ( print_aspect_entry( stream, planet, as, -1, name, (char *)rpm ) ) return( 1 ); } } fputc( '\n', stream ); } return( 1 ); }
void bibtexout_write( fields *info, FILE *fp, param *p, unsigned long refnum ) { int type; fields_clearused( info ); type = bibtexout_type( info, "", refnum, p ); output_type( fp, type, p->format_opts ); if ( !( p->format_opts & BIBOUT_DROPKEY ) ) output_citekey( fp, info, refnum, p->format_opts ); output_people( fp, info, refnum, "AUTHOR", "AUTHOR:CORP", "AUTHOR:ASIS", "author", 0, p->format_opts ); output_people( fp, info, refnum, "EDITOR", "EDITOR:CORP", "EDITOR:ASIS", "editor", -1, p->format_opts ); output_people( fp, info, refnum, "TRANSLATOR", "TRANSLATOR:CORP", "TRANSLATOR:ASIS", "translator", -1, p->format_opts ); /* item=main level title */ if ( type==TYPE_INBOOK ) output_title( fp, info, refnum, "chapter", 0, p->format_opts ); else output_title( fp, info, refnum, "title", 0, p->format_opts ); /* item=host level title */ if ( type==TYPE_ARTICLE ) output_title( fp, info, refnum, "journal", 1, p->format_opts ); else if ( type==TYPE_INBOOK ) { output_title( fp, info, refnum, "title", 1, p->format_opts ); output_title( fp, info, refnum, "series", 2, p->format_opts ); } else if ( type==TYPE_INPROCEEDINGS || type==TYPE_INCOLLECTION ) { output_title( fp, info, refnum, "booktitle", 1, p->format_opts ); output_title( fp, info, refnum, "series", 2, p->format_opts ); } else if ( type==TYPE_PHDTHESIS || type==TYPE_MASTERSTHESIS ) { output_title( fp, info, refnum, "series", 1, p->format_opts ); } else if ( type==TYPE_BOOK || type==TYPE_COLLECTION || type==TYPE_PROCEEDINGS ) output_title( fp, info, refnum, "series", 1, p->format_opts ); output_date( fp, info, refnum, p->format_opts ); output_simple( fp, info, "EDITION", "edition", p->format_opts ); output_simple( fp, info, "PUBLISHER", "publisher", p->format_opts ); output_simple( fp, info, "ADDRESS", "address", p->format_opts ); output_simple( fp, info, "VOLUME", "volume", p->format_opts ); output_issue_number( fp, info, p->format_opts ); /* output_simple( fp, info, "ISSUE", "issue", p->format_opts ); output_simple( fp, info, "NUMBER", "number", p->format_opts );s*/ output_pages( fp, info, refnum, p->format_opts ); output_simpleall( fp, info, "KEYWORD", "keywords", p->format_opts ); output_simple( fp, info, "CONTENTS", "contents", p->format_opts ); output_simple( fp, info, "ABSTRACT", "abstract", p->format_opts ); output_simple( fp, info, "LOCATION", "location", p->format_opts ); output_simple( fp, info, "DEGREEGRANTOR", "school", p->format_opts ); output_simple( fp, info, "DEGREEGRANTOR:ASIS", "school", p->format_opts ); output_simple( fp, info, "DEGREEGRANTOR:CORP", "school", p->format_opts ); output_simpleall( fp, info, "NOTES", "note", p->format_opts ); output_simpleall( fp, info, "ANNOTE", "annote", p->format_opts ); output_simple( fp, info, "ISBN", "isbn", p->format_opts ); output_simple( fp, info, "ISSN", "issn", p->format_opts ); output_simple( fp, info, "DOI", "doi", p->format_opts ); output_simpleall( fp, info, "URL", "url", p->format_opts ); output_fileattach( fp, info, p->format_opts ); output_arxiv( fp, info, p->format_opts ); output_pmid( fp, info, p->format_opts ); output_jstor( fp, info, p->format_opts ); output_simple( fp, info, "LANGUAGE", "language", p->format_opts ); if ( p->format_opts & BIBOUT_FINALCOMMA ) fprintf( fp, "," ); fprintf( fp, "\n}\n\n" ); fflush( fp ); }
int main(int argc, char *argv[]) { bool snoop = false; char *format = NULL; char opt; while ((opt = getopt(argc, argv, "hvsf:")) != -1) { switch (opt) { case 'h': printf("xtitle [-h|-v|-s|-f FORMAT] [WID ...]\n"); return EXIT_SUCCESS; break; case 'v': printf("%s\n", VERSION); return EXIT_SUCCESS; break; case 's': snoop = true; break; case 'f': format = optarg; break; } } int num = argc - optind; char **args = argv + optind; setup(); char title[MAXLEN] = {0}; if (num > 0) { char *end; for (int i = 0; i < num; i++) { errno = 0; long int wid = strtol(args[i], &end, 0); if (errno != 0 || *end != '\0') warn("Invalid window ID: '%s'.\n", args[i]); else output_title(wid, format, title, sizeof(title)); } } else { xcb_window_t win = XCB_NONE; if (get_active_window(&win)) output_title(win, format, title, sizeof(title)); if (snoop) { signal(SIGINT, hold); signal(SIGHUP, hold); signal(SIGTERM, hold); watch(root, true); watch(win, true); xcb_window_t last_win = XCB_NONE; fd_set descriptors; int fd = xcb_get_file_descriptor(dpy); running = true; xcb_flush(dpy); while (running) { FD_ZERO(&descriptors); FD_SET(fd, &descriptors); if (select(fd + 1, &descriptors, NULL, NULL, NULL) > 0) { xcb_generic_event_t *evt; while ((evt = xcb_poll_for_event(dpy)) != NULL) { if (title_changed(evt, &win, &last_win)) output_title(win, format, title, sizeof(title)); free(evt); } } if (xcb_connection_has_error(dpy)) { warn("The server closed the connection.\n"); running = false; } } } } xcb_ewmh_connection_wipe(ewmh); free(ewmh); xcb_disconnect(dpy); return EXIT_SUCCESS; }
void isiout_write( fields *f, FILE *fp, param *p, unsigned long refnum ) { int type = get_type( f ); if ( p->format_opts & BIBL_FORMAT_VERBOSE ) output_verbose( f, refnum ); output_type( fp, type ); output_people( fp, f, "AUTHOR", "AU", 0 ); output_easyall( fp, f, "AUTHOR:CORP", "AU", 0 ); output_easyall( fp, f, "AUTHOR:ASIS", "AU", 0 ); /* output_people( fp, f, "AUTHOR", "A2", 1 ); output_people( fp, f, "AUTHOR:CORP", "A2", 1 ); output_people( fp, f, "AUTHOR:ASIS", "A2", 1 ); output_people( fp, f, "AUTHOR", "A3", 2 ); output_people( fp, f, "AUTHOR:CORP", "A3", 2 ); output_people( fp, f, "AUTHOR:ASIS", "A3", 2 ); output_people( fp, f, "EDITOR", "ED", -1 ); output_people( fp, f, "EDITOR:CORP", "ED", -1 ); output_people( fp, f, "EDITOR:ASIS", "ED", -1 );*/ /* output_date( fp, f, refnum );*/ output_title( fp, f, "TI", 0 ); if ( type==TYPE_ARTICLE ) { output_title( fp, f, "SO", 1 ); output_abbrtitle( fp, f, "JI", 1 ); output_title( fp, f, "SE", 2 ); } else if ( type==TYPE_INBOOK ) { output_title( fp, f, "BT", 1 ); output_title( fp, f, "SE", 2 ); } else { /* type==BOOK */ output_title( fp, f, "SE", 1 ); } output_date( fp, f ); /* output_easy( fp, f, "PARTMONTH", "PD", -1 ); output_easy( fp, f, "PARTYEAR", "PY", -1 );*/ output_easy( fp, f, "PAGESTART", "BP", -1 ); output_easy( fp, f, "PAGEEND", "EP", -1 ); output_easy( fp, f, "ARTICLENUMBER", "AR", -1 ); /* output article number as pages */ output_easy( fp, f, "TOTALPAGES","PG", -1 ); output_easy( fp, f, "VOLUME", "VL", -1 ); output_easy( fp, f, "ISSUE", "IS", -1 ); output_easy( fp, f, "NUMBER", "IS", -1 ); output_easy( fp, f, "DOI", "DI", -1 ); output_easy( fp, f, "ISIREFNUM", "UT", -1 ); output_easy( fp, f, "LANGUAGE", "LA", -1 ); output_easy( fp, f, "ISIDELIVERNUM", "GA", -1 ); output_keywords( fp, f ); output_easy( fp, f, "ABSTRACT", "AB", -1 ); output_easy( fp, f, "TIMESCITED", "TC", -1 ); output_easy( fp, f, "NUMBERREFS", "NR", -1 ); output_easy( fp, f, "CITEDREFS", "CR", -1 ); output_easy( fp, f, "ADDRESS", "PI", -1 ); /* output_easy( fp, f, "PUBLISHER", "PB", -1 ); output_easy( fp, f, "DEGREEGRANTOR", "PB", -1 ); output_easy( fp, f, "ADDRESS", "CY", -1 ); output_easy( fp, f, "ABSTRACT", "AB", -1 ); output_easy( fp, f, "ISSN", "SN", -1 ); output_easy( fp, f, "ISBN", "SN", -1 ); output_easyall( fp, f, "URL", "UR", -1 ); output_easyall( fp, f, "FILEATTACH", "UR", -1 ); output_pubmed( fp, f, refnum ); output_easyall( fp, f, "NOTES", "N1", -1 ); output_easyall( fp, f, "REFNUM", "ID", -1 );*/ fprintf( fp, "ER\n\n" ); fflush( fp ); }
int print_entry( FILE *stream, AS_INF *inf, NUM planet, BITS mode, int fil, int aspfil, int hsfil, int midfile, AS_INF_EXT *aie, char *name, char *comment, int table, int global ) { COUNT i, ruler; ASPEC *as; MIDPT *mid; const char *rps; static char fmt5[] = { "<%s:>\x80" }; ruler = sign_rulers[sign(house_cusps[inf->house])]; if ( output_planet_sign( stream, planet, inf, -1, NULL, mode, name, comment, (char *)rppl ) ) return( 1 ); if ( mode & TEXT ) { if ( inf->cusp == -1 ) { get_transfer_text( inf->sign, planet, fil, stream ); if ( inf->retrograde ) get_transfer_text( 12, planet, fil, stream ); } else { fprintf( stream, (char *)fmt5, sign_str( inf->sign ) ); get_transfer_text( inf->sign, planet, fil, stream ); fprintf( stream, (char *)fmt5, sign_str( inf->cusp ) ); get_transfer_text( inf->cusp, planet, fil, stream ); if ( inf->retrograde ) get_transfer_text( 12, planet, fil, stream ); } } if ( mode & MISCELL ) { if ( output_planet_sign( stream, planet, inf, -1, NULL, mode, name, comment, (char *)rpmsc ) ) return( 1 ); if ( mode & TEXT ) get_transfer_text( inf->sign, (inf->misc_code & 3)+29, fil, stream ); } if ( mode & EXT_CALCS ) { rps = get_report( table, global, CH__PLAN_EXT ); if ( rps == NULL ) return( 1 ); if ( output_planet_sign_ext( stream, planet, aie, name, (char *)rps ) ) return( 1 ); } if ( mode & HOUSES && planet != ASCEND && planet != MED_COELI && planet != IM_COELI ) { if ( output_planet_house( stream, planet, inf, name, comment, (char *)rphs ) ) return( 1 ); if ( mode & TEXT ) get_transfer_text( inf->house, planet, hsfil, stream ); get_transfer_text( ruler, 13, hsfil, stream ); } if ( mode & ASPECTS ) { if ( inf->no_aspects > 0 ) { if ( output_title( stream, name, "", "", (char *)rpah ) ) return( 1 ); for ( as = inf->aspectr, i = 1; i <= inf->no_aspects; ++i, ++as ) if ( print_aspect_entry( stream, planet, as, ((mode & TEXT)?aspfil:-1), name, (char *)rpas ) ) return( 1 ); } } #ifdef DELUXE if ( inf->no_midpt > 0 ) { rps = get_report( table, global, CH__MIDPT_HD ); if ( rps == NULL ) return( 1 ); if ( output_title( stream, name, comment, "", (char *)rps ) ) return( 1 ); for ( mid = inf->midptr, i = 1; i <= inf->no_midpt; ++i, ++mid ) print_midpoint_entry( stream, planet, mid, mode, midfile, name, table, global ); } #endif fputc( '\n', stream ); return( 1 ); }
void print_results( FILE *stream, AS_INF *inf_ptr, BIRTH_DB *data, AS_INF_EXT *aie_ptr, BITS mode, NUM house_mode, DATA_PACKET *dpk, char *comment ) { COUNT i; AS_INF *inf; AS_INF_EXT *aiep; char buf1[60]; const char *report; NUM maxp, file = -1, aspfile = -1, hsfile = -1, midfile = -1; int sign, cusp, k, global = -1, table = -1, ruler; static char fmt8[] = { "<%s:>\x80" }; if ( mode & ASTEROID ) maxp = CHIRON; else if ( mode & VERT_EAST ) maxp = EAST_POINT; else maxp = PART_FORTU; if ( mode & TEXT ) { if ( mode & ASPECTS ) aspfile = open_asp_files( ASPECT_FILE ); file = open_files( PLANET_FILE ); if ( mode & HOUSES ) hsfile = open_files( HOUSE_FILE ); if ( mode & (BASE_MID|HALF_MID|FULL_MID) ) midfile = open_asp_files( MIDPOINT_SIGN ); } if ( mode & NOBIRTHTIM && ( dpk->rdp->rect_system == SOLARCHART || dpk->rdp->rect_system == FLATCHART ) ) house_mode = EQUAL; table = get_tables( REPORT_NAME, &global ); if ( table == -1 ) { er_close1: close_files( file ); close_files_asp( aspfile ); close_files( hsfile ); close_files( midfile ); return; } if ( dpk->chart_code & RELOC_CH ) k = CHH_RELOC; else k = CHH_TITLE; if ( ( report = get_report( table, global, k ) ) == NULL ) { goto er_close1; } else output_title( stream, data->name, comment, "", (char *)report ); if ( output_birth_head_group( stream, mode, data, table, house_mode, comment, dpk, global ) ) { goto er_close1; } rppl = get_report( table, global, CH__PLANET ); rphs = get_report( table, global, CH__PLAN_HOUSE ); rpah = get_report( table, global, CH__ASPECT_HD ); rpas = get_report( table, global, CH__ASPECT ); rpmsc = get_report( table, global, CH__MISC ); if ( rppl == NULL || rphs == NULL || rpas == NULL || rpah == NULL || rpmsc == NULL ) { er_close2: close_tables( table, global ); close_files( file ); close_files_asp( aspfile ); close_files( hsfile ); close_files( midfile ); return; } fputs("\n\n", stream ); if ( ferror( stream ) ) { goto er_close2; } for ( i = 0, aiep = aie_ptr, inf = inf_ptr; i <= maxp; ++i, ++inf, ++aiep ) { if ( !inf->calced ) continue; if ( x_kb_check() ) break; print_entry( stream, inf, i, mode, file, aspfile, hsfile, midfile, aiep, data->name, comment, table, global ); if ( ferror( stream ) ) { goto er_close2; } } if ( mode & TEXT ) { close_files( file ); close_files_asp( aspfile ); close_files( hsfile ); close_files( midfile ); } if ( x_kb_check() ) return; if ( mode & HOUSES ) { if ( mode & TEXT ) { if ( ( hsfile = open_files( SIGN_HOUSE_FILE ) ) == -1 ) mode &= ( 0xffff ^ TEXT ); } if ( mode & HOUSES ) out_do_house_cusps(stream,data->name, comment, "", table, global, house_cusps, CH__HOUSE_HEAD ); if ( ( report = get_report( table, global, CH__HS_SGN_HED ) ) == NULL ) { er_close3: close_tables( table, global ); close_files( hsfile ); return; } else output_title( stream, data->name, comment, "", (char *)report ); if ( ( report = get_report( table, global, CH__HOUSE_SIGN ) ) == NULL ) { goto er_close3; } if ( ( rphs = strdup( report )) == NULL ) goto er_close3; for ( i = 1; i <= 12; ++i ) { if ( x_kb_check() ) break; output_house_sign( stream, i, house_cusps[i], &cusp, &sign, data->name, (char *)rphs ); ruler = sign_rulers[sign]; if ( cusp == -1 ) { if ( mode & TEXT ) get_transfer_text( sign, i, hsfile, stream ); get_transfer_text( ruler, 13, hsfile, stream ); } else { if ( mode & TEXT ) { fprintf( stream, (char *)fmt8, sign_str( sign ) ); get_transfer_text( sign, i, hsfile, stream ); fprintf( stream, (char *)fmt8, sign_str( cusp ) ); get_transfer_text( cusp, i, hsfile, stream ); get_transfer_text( ruler, 13, hsfile, stream ); } } } if ( mode & TEXT ) close_files( hsfile ); } if ( x_kb_check() ) { close_tables( table, global ); return; } close_tables( table, global ); table = get_tables( SUMMARY_NAME, &global ); if ( table == -1 ) return; if ( mode & SUMMARY ) print_summary(stream, mode, table, global, data->name, comment ); close_tables( table, global ); }
static void endout_write( fields *info, FILE *fp, param *p, unsigned long refnum ) { int type, status; fields_clearused( info ); type = get_type( info, p, refnum ); output_type( fp, type, p ); status = output_title( fp, info, "TITLE", "SUBTITLE", "%T", LEVEL_MAIN ); if ( status==0 ) output_title( fp, info, "SHORTTITLE", "SHORTSUBTITLE", "%T", LEVEL_MAIN ); else output_title( fp, info, "SHORTTITLE", "SHORTSUBTITLE", "%!", LEVEL_MAIN ); output_people( fp, info, "AUTHOR", "%A", LEVEL_MAIN ); output_people( fp, info, "EDITOR", "%E", LEVEL_MAIN ); if ( type==TYPE_ARTICLE || type==TYPE_MAGARTICLE || type==TYPE_ELECTRONICARTICLE || type==TYPE_NEWSARTICLE ) output_people( fp, info, "EDITOR", "%E", LEVEL_HOST ); else if ( type==TYPE_INBOOK || type==TYPE_INPROCEEDINGS ) { output_people( fp, info, "EDITOR", "%E", LEVEL_HOST ); } else { output_people( fp, info, "EDITOR", "%Y", LEVEL_HOST ); } output_people( fp, info, "TRANSLATOR", "%H", LEVEL_ANY ); output_people( fp, info, "AUTHOR", "%Y", LEVEL_SERIES ); output_people( fp, info, "EDITOR", "%Y", LEVEL_SERIES ); if ( type==TYPE_CASE ) output_easy( fp, info, "AUTHOR:CORP", "%I", LEVEL_MAIN ); else if ( type==TYPE_HEARING ) output_easyall( fp, info, "AUTHOR:CORP", "%S", LEVEL_MAIN ); else if ( type==TYPE_NEWSARTICLE ) output_people( fp, info, "REPORTER", "%A", LEVEL_MAIN ); else if ( type==TYPE_COMMUNICATION ) output_people( fp, info, "RECIPIENT", "%E", LEVEL_ANY ); else { output_easyall( fp, info, "AUTHOR:CORP", "%A", LEVEL_MAIN ); output_easyall( fp, info, "AUTHOR:ASIS", "%A", LEVEL_MAIN ); output_easyall( fp, info, "EDITOR:CORP", "%E", LEVEL_ANY ); output_easyall( fp, info, "EDITOR:ASIS", "%E", LEVEL_ANY ); output_easyall( fp, info, "TRANSLATOR:CORP", "%H", LEVEL_ANY ); output_easyall( fp, info, "TRANSLATOR:ASIS", "%H", LEVEL_ANY ); } if ( type==TYPE_ARTICLE || type==TYPE_MAGARTICLE || type==TYPE_ELECTRONICARTICLE || type==TYPE_NEWSARTICLE ) { status = output_title( fp, info, "TITLE", "SUBTITLE", "%J", LEVEL_HOST ); if ( status==0 ) status = output_title( fp, info, "SHORTTITLE", "SHORTSUBTITLE", "%J", LEVEL_HOST ); } else if ( type==TYPE_INBOOK || type==TYPE_INPROCEEDINGS ) { status = output_title( fp, info, "TITLE", "SUBTITLE", "%B", LEVEL_HOST ); if ( status==0 ) output_title( fp, info, "SHORTTITLE", "SHORTSUBTITLE", "%B", LEVEL_HOST ); } else { status = output_title( fp, info, "TITLE", "SUBTITLE", "%S", LEVEL_HOST ); if ( status==0 ) output_title( fp, info, "SHORTTITLE", "SHORTSUBTITLE", "%S", LEVEL_HOST ); } if ( type!=TYPE_CASE && type!=TYPE_HEARING ) { output_title( fp, info, "TITLE", "SUBTITLE", "%S", LEVEL_SERIES ); } output_year( fp, info, LEVEL_ANY ); output_monthday( fp, info, LEVEL_ANY ); output_easy( fp, info, "VOLUME", "%V", LEVEL_ANY ); output_easy( fp, info, "ISSUE", "%N", LEVEL_ANY ); output_easy( fp, info, "NUMBER", "%N", LEVEL_ANY ); output_easy( fp, info, "EDITION", "%7", LEVEL_ANY ); output_easy( fp, info, "PUBLISHER", "%I", LEVEL_ANY ); output_easy( fp, info, "ADDRESS", "%C", LEVEL_ANY ); output_easy( fp, info, "DEGREEGRANTOR", "%C", LEVEL_ANY ); output_easy( fp, info, "DEGREEGRANTOR:CORP", "%C", LEVEL_ANY ); output_easy( fp, info, "DEGREEGRANTOR:ASIS", "%C", LEVEL_ANY ); output_easy( fp, info, "SERIALNUMBER", "%@", LEVEL_ANY ); output_easy( fp, info, "ISSN", "%@", LEVEL_ANY ); output_easy( fp, info, "ISBN", "%@", LEVEL_ANY ); output_easy( fp, info, "LANGUAGE", "%G", LEVEL_ANY ); output_easy( fp, info, "REFNUM", "%F", LEVEL_ANY ); output_easyall( fp, info, "NOTES", "%O", LEVEL_ANY ); output_easy( fp, info, "ABSTRACT", "%X", LEVEL_ANY ); output_easy( fp, info, "CLASSIFICATION", "%L", LEVEL_ANY ); output_easyall( fp, info, "KEYWORD", "%K", LEVEL_ANY ); output_easyall( fp, info, "NGENRE", "%9", LEVEL_ANY ); output_thesishint( fp, type ); output_easyall( fp, info, "DOI", "%R", LEVEL_ANY ); output_easyall( fp, info, "URL", "%U", LEVEL_ANY ); output_easyall( fp, info, "FILEATTACH", "%U", LEVEL_ANY ); output_doi( fp, info ); output_pmid( fp, info ); output_pmc( fp, info ); output_arxiv( fp, info ); output_jstor( fp, info ); output_pages( fp, info ); fprintf( fp, "\n" ); fflush( fp ); }