diff options
author | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
commit | b8d4bb76703bcb15578e2b23c5d256532180b894 (patch) | |
tree | bedd1df7a00521a2bd986b3c0289d6556a59e39b /support/texlab/crates/bibutils_sys/src/copactypes.c | |
parent | 02e4625a78a5029e8b5dc2a4ec70193b232f497e (diff) |
CTAN sync 201912030301
Diffstat (limited to 'support/texlab/crates/bibutils_sys/src/copactypes.c')
-rw-r--r-- | support/texlab/crates/bibutils_sys/src/copactypes.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/support/texlab/crates/bibutils_sys/src/copactypes.c b/support/texlab/crates/bibutils_sys/src/copactypes.c new file mode 100644 index 0000000000..49797eb905 --- /dev/null +++ b/support/texlab/crates/bibutils_sys/src/copactypes.c @@ -0,0 +1,49 @@ +/* + * copactypes.c + * + * Copyright (c) Chris Putnam 2004-2019 + * + * Program and source code released under the GPL version 2 + * + */ +#include <stdio.h> +#include <string.h> +#include "is_ws.h" +#include "fields.h" +#include "reftypes.h" + +/* if no specific type can be identified */ +static lookups generic[] = { + { "TI-", "TITLE" , TITLE, LEVEL_MAIN }, + { "AU-", "AUTHOR", PERSON, LEVEL_MAIN }, + { "MV-", "VOLUME", SIMPLE, LEVEL_MAIN }, + { "SE-", "TITLE", TITLE, LEVEL_HOST }, + { "ED-", "EDITION", SIMPLE, LEVEL_MAIN }, + { "SC-", "SCALE", SIMPLE, LEVEL_MAIN }, /* for maps */ + { "PU-", "PUBLISHER", SIMPLE, LEVEL_MAIN }, + { "PY-", "DATE:YEAR", SIMPLE, LEVEL_MAIN }, + { "PD-", "DESCRIPTION", SIMPLE, LEVEL_MAIN }, /* physical description */ + { "DT-", "TYPE", SIMPLE, LEVEL_MAIN }, + { "LA-", "LANGUAGE", SIMPLE, LEVEL_MAIN }, + { "IS-", "SERIALNUMBER", SERIALNO, LEVEL_MAIN }, + { "NT-", "NOTES", NOTES, LEVEL_MAIN }, + { "KW-", "KEYWORD", SIMPLE, LEVEL_MAIN }, + { "UL-", "URL", SIMPLE, LEVEL_MAIN }, + { "HL-", "LOCATION", SIMPLE, LEVEL_MAIN } +}; + +/* order is important....."Book" matches "Book" and "Book Section", hence + * "Book Section must come first */ + +#define ORIG(a) ( &(a[0]) ) +#define SIZE(a) ( sizeof( a ) / sizeof( lookups ) ) +#define REFTYPE(a,b) { a, ORIG(b), SIZE(b) } + +variants copac_all[] = { + REFTYPE( "Generic", generic ), +}; + + +int copac_nall = sizeof( copac_all ) / sizeof( variants ); + + |