/* Possible tags */
enum {
BEG, /* beginning of entry */
AB, /* abstract */
AN, /* database serial number */
AS, /* author (one at a time) */
AU, /* all authors */
AW, /* award_awardee */
BW, /* bw or c */
CA, /* cast: character_actor */
CN, /* cinematography */
CO, /* country */
CR, /* miscellaneous job_name */
DE, /* topic keyword */
DR, /* director */
ED, /* editor */
MP, /* MPAA rating (R, PG, etc.) */
NT, /* note */
PR, /* producer and for ...*/
PS, /* producer (repeats info in PR) */
RA, /* rating (letter) */
RD, /* release date */
RT, /* running time */
RV, /* review citation */
ST, /* production or release company (repeats info in PR) */
TI, /* title[; original foreign title] */
TX, /* paragraph of descriptive text */
VD, /* video information (format_time_company; or "Not Avail.") */
NTAG /* number of tags */
};
/*
* like moutall, but values are expected to have form:
* field1_field2
* and we are to output 'field2 (field1)' for each
* (sometimes field1 has underscores, so search from end)
*/
static void
moutall2(int tag, char *b, char *e)
{
char *p, *pn, *us, *q;
int n;
/*
* Starting from b, find next line beginning with tagtab[tag].
* Don't go past e, but assume *e==0.
* Return pointer to beginning of value (after tag), and set
* eptr to point at newline that ends the value
*/
static char *
mget(int tag, char *b, char *e, char **eptr)
{
char *p, *t, *ans;