4
* RCS Modification History:
5
* $Log: medschema.h,v $
6
* Revision 6.0 1997/08/25 18:36:35 madden
7
* Revision changed to 6.0
9
* Revision 1.2 1995/05/17 17:55:15 epstein
10
* add RCS log revision history
14
#ifndef DEFS_MODULE_MEDSCHEMA_H
18
#define MAX_STRING_SIZE 255
19
#define MAX_BINARY_SIZE 255
20
#define MAX_ABSTRACT_SIZE (6*1024)
21
#define MAX_AUTHOR_COUNT 150
22
#define MAX_MESH_COUNT 40
23
#define MAX_QUALIFIER_COUNT 10
24
#define MAX_SUBSTANCE_COUNT 50
25
#define MAX_XREF_COUNT 50
26
#define MAX_IDNUM_COUNT 20
27
#define MAX_GENESYM_COUNT 25
29
#define DbString(Name,Size) DBCHAR Name[Size+1]
30
#define DbBinary(Name,Size) DBBINARY Name[Size+1]
32
/* Define the maximum character column size */
34
typedef DBCHAR MaxString[SRV_MAXCHAR+1];
35
typedef unsigned char MaxBinary[SRV_MAXCHAR];
37
/* Define the sizes of various fields in various tables */
41
#define DBSIZE_Article_pages 40
42
#define DBSIZE_Article_title 245
43
#define DBSIZE_Article_title1 255
44
#define DBSIZE_Article_vtitle 245
45
#define DBSIZE_Article_vtitle1 255
46
#define DBSIZE_Article_address 255
48
#define DBSIZE_Abstract_abstract 255
50
#define DBSIZE_CrossReference_accession 30
52
#define DBSIZE_Databases_database_name 30
54
#define DBSIZE_Issue_volume 25
55
#define DBSIZE_Issue_issue 25
56
#define DBSIZE_Issue_pubdate 30
57
#define DBSIZE_Issue_special_list 1
59
#define DBSIZE_Language_language_code 3
60
#define DBSIZE_Mesh_heading 128
61
#define DBSIZE_Mesh_main_point 1
63
#define DBSIZE_Journal_med_abbr 128
65
#define DBSIZE_Name_name 128
67
#define DBSIZE_Subheading_code 2
68
#define DBSIZE_Subheading_main_point 1
69
#define DBSIZE_Subheading_name 30
70
#define DBSIZE_Subheading_description 60
72
#define DBSIZE_Substance_number 30
73
#define DBSIZE_Substance_name 250
75
#define DBSIZE_ResearchSupport_id 255
77
#define DBSIZE_GeneSymbol_symbol 72
80
/* NOTE: ANSI-C has a portable concatenation mechanism, unlike the
81
non ANSI-C compilers which use the code below. */
83
#define DbNColumn(Table,Column,Name) \
84
DBCHAR Name[DBSIZE_ ## Table ## _ ## Column + 1]
85
#define DbTitle(Title) \
86
DBCHAR Title[DBSIZE_Article_ ## Title + DBSIZE_Article_ ## Title ## 1 + 1]
89
/* WARNING- The method used for concatenation used in the macros
90
below is not portable. This method works for Sun compilers.
91
Your compiler may use a different method. If so, substitute
92
your concatenation operator for the slash,star,star,slash
93
below. If your compiler doesn't support concatenation, you'll
94
have to recode the types by hand. */
96
#define DbNColumn(Table,Column,Name) \
97
DBCHAR Name[DBSIZE_/**/Table/**/_/**/Column + 1]
98
#define DbTitle(Title) \
99
DBCHAR Title[DBSIZE_Article_/**/Title + DBSIZE_Article_/**/Title/**/1 + 1]
102
#define DbColumn(Table,Column) DbNColumn(Table,Column,Column)
104
#endif /* DEFS_MODULE_MEDSCHEMA_H */