File: marc.c

package info (click to toggle)
bibutils 4.8-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,512 kB
  • ctags: 1,340
  • sloc: ansic: 72,394; csh: 216; makefile: 117
file content (120 lines) | stat: -rw-r--r-- 1,988 bytes parent folder | download | duplicates (4)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include "marc.h"
#include <string.h>

int
marc_findgenre( char *query )
{
	char *marc[] = { 
		"abstract or summary",
		"art original", 
		"art reproduction",
		"article",
		"atlas",
		"autobiography", 
		"bibliography",
		"biography",
		"book",
		"catalog", 
		"chart",
		"comic strip",
		"conference publication",
		"database",
		"dictionary",
		"diorama",
		"directory",
		"discography",
		"drama",
		"encyclopedia",
		"essay",
		"festschrift",
		"fiction",
       		"filmography",
		"filmstrip",
		"finding aid",
		"flash card",
		"folktale",
		"font",
		"game",
		"government publication",
		"graphic",
		"globe",
		"handbook",
		"history",
		"humor, satire",
		"index",
		"instruction",
		"interview",
		"kit",
		"language instruction",
		"law report or digest",
		"legal article",
		"legal case and case notes",
		"legislation",
		"letter",
		"loose-leaf",
		"map",
		"memoir",
		"microscope slide",
		"model",
		"motion picture",
		"multivolume monograph",
		"newspaper",
		"novel",
		"numeric data",
		"offprint",
		"online system or service",
		"patent",
		"periodical",
		"picture",
		"poetry",
		"programmed text",
		"realia",
		"rehearsal",
		"remote sensing image",
		"reporting",
		"review",
		"series",
		"short story",
		"slide",
		"sound",
		"speech",
		"statistics",
		"survey of literature",
		"technical drawing",
		"technical report",
		"thesis",
		"toy",
		"transparency",
		"treaty",
		"videorecording",
		"web site" 
	};
	int nmarc = sizeof( marc ) / sizeof( char* );
	int i;
	for ( i=0; i<nmarc; ++i ) {
		if ( !strcasecmp( query, marc[i] ) ) return i;
	}
	return -1;
}

int
marc_findresource( char *query )
{
	char *marc[] = { 
		"cartographic",
		"mixed material",
		"moving image",
		"notated music",
		"software, multimedia",
		"sound recording",
		"still image",
		"text",
		"three dimensional object"
	};
	int nmarc = sizeof( marc ) / sizeof( char* );
	int i;
	for ( i=0; i<nmarc; ++i ) {
		if ( !strcasecmp( query, marc[i] ) ) return i;
	}
	return -1;
}