/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <locale.h>
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
struct skeleton {
" Author:", "%A",
" Title:", "%T",
" Journal:", "%J",
" Volume:", "%V",
" Pages:", "%P",
"Publisher:", "%I",
" City:", "%C",
" Date:", "%D",
" Other:", "%O",
" Keywords:", "%K", };
static void instruct(void);
static void rd_skel(char *);
static void trim(char []);
static void
{
\t-p: the promptfile defines alternate fields\n\
\t-a: don't include prompting for the abstract\n"));
exit(1);
}
int
{
int i;
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
if (argc == 1) {
"You must specify a bibliography file (database)."));
usage();
}
if (i >= argc - 2) {
"-p option."));
usage();
}
if (i >= argc - 1) {
"No bibliofile specified after -a."));
usage();
}
abstract = 0;
} else { /* neither -p nor -a */
"Invalid command line flag: %s\n"), argv[i]);
usage();
}
}
if (i < argc - 1) {
usage();
}
exit(1);
}
return (0);
}
static void
{
instruct();
while (1) {
putchar('\n');
for (i = 0; i < entries; i++) {
break;
}
i -= 2;
if (i < -1) {
i++;
}
continue;
if (line[0] != '\\') {
}
printf("> ");
printf("> ");
goto again;
}
} else if (line[0] != '\n') {
}
}
if (abstract) {
firstln = 1;
firstln = 0;
}
}
}
exit(1);
}
goto editloop;
}
return;
}
}
static void
{
int n;
while (--n >= 0) {
break;
}
line[++n] = '\n';
}
void
{
int i = 0, status;
i++;
if (fork() == 0) {
else /* either ed, ex, or edit */
}
exit(1);
}
}
static void
{
putchar('\n');
"Addbib will prompt you for various bibliographic fields.\n"
"If you don't need a particular field, just hit RETURN,\n"
"\tand that field will not appear in the output file.\n"
"If you want to return to previous fields in the skeleton,\n"
"\ta single minus sign will go back a field at a time.\n"
"\t(This is the best way to input multiple authors.)\n"
"If you have to continue a field or add an unusual field,\n"
"\ta trailing backslash will allow a temporary escape.\n"
"Finally, (without -a) you will be prompted for an abstract\n"
"Type in as many lines as you need, and end with a ctrl-d.\n"
"To quit, type `q' or `n' when asked if you want to continue.\n"
"To edit the database, type `edit', `vi', or `ex' instead."));
}
static void
{
int entry, i, j;
exit(1);
}
if (str[i] == '\n') {
"No tabs between promptfile fields.\n"));
"Format: prompt-string <TAB> %%key\n"));
exit(1);
}
for (i++, j = 0; str[i] != '\n'; i++, j++)
"Too many entries in promptfile.\n"));
exit(1);
}
}
}