ftp.nice.ch/pub/next/text/framemaker/fmbib.1.3.s.tar.gz#/bib.h

This is bib.h in view mode; [Download] [Up]

/* bib.h
 * cm, 20 Dec 90
 *
 * support for scribe-type bibliography database files.
 */

/*
 * Copyright (c) 1991 Carnegie Mellon University
 * All Rights Reserved.
 * 
 * Permission to use, copy, modify and distribute this software and its
 * documentation is hereby granted, provided that both the copyright
 * notice and this permission notice appear in all copies of the
 * software, derivative works or modified versions, and any portions
 * thereof, and that both notices appear in supporting documentation.
 *
 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
 *
 * Carnegie Mellon requests users of this software to return to
 *
 *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
 *  School of Computer Science
 *  Carnegie Mellon University
 *  Pittsburgh PA 15213-3890
 *
 * any improvements or extensions that they make and grant Carnegie Mellon
 * the rights to redistribute these changes.
 */
#define FMBIBSPEC	".fmbibfiles"

#define BIB_OPENPAREN		'('
#define BIB_CLOSEPAREN		')'
#define BIB_OPENBR		'{'
#define BIB_CLOSEBR		'}'
#define BIB_OPENBRACE		'['
#define BIB_CLOSEBRACE		']'
#define BIB_FIELDSEP		','
#define BIB_QUOTE		'"'
#define BIB_EQUALS		'='
#define BIB_AT			'@'

typedef  char RefType;
typedef  char FldType;

/* 
 * since most bibent fields are optional, bibents use only
 * a linked list of only the fields which are present.
 */
typedef struct bibfield
{
	FldType		bf_type;
	char		*bf_val;
	struct bibfield *bf_l;
	struct bibfield *bf_r;
} BibField;

/* yes, and finally, a tree of bibliography entries which
 * have been parsed, will be built, sorted by be_lookup, 
 * which is the field to be x-reffed in the text.
 */
typedef struct bibent
{
	RefType		be_reftype;	/* scribe type of bibliography entry. */
	char		*be_xref;	/* x-ref to marker (case insensitive) */
	short		be_found;	/* true if found in a bibliography file */
	long		be_rollcall;	/* bit-field for presence of field types */
	BibField 	*be_fields;	/* linked list of fields */
	struct bibent	*be_l;		/* left tree pointer */
	struct bibent	*be_r;		/* right tree pointer */
} BibEnt;

char *bib_gettok();
BibEnt *new_bibent();
BibEnt *find_bibent();
char *insert_fld();
char *find_fld();
BibField *find_bibfield();
FldType fldtype();
RefType reftype();
char *get_opp_brace();
char *fldname();
char *refname();
char *find_bibdef();

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.