-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmxtool.h
46 lines (33 loc) · 1.21 KB
/
mxtool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* mxtool.c
* Created by Chad Chabot on 12-02-02.
* Last updated: February 13, 2012 12:22:33 AM EST
*
* CIS*2750 W12 - A2
* Author: Chad Chabot
* 0580345
* http://www.chadchabot.com/
*/
#ifndef MXTOOL_H_
#define MXTOOL_H_ 1
#define TRUE 1
#define FALSE 0
#include "mxutil.h"
/* command execution functions
Return values: EXIT_SUCCESS or EXIT_FAILURE (stdlib.h) */
int review( const XmElem *top, FILE *outfile );
int concat( const XmElem *top1, const XmElem *top2, FILE *outfile );
enum SELECTOR { KEEP, DISCARD };
int selects( const XmElem *top, const enum SELECTOR sel, const char *pattern, FILE *outfile );
int libFormat( const XmElem *top, FILE *outfile );
int bibFormat( const XmElem *top, FILE *outfile );
/* helper functions (will be tested individually) */
int match( const char *data, const char *regex );
typedef char *BibData[4];
enum BIBFIELD { AUTHOR=0, TITLE, PUBINFO, CALLNUM };
void marc2bib( const XmElem *mrec, BibData bdata );
void sortRecs( XmElem *collection, const char *keys[] );
int marc21Setup( FILE *inputStream, XmElem **top );
int libOrBibOutput( const XmElem * top, FILE * outfile, int libFormat );
#endif