From 96a50ec75c6c2879756772ddd06956d69ea5a1c2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 8 Jan 1996 08:41:22 +0000 Subject: [PATCH] Minor changes. --- include/ccl.h | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/include/ccl.h b/include/ccl.h index beeb324..a23b394 100644 --- a/include/ccl.h +++ b/include/ccl.h @@ -46,7 +46,10 @@ * CCL - header file * * $Log: ccl.h,v $ - * Revision 1.9 1995/07/20 08:15:16 adam + * Revision 1.10 1996/01/08 08:41:22 adam + * Minor changes. + * + * Revision 1.9 1995/07/20 08:15:16 adam * Bug fix: Token value for comma and OR were the same! * * Revision 1.8 1995/07/11 12:28:34 adam @@ -178,6 +181,7 @@ typedef struct ccl_qualifiers *CCL_bibset; #define CCL_TOK_MINUS 11 #define CCL_TOK_SET 12 +/* CCL token */ struct ccl_token { char kind; char len; @@ -186,41 +190,72 @@ struct ccl_token { struct ccl_token *prev; }; +/* CCL Qualifier */ struct ccl_qualifier { char *name; struct ccl_rpn_attr *attr_list; struct ccl_qualifier *next; }; +/* Generate tokens from command string - obeys all CCL opererators */ struct ccl_token *ccl_tokenize (const char *command); + +/* Generate tokens from command string - oebeys only simple tokens and + quoted strings */ struct ccl_token *ccl_token_simple (const char *command); + +/* Delete token list */ void ccl_token_del (struct ccl_token *list); +/* Parse CCL Find command - NULL-terminated string */ struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset, const char *str, int *error, int *pos); +/* Parse CCL Find command - Tokens read by ccl_tokenize */ struct ccl_rpn_node *ccl_find (CCL_bibset abibset, struct ccl_token *list, int *error, const char **pos); + +/* Return english-readable error message */ char *ccl_err_msg (int ccl_errno); + +/* Delete RPN tree returned by ccl_find */ void ccl_rpn_delete (struct ccl_rpn_node *rpn); + +/* Dump RPN tree in readable format to fd_out */ void ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out); +/* Add CCL qualifier */ void ccl_qual_add (CCL_bibset b, const char *name, int no, int *attr); + +/* Read CCL qualifier list spec from file inf */ void ccl_qual_file (CCL_bibset bibset, FILE *inf); + +/* Add CCL qualifier by using single-line spec */ void ccl_qual_fitem (CCL_bibset bibset, const char *cp, const char *qual_name); + +/* Make CCL qualifier set */ CCL_bibset ccl_qual_mk (void); + +/* Delete CCL qualifier set */ void ccl_qual_rm (CCL_bibset *b); +/* Misc. reserved words */ extern const char *ccl_token_and; extern const char *ccl_token_or; extern const char *ccl_token_not; extern const char *ccl_token_set; + +/* Whether the CCL parser is command sensitive */ extern int ccl_case_sensitive; + +/* Char-to-upper function */ extern int (*ccl_toupper)(int c); +/* String utilities */ int ccl_stricmp (const char *s1, const char *s2); int ccl_memicmp (const char *s1, const char *s2, size_t n); +/* Search for qualifier 'name' in set 'b'. */ struct ccl_rpn_attr *ccl_qual_search (CCL_bibset b, const char *name, int len); #endif -- 1.7.10.4