file_indexing 0.0.2 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/lib/file_indexing/index_agent.rb +61 -38
  2. data/lib/file_indexing/indexer_patterns.rb +10 -3
  3. data/lib/file_indexing/version.rb +5 -0
  4. data/lib/file_indexing.rb +2 -3
  5. data/spec/file_indexing/index_agent_spec.rb +54 -0
  6. data/test/file_indexing/index_agent_test/New.txt +0 -0
  7. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/bin/libexslt.dll +0 -0
  8. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/bin/libxslt.dll +0 -0
  9. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/bin/xsltproc.exe +0 -0
  10. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/exslt.h +102 -0
  11. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/exsltconfig.h +73 -0
  12. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/exsltexports.h +140 -0
  13. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libexslt/libexslt.h +29 -0
  14. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/attributes.h +38 -0
  15. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/documents.h +93 -0
  16. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/extensions.h +262 -0
  17. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/extra.h +80 -0
  18. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/functions.h +78 -0
  19. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/imports.h +75 -0
  20. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/keys.h +53 -0
  21. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/libxslt.h +30 -0
  22. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/namespaces.h +68 -0
  23. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/numbersInternals.h +69 -0
  24. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/pattern.h +81 -0
  25. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/preproc.h +43 -0
  26. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/security.h +104 -0
  27. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/templates.h +77 -0
  28. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/transform.h +207 -0
  29. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/trio.h +216 -0
  30. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/triodef.h +220 -0
  31. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/variables.h +91 -0
  32. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/win32config.h +101 -0
  33. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xslt.h +103 -0
  34. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltInternals.h +1967 -0
  35. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltconfig.h +172 -0
  36. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltexports.h +142 -0
  37. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltlocale.h +57 -0
  38. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltutils.h +309 -0
  39. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/include/libxslt/xsltwin32config.h +105 -0
  40. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libexslt.lib +0 -0
  41. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libexslt_a.lib +0 -0
  42. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libxslt.lib +0 -0
  43. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/lib/libxslt_a.lib +0 -0
  44. data/test/file_indexing/index_agent_test/libxslt-1.1.26.win32/readme.txt +22 -0
  45. data/test/file_indexing/index_agent_test/patterns.input +3 -0
  46. data/test/file_indexing/index_agent_test.rb +53 -0
  47. metadata +129 -7
@@ -0,0 +1,216 @@
1
+ /*************************************************************************
2
+ *
3
+ * $Id$
4
+ *
5
+ * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
6
+ *
7
+ * Permission to use, copy, modify, and distribute this software for any
8
+ * purpose with or without fee is hereby granted, provided that the above
9
+ * copyright notice and this permission notice appear in all copies.
10
+ *
11
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15
+ *
16
+ *************************************************************************
17
+ *
18
+ * http://ctrio.sourceforge.net/
19
+ *
20
+ ************************************************************************/
21
+
22
+ #ifndef TRIO_TRIO_H
23
+ #define TRIO_TRIO_H
24
+
25
+ #if !defined(WITHOUT_TRIO)
26
+
27
+ /*
28
+ * Use autoconf defines if present. Packages using trio must define
29
+ * HAVE_CONFIG_H as a compiler option themselves.
30
+ */
31
+ #if defined(HAVE_CONFIG_H)
32
+ # include <config.h>
33
+ #endif
34
+
35
+ #include "triodef.h"
36
+
37
+ #include <stdio.h>
38
+ #include <stdlib.h>
39
+ #if defined(TRIO_COMPILER_ANCIENT)
40
+ # include <varargs.h>
41
+ #else
42
+ # include <stdarg.h>
43
+ #endif
44
+
45
+ #ifdef __cplusplus
46
+ extern "C" {
47
+ #endif
48
+
49
+ /*
50
+ * Error codes.
51
+ *
52
+ * Remember to add a textual description to trio_strerror.
53
+ */
54
+ enum {
55
+ TRIO_EOF = 1,
56
+ TRIO_EINVAL = 2,
57
+ TRIO_ETOOMANY = 3,
58
+ TRIO_EDBLREF = 4,
59
+ TRIO_EGAP = 5,
60
+ TRIO_ENOMEM = 6,
61
+ TRIO_ERANGE = 7,
62
+ TRIO_ERRNO = 8,
63
+ TRIO_ECUSTOM = 9
64
+ };
65
+
66
+ /* Error macros */
67
+ #define TRIO_ERROR_CODE(x) ((-(x)) & 0x00FF)
68
+ #define TRIO_ERROR_POSITION(x) ((-(x)) >> 8)
69
+ #define TRIO_ERROR_NAME(x) trio_strerror(x)
70
+
71
+ typedef int (*trio_outstream_t) TRIO_PROTO((trio_pointer_t, int));
72
+ typedef int (*trio_instream_t) TRIO_PROTO((trio_pointer_t));
73
+
74
+ TRIO_CONST char *trio_strerror TRIO_PROTO((int));
75
+
76
+ /*************************************************************************
77
+ * Print Functions
78
+ */
79
+
80
+ int trio_printf TRIO_PROTO((TRIO_CONST char *format, ...));
81
+ int trio_vprintf TRIO_PROTO((TRIO_CONST char *format, va_list args));
82
+ int trio_printfv TRIO_PROTO((TRIO_CONST char *format, void **args));
83
+
84
+ int trio_fprintf TRIO_PROTO((FILE *file, TRIO_CONST char *format, ...));
85
+ int trio_vfprintf TRIO_PROTO((FILE *file, TRIO_CONST char *format, va_list args));
86
+ int trio_fprintfv TRIO_PROTO((FILE *file, TRIO_CONST char *format, void **args));
87
+
88
+ int trio_dprintf TRIO_PROTO((int fd, TRIO_CONST char *format, ...));
89
+ int trio_vdprintf TRIO_PROTO((int fd, TRIO_CONST char *format, va_list args));
90
+ int trio_dprintfv TRIO_PROTO((int fd, TRIO_CONST char *format, void **args));
91
+
92
+ int trio_cprintf TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
93
+ TRIO_CONST char *format, ...));
94
+ int trio_vcprintf TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
95
+ TRIO_CONST char *format, va_list args));
96
+ int trio_cprintfv TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
97
+ TRIO_CONST char *format, void **args));
98
+
99
+ int trio_sprintf TRIO_PROTO((char *buffer, TRIO_CONST char *format, ...));
100
+ int trio_vsprintf TRIO_PROTO((char *buffer, TRIO_CONST char *format, va_list args));
101
+ int trio_sprintfv TRIO_PROTO((char *buffer, TRIO_CONST char *format, void **args));
102
+
103
+ int trio_snprintf TRIO_PROTO((char *buffer, size_t max, TRIO_CONST char *format, ...));
104
+ int trio_vsnprintf TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
105
+ va_list args));
106
+ int trio_snprintfv TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
107
+ void **args));
108
+
109
+ int trio_snprintfcat TRIO_PROTO((char *buffer, size_t max, TRIO_CONST char *format, ...));
110
+ int trio_vsnprintfcat TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
111
+ va_list args));
112
+
113
+ char *trio_aprintf TRIO_PROTO((TRIO_CONST char *format, ...));
114
+ char *trio_vaprintf TRIO_PROTO((TRIO_CONST char *format, va_list args));
115
+
116
+ int trio_asprintf TRIO_PROTO((char **ret, TRIO_CONST char *format, ...));
117
+ int trio_vasprintf TRIO_PROTO((char **ret, TRIO_CONST char *format, va_list args));
118
+
119
+ /*************************************************************************
120
+ * Scan Functions
121
+ */
122
+ int trio_scanf TRIO_PROTO((TRIO_CONST char *format, ...));
123
+ int trio_vscanf TRIO_PROTO((TRIO_CONST char *format, va_list args));
124
+ int trio_scanfv TRIO_PROTO((TRIO_CONST char *format, void **args));
125
+
126
+ int trio_fscanf TRIO_PROTO((FILE *file, TRIO_CONST char *format, ...));
127
+ int trio_vfscanf TRIO_PROTO((FILE *file, TRIO_CONST char *format, va_list args));
128
+ int trio_fscanfv TRIO_PROTO((FILE *file, TRIO_CONST char *format, void **args));
129
+
130
+ int trio_dscanf TRIO_PROTO((int fd, TRIO_CONST char *format, ...));
131
+ int trio_vdscanf TRIO_PROTO((int fd, TRIO_CONST char *format, va_list args));
132
+ int trio_dscanfv TRIO_PROTO((int fd, TRIO_CONST char *format, void **args));
133
+
134
+ int trio_cscanf TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
135
+ TRIO_CONST char *format, ...));
136
+ int trio_vcscanf TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
137
+ TRIO_CONST char *format, va_list args));
138
+ int trio_cscanfv TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
139
+ TRIO_CONST char *format, void **args));
140
+
141
+ int trio_sscanf TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, ...));
142
+ int trio_vsscanf TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, va_list args));
143
+ int trio_sscanfv TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, void **args));
144
+
145
+ /*************************************************************************
146
+ * Locale Functions
147
+ */
148
+ void trio_locale_set_decimal_point TRIO_PROTO((char *decimalPoint));
149
+ void trio_locale_set_thousand_separator TRIO_PROTO((char *thousandSeparator));
150
+ void trio_locale_set_grouping TRIO_PROTO((char *grouping));
151
+
152
+ /*************************************************************************
153
+ * Renaming
154
+ */
155
+ #ifdef TRIO_REPLACE_STDIO
156
+ /* Replace the <stdio.h> functions */
157
+ #ifndef HAVE_PRINTF
158
+ # define printf trio_printf
159
+ #endif
160
+ #ifndef HAVE_VPRINTF
161
+ # define vprintf trio_vprintf
162
+ #endif
163
+ #ifndef HAVE_FPRINTF
164
+ # define fprintf trio_fprintf
165
+ #endif
166
+ #ifndef HAVE_VFPRINTF
167
+ # define vfprintf trio_vfprintf
168
+ #endif
169
+ #ifndef HAVE_SPRINTF
170
+ # define sprintf trio_sprintf
171
+ #endif
172
+ #ifndef HAVE_VSPRINTF
173
+ # define vsprintf trio_vsprintf
174
+ #endif
175
+ #ifndef HAVE_SNPRINTF
176
+ # define snprintf trio_snprintf
177
+ #endif
178
+ #ifndef HAVE_VSNPRINTF
179
+ # define vsnprintf trio_vsnprintf
180
+ #endif
181
+ #ifndef HAVE_SCANF
182
+ # define scanf trio_scanf
183
+ #endif
184
+ #ifndef HAVE_VSCANF
185
+ # define vscanf trio_vscanf
186
+ #endif
187
+ #ifndef HAVE_FSCANF
188
+ # define fscanf trio_fscanf
189
+ #endif
190
+ #ifndef HAVE_VFSCANF
191
+ # define vfscanf trio_vfscanf
192
+ #endif
193
+ #ifndef HAVE_SSCANF
194
+ # define sscanf trio_sscanf
195
+ #endif
196
+ #ifndef HAVE_VSSCANF
197
+ # define vsscanf trio_vsscanf
198
+ #endif
199
+ /* These aren't stdio functions, but we make them look similar */
200
+ #define dprintf trio_dprintf
201
+ #define vdprintf trio_vdprintf
202
+ #define aprintf trio_aprintf
203
+ #define vaprintf trio_vaprintf
204
+ #define asprintf trio_asprintf
205
+ #define vasprintf trio_vasprintf
206
+ #define dscanf trio_dscanf
207
+ #define vdscanf trio_vdscanf
208
+ #endif
209
+
210
+ #ifdef __cplusplus
211
+ } /* extern "C" */
212
+ #endif
213
+
214
+ #endif /* WITHOUT_TRIO */
215
+
216
+ #endif /* TRIO_TRIO_H */
@@ -0,0 +1,220 @@
1
+ /*************************************************************************
2
+ *
3
+ * $Id$
4
+ *
5
+ * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
6
+ *
7
+ * Permission to use, copy, modify, and distribute this software for any
8
+ * purpose with or without fee is hereby granted, provided that the above
9
+ * copyright notice and this permission notice appear in all copies.
10
+ *
11
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15
+ *
16
+ ************************************************************************/
17
+
18
+ #ifndef TRIO_TRIODEF_H
19
+ #define TRIO_TRIODEF_H
20
+
21
+ /*************************************************************************
22
+ * Platform and compiler support detection
23
+ */
24
+ #if defined(__GNUC__)
25
+ # define TRIO_COMPILER_GCC
26
+ #elif defined(__SUNPRO_C)
27
+ # define TRIO_COMPILER_SUNPRO
28
+ #elif defined(__SUNPRO_CC)
29
+ # define TRIO_COMPILER_SUNPRO
30
+ # define __SUNPRO_C __SUNPRO_CC
31
+ #elif defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)
32
+ # define TRIO_COMPILER_XLC
33
+ #elif defined(_AIX) && !defined(__GNUC__)
34
+ # define TRIO_COMPILER_XLC /* Workaround for old xlc */
35
+ #elif defined(__DECC) || defined(__DECCXX)
36
+ # define TRIO_COMPILER_DECC
37
+ #elif defined(__osf__) && defined(__LANGUAGE_C__)
38
+ # define TRIO_COMPILER_DECC /* Workaround for old DEC C compilers */
39
+ #elif defined(_MSC_VER)
40
+ # define TRIO_COMPILER_MSVC
41
+ #elif defined(__BORLANDC__)
42
+ # define TRIO_COMPILER_BCB
43
+ #endif
44
+
45
+ #if defined(VMS) || defined(__VMS)
46
+ /*
47
+ * VMS is placed first to avoid identifying the platform as Unix
48
+ * based on the DECC compiler later on.
49
+ */
50
+ # define TRIO_PLATFORM_VMS
51
+ #elif defined(unix) || defined(__unix) || defined(__unix__)
52
+ # define TRIO_PLATFORM_UNIX
53
+ #elif defined(TRIO_COMPILER_XLC) || defined(_AIX)
54
+ # define TRIO_PLATFORM_UNIX
55
+ #elif defined(TRIO_COMPILER_DECC) || defined(__osf___)
56
+ # define TRIO_PLATFORM_UNIX
57
+ #elif defined(__NetBSD__)
58
+ # define TRIO_PLATFORM_UNIX
59
+ #elif defined(__QNX__)
60
+ # define TRIO_PLATFORM_UNIX
61
+ # define TRIO_PLATFORM_QNX
62
+ #elif defined(__CYGWIN__)
63
+ # define TRIO_PLATFORM_UNIX
64
+ #elif defined(AMIGA) && defined(TRIO_COMPILER_GCC)
65
+ # define TRIO_PLATFORM_UNIX
66
+ #elif defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32)
67
+ # define TRIO_PLATFORM_WIN32
68
+ #elif defined(mpeix) || defined(__mpexl)
69
+ # define TRIO_PLATFORM_MPEIX
70
+ #endif
71
+
72
+ #if defined(_AIX)
73
+ # define TRIO_PLATFORM_AIX
74
+ #elif defined(__hpux)
75
+ # define TRIO_PLATFORM_HPUX
76
+ #elif defined(sun) || defined(__sun__)
77
+ # if defined(__SVR4) || defined(__svr4__)
78
+ # define TRIO_PLATFORM_SOLARIS
79
+ # else
80
+ # define TRIO_PLATFORM_SUNOS
81
+ # endif
82
+ #endif
83
+
84
+ #if defined(__STDC__) || defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
85
+ # define TRIO_COMPILER_SUPPORTS_C89
86
+ # if defined(__STDC_VERSION__)
87
+ # define TRIO_COMPILER_SUPPORTS_C90
88
+ # if (__STDC_VERSION__ >= 199409L)
89
+ # define TRIO_COMPILER_SUPPORTS_C94
90
+ # endif
91
+ # if (__STDC_VERSION__ >= 199901L)
92
+ # define TRIO_COMPILER_SUPPORTS_C99
93
+ # endif
94
+ # elif defined(TRIO_COMPILER_SUNPRO)
95
+ # if (__SUNPRO_C >= 0x420)
96
+ # define TRIO_COMPILER_SUPPORTS_C94
97
+ # endif
98
+ # endif
99
+ #endif
100
+
101
+ #if defined(_XOPEN_SOURCE)
102
+ # if defined(_XOPEN_SOURCE_EXTENDED)
103
+ # define TRIO_COMPILER_SUPPORTS_UNIX95
104
+ # endif
105
+ # if (_XOPEN_VERSION >= 500)
106
+ # define TRIO_COMPILER_SUPPORTS_UNIX98
107
+ # endif
108
+ # if (_XOPEN_VERSION >= 600)
109
+ # define TRIO_COMPILER_SUPPORTS_UNIX01
110
+ # endif
111
+ #endif
112
+
113
+ /*************************************************************************
114
+ * Generic defines
115
+ */
116
+
117
+ #if !defined(TRIO_PUBLIC)
118
+ # define TRIO_PUBLIC
119
+ #endif
120
+ #if !defined(TRIO_PRIVATE)
121
+ # define TRIO_PRIVATE static
122
+ #endif
123
+
124
+ #if !(defined(TRIO_COMPILER_SUPPORTS_C89) || defined(__cplusplus))
125
+ # define TRIO_COMPILER_ANCIENT
126
+ #endif
127
+
128
+ #if defined(TRIO_COMPILER_ANCIENT)
129
+ # define TRIO_CONST
130
+ # define TRIO_VOLATILE
131
+ # define TRIO_SIGNED
132
+ typedef double trio_long_double_t;
133
+ typedef char * trio_pointer_t;
134
+ # define TRIO_SUFFIX_LONG(x) x
135
+ # define TRIO_PROTO(x) ()
136
+ # define TRIO_NOARGS
137
+ # define TRIO_ARGS1(list,a1) list a1;
138
+ # define TRIO_ARGS2(list,a1,a2) list a1; a2;
139
+ # define TRIO_ARGS3(list,a1,a2,a3) list a1; a2; a3;
140
+ # define TRIO_ARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4;
141
+ # define TRIO_ARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5;
142
+ # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) list a1; a2; a3; a4; a5; a6;
143
+ # define TRIO_VARGS2(list,a1,a2) list a1; a2
144
+ # define TRIO_VARGS3(list,a1,a2,a3) list a1; a2; a3
145
+ # define TRIO_VARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4
146
+ # define TRIO_VARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5
147
+ # define TRIO_VA_DECL va_dcl
148
+ # define TRIO_VA_START(x,y) va_start(x)
149
+ # define TRIO_VA_END(x) va_end(x)
150
+ #else /* ANSI C */
151
+ # define TRIO_CONST const
152
+ # define TRIO_VOLATILE volatile
153
+ # define TRIO_SIGNED signed
154
+ typedef long double trio_long_double_t;
155
+ typedef void * trio_pointer_t;
156
+ # define TRIO_SUFFIX_LONG(x) x ## L
157
+ # define TRIO_PROTO(x) x
158
+ # define TRIO_NOARGS void
159
+ # define TRIO_ARGS1(list,a1) (a1)
160
+ # define TRIO_ARGS2(list,a1,a2) (a1,a2)
161
+ # define TRIO_ARGS3(list,a1,a2,a3) (a1,a2,a3)
162
+ # define TRIO_ARGS4(list,a1,a2,a3,a4) (a1,a2,a3,a4)
163
+ # define TRIO_ARGS5(list,a1,a2,a3,a4,a5) (a1,a2,a3,a4,a5)
164
+ # define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
165
+ # define TRIO_VARGS2 TRIO_ARGS2
166
+ # define TRIO_VARGS3 TRIO_ARGS3
167
+ # define TRIO_VARGS4 TRIO_ARGS4
168
+ # define TRIO_VARGS5 TRIO_ARGS5
169
+ # define TRIO_VA_DECL ...
170
+ # define TRIO_VA_START(x,y) va_start(x,y)
171
+ # define TRIO_VA_END(x) va_end(x)
172
+ #endif
173
+
174
+ #if defined(TRIO_COMPILER_SUPPORTS_C99) || defined(__cplusplus)
175
+ # define TRIO_INLINE inline
176
+ #elif defined(TRIO_COMPILER_GCC)
177
+ # define TRIO_INLINE __inline__
178
+ #elif defined(TRIO_COMPILER_MSVC)
179
+ # define TRIO_INLINE _inline
180
+ #elif defined(TRIO_COMPILER_BCB)
181
+ # define TRIO_INLINE __inline
182
+ #else
183
+ # define TRIO_INLINE
184
+ #endif
185
+
186
+ /*************************************************************************
187
+ * Workarounds
188
+ */
189
+
190
+ #if defined(TRIO_PLATFORM_VMS)
191
+ /*
192
+ * Computations done with constants at compile time can trigger these
193
+ * even when compiling with IEEE enabled.
194
+ */
195
+ # pragma message disable (UNDERFLOW, FLOATOVERFL)
196
+
197
+ # if (__CRTL_VER < 80000000)
198
+ /*
199
+ * Although the compiler supports C99 language constructs, the C
200
+ * run-time library does not contain all C99 functions.
201
+ *
202
+ * This was the case for 70300022. Update the 80000000 value when
203
+ * it has been accurately determined what version of the library
204
+ * supports C99.
205
+ */
206
+ # if defined(TRIO_COMPILER_SUPPORTS_C99)
207
+ # undef TRIO_COMPILER_SUPPORTS_C99
208
+ # endif
209
+ # endif
210
+ #endif
211
+
212
+ /*
213
+ * Not all preprocessors supports the LL token.
214
+ */
215
+ #if defined(TRIO_COMPILER_BCB)
216
+ #else
217
+ # define TRIO_COMPILER_SUPPORTS_LL
218
+ #endif
219
+
220
+ #endif /* TRIO_TRIODEF_H */
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Summary: interface for the variable matching and lookup.
3
+ * Description: interface for the variable matching and lookup.
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+ #ifndef __XML_XSLT_VARIABLES_H__
11
+ #define __XML_XSLT_VARIABLES_H__
12
+
13
+ #include <libxml/xpath.h>
14
+ #include <libxml/xpathInternals.h>
15
+ #include "xsltexports.h"
16
+ #include "xsltInternals.h"
17
+ #include "functions.h"
18
+
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+
24
+ /**
25
+ * XSLT_REGISTER_VARIABLE_LOOKUP:
26
+ *
27
+ * Registering macro, not general purpose at all but used in different modules.
28
+ */
29
+
30
+ #define XSLT_REGISTER_VARIABLE_LOOKUP(ctxt) \
31
+ xmlXPathRegisterVariableLookup((ctxt)->xpathCtxt, \
32
+ xsltXPathVariableLookup, (void *)(ctxt)); \
33
+ xsltRegisterAllFunctions((ctxt)->xpathCtxt); \
34
+ xsltRegisterAllElement(ctxt); \
35
+ (ctxt)->xpathCtxt->extra = ctxt
36
+
37
+ /*
38
+ * Interfaces for the variable module.
39
+ */
40
+
41
+ XSLTPUBFUN int XSLTCALL
42
+ xsltEvalGlobalVariables (xsltTransformContextPtr ctxt);
43
+ XSLTPUBFUN int XSLTCALL
44
+ xsltEvalUserParams (xsltTransformContextPtr ctxt,
45
+ const char **params);
46
+ XSLTPUBFUN int XSLTCALL
47
+ xsltQuoteUserParams (xsltTransformContextPtr ctxt,
48
+ const char **params);
49
+ XSLTPUBFUN int XSLTCALL
50
+ xsltEvalOneUserParam (xsltTransformContextPtr ctxt,
51
+ const xmlChar * name,
52
+ const xmlChar * value);
53
+ XSLTPUBFUN int XSLTCALL
54
+ xsltQuoteOneUserParam (xsltTransformContextPtr ctxt,
55
+ const xmlChar * name,
56
+ const xmlChar * value);
57
+
58
+ XSLTPUBFUN void XSLTCALL
59
+ xsltParseGlobalVariable (xsltStylesheetPtr style,
60
+ xmlNodePtr cur);
61
+ XSLTPUBFUN void XSLTCALL
62
+ xsltParseGlobalParam (xsltStylesheetPtr style,
63
+ xmlNodePtr cur);
64
+ XSLTPUBFUN void XSLTCALL
65
+ xsltParseStylesheetVariable (xsltTransformContextPtr ctxt,
66
+ xmlNodePtr cur);
67
+ XSLTPUBFUN void XSLTCALL
68
+ xsltParseStylesheetParam (xsltTransformContextPtr ctxt,
69
+ xmlNodePtr cur);
70
+ XSLTPUBFUN xsltStackElemPtr XSLTCALL
71
+ xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt,
72
+ xmlNodePtr cur);
73
+ XSLTPUBFUN int XSLTCALL
74
+ xsltAddStackElemList (xsltTransformContextPtr ctxt,
75
+ xsltStackElemPtr elems);
76
+ XSLTPUBFUN void XSLTCALL
77
+ xsltFreeGlobalVariables (xsltTransformContextPtr ctxt);
78
+ XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
79
+ xsltVariableLookup (xsltTransformContextPtr ctxt,
80
+ const xmlChar *name,
81
+ const xmlChar *ns_uri);
82
+ XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
83
+ xsltXPathVariableLookup (void *ctxt,
84
+ const xmlChar *name,
85
+ const xmlChar *ns_uri);
86
+ #ifdef __cplusplus
87
+ }
88
+ #endif
89
+
90
+ #endif /* __XML_XSLT_VARIABLES_H__ */
91
+