projects
/
egate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix.
[egate.git]
/
include
/
ccl.h
diff --git
a/include/ccl.h
b/include/ccl.h
index
4ac4341
..
a23b394
100644
(file)
--- a/
include/ccl.h
+++ b/
include/ccl.h
@@
-46,7
+46,13
@@
* CCL - header file
*
* $Log: ccl.h,v $
* CCL - header file
*
* $Log: ccl.h,v $
- * Revision 1.8 1995/07/11 12:28:34 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
* New function: ccl_token_simple (split into simple tokens) and
* ccl_token_del (delete tokens).
*
* New function: ccl_token_simple (split into simple tokens) and
* ccl_token_del (delete tokens).
*
@@
-170,11
+176,12
@@
typedef struct ccl_qualifiers *CCL_bibset;
#define CCL_TOK_RP 6
#define CCL_TOK_COMMA 7
#define CCL_TOK_AND 8
#define CCL_TOK_RP 6
#define CCL_TOK_COMMA 7
#define CCL_TOK_AND 8
-#define CCL_TOK_OR 7
-#define CCL_TOK_NOT 9
-#define CCL_TOK_MINUS 10
-#define CCL_TOK_SET 11
+#define CCL_TOK_OR 9
+#define CCL_TOK_NOT 10
+#define CCL_TOK_MINUS 11
+#define CCL_TOK_SET 12
+/* CCL token */
struct ccl_token {
char kind;
char len;
struct ccl_token {
char kind;
char len;
@@
-183,41
+190,72
@@
struct ccl_token {
struct ccl_token *prev;
};
struct ccl_token *prev;
};
+/* CCL Qualifier */
struct ccl_qualifier {
char *name;
struct ccl_rpn_attr *attr_list;
struct ccl_qualifier *next;
};
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);
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);
struct ccl_token *ccl_token_simple (const char *command);
+
+/* Delete token list */
void ccl_token_del (struct ccl_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);
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);
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);
char *ccl_err_msg (int ccl_errno);
+
+/* Delete RPN tree returned by ccl_find */
void ccl_rpn_delete (struct ccl_rpn_node *rpn);
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);
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);
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);
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);
void ccl_qual_fitem (CCL_bibset bibset, const char *cp, const char *qual_name);
+
+/* Make CCL qualifier set */
CCL_bibset ccl_qual_mk (void);
CCL_bibset ccl_qual_mk (void);
+
+/* Delete CCL qualifier set */
void ccl_qual_rm (CCL_bibset *b);
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;
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;
extern int ccl_case_sensitive;
+
+/* Char-to-upper function */
extern int (*ccl_toupper)(int c);
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);
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
struct ccl_rpn_attr *ccl_qual_search (CCL_bibset b, const char *name, int len);
#endif