Qore Programming Language: include/qore/QoreLib.h (6585) Source File

Qore Programming Language 0.8.11

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreLib.h
Go to the documentation of this file.
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3 QoreLib.h
4
5 Qore Programming Language
6
7 Copyright 2003 - 2013 David Nichols
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #ifndef _QORE_QORELIB_H
25
26 #define _QORE_QORELIB_H
27
28 #include <qore/common.h>
29 #include <qore/QoreThreadLock.h>
30 #include <qore/qore_bitopts.h>
31 #include <qore/safe_dslist>
32
33 #include <time.h>
34 #include <string.h>
35 #include <strings.h>
36 #include <stdlib.h>
37 #include <stdio.h>
38 #include <ctype.h>
39 #include <sys/types.h>
40
45 #undef _QORE_HAS_QORE_XMLNODE_CLASS
47
49 #undef _QORE_HAS_QORE_XMLREADER_CLASS
50
52 #undef _QORE_HAS_QORE_XMLDOC_CLASS
53
55 #define _QORE_HAS_HARD_TYPING 1
56
58 #define _QORE_HAS_DBI_EXECRAW 1
59
61 #define _QORE_HAS_TIME_ZONES 1
62
64 #define _QORE_HAS_THREAD_RESOURCE_IDS 1
65
67 #define _QORE_HAS_PREPARED_STATMENT_API 1
68
70 #define _QORE_HAS_DATASOURCE_ACTIVETRANSACTION 1
71
73 #define _QORE_HAS_DBI_SELECT_ROW 1
74
76 #define _QORE_HAS_NUMBER_TYPE 1
77
79 #define _QORE_HAS_PATH_IS_READABLE 1
80
82 #define _QORE_HAS_DBI_OPTIONS 1
83
85 #define _QORE_HAS_FIND_CREATE_TIMEZONE 1
86
88 #define _QORE_HAS_NUMBER_CONS_WITH_PREC 1
89
91 #define _QORE_HAS_FILE_OBJECT_HELPER 1
92
94 #define _QORE_HAS_QUEUE_OBJECT_HELPER 1
95
97 #define _QORE_HAS_QOREHTTPCLIENTOBJECT 1
98
100 #define _QORE_HAS_DBI_DESCRIBE 1
101
103 #define _QORE_HAS_DBI_EVENTS 1
104
106 #define _QORE_HAS_QUEUE_OBJECT 1
107
109 #define _QORE_HAS_SOCKET_PERF_API 1
110
112 #define _QORE_HAS_QL_MIT 1
113
114 // qore code flags
115 #define QC_NO_FLAGS 0
116 #define QC_NOOP (1 << 0)
117 #define QC_USES_EXTRA_ARGS (1 << 1)
118 #define QC_CONSTANT_INTERN (1 << 2)
119 #define QC_DEPRECATED (1 << 3)
120 #define QC_RET_VALUE_ONLY (1 << 4)
121 #define QC_RUNTIME_NOOP (1 << 5)
122
123 // composite flags
124 #define QC_CONSTANT (QC_CONSTANT_INTERN | QC_RET_VALUE_ONLY)
125
126 DLLEXPORT char *make_class_name(const char *fn);
128
130 DLLEXPORT QoreStringNode *q_sprintf(const class QoreListNode *params, int field, int offset, class ExceptionSink *xsink);
131
133 DLLEXPORT QoreStringNode *q_vsprintf(const class QoreListNode *params, int field, int offset, class ExceptionSink *xsink);
134
136 DLLEXPORT struct tm *q_localtime(const time_t *clock, struct tm *tms);
137
139 DLLEXPORT struct tm *q_gmtime(const time_t *clock, struct tm *tms);
140
142 DLLEXPORT int64 q_epoch();
143
145 DLLEXPORT int64 q_epoch_us(int &us);
146
148 DLLEXPORT int64 q_epoch_ns(int &us);
149
151 DLLEXPORT char *q_basename(const char *path);
152
154 DLLEXPORT char *q_basenameptr(const char *path);
155
157 DLLEXPORT char *q_dirname(const char *path);
158
160 DLLEXPORT void *q_realloc(void *ptr, size_t size);
161
162 #if (!defined _WIN32 && !defined __WIN32__) || defined __CYGWIN__
163 DLLEXPORT QoreHashNode *q_getpwuid(uid_t uid);
165
167 DLLEXPORT QoreHashNode *q_getpwnam(const char *name);
168
170 DLLEXPORT QoreHashNode *q_getgrgid(uid_t uid);
171
173 DLLEXPORT QoreHashNode *q_getgrnam(const char *name);
174
176
181 int q_uname2uid(const char *name, uid_t &uid);
182
184
189 int q_gname2gid(const char *name, gid_t &gid);
190 #endif // ! windows
191
193 DLLEXPORT void qore_setup_argv(int pos, int argc, char *argv[]);
194
196 DLLEXPORT qore_license_t qore_get_license();
197
199 DLLEXPORT void qore_exit_process(int rc);
200
202
204 class FeatureList : public safe_dslist<std::string> {
205 private:
207 DLLLOCAL FeatureList(const FeatureList&);
208
210 DLLLOCAL FeatureList& operator=(const FeatureList&);
211
212 public:
214 DLLLOCAL FeatureList();
215
217 DLLLOCAL ~FeatureList();
218 };
219
221 DLLEXPORT extern FeatureList qoreFeatureList;
222
224 static inline char *strchrs(const char *str, const char *chars) {
225 while (*str) {
226 if (strchr(chars, *str))
227 return (char *)str;
228 str++;
229 }
230 return 0;
231 }
232
234 static inline char *strnchr(const char *str, int len, char c) {
235 int i = 0;
236 while (i++ != len) {
237 if (*str == c)
238 return (char *)str;
239 ++str;
240 }
241 return 0;
242 }
243
245 static inline void strtolower(char *str) {
246 while (*(str)) {
247 (*str) = tolower(*str);
248 str++;
249 }
250 }
251
253 static inline char *strtoupper(char *str) {
254 char *p = str;
255 while (*(p)) {
256 *p = toupper(*p);
257 p++;
258 }
259 return str;
260 }
261
263 DLLEXPORT int getSecZeroInt(const AbstractQoreNode *a);
264
266 DLLEXPORT int64 getSecZeroBigInt(const AbstractQoreNode *a);
267
269 DLLEXPORT int getSecMinusOneInt(const AbstractQoreNode *a);
270
272 DLLEXPORT int64 getSecMinusOneBigInt(const AbstractQoreNode *a);
273
275 DLLEXPORT int getMsZeroInt(const AbstractQoreNode *a);
276
278 DLLEXPORT int64 getMsZeroBigInt(const AbstractQoreNode *a);
279
281 DLLEXPORT int getMsMinusOneInt(const AbstractQoreNode *a);
282
284 DLLEXPORT int64 getMsMinusOneBigInt(const AbstractQoreNode *a);
285
287 DLLEXPORT int getMicroSecZeroInt(const AbstractQoreNode *a);
288
290 DLLEXPORT int64 getMicroSecZeroInt64(const AbstractQoreNode *a);
291
293 static inline bool is_nothing(const AbstractQoreNode *n) {
294 if (!n || n->getType() == NT_NOTHING)
295 return true;
296
297 return false;
298 }
299
301 static inline void discard(AbstractQoreNode *n, ExceptionSink *xsink) {
302 if (n)
303 n->deref(xsink);
304 }
305
306 static inline const char *get_type_name(const AbstractQoreNode *n) {
307 return n ? n->getTypeName() : "NOTHING";
308 }
309
310 static inline qore_type_t get_node_type(const AbstractQoreNode *n) {
311 return n ? n->getType() : NT_NOTHING;
312 }
313
314 class BinaryNode;
315 class QoreStringNode;
316 class ExceptionSink;
317
318 typedef QoreStringNode* (*qore_uncompress_to_string_t)(const BinaryNode* b, const QoreEncoding* enc, ExceptionSink* xsink);
319
321 DLLEXPORT BinaryNode *qore_deflate(void *ptr, unsigned long len, int level, ExceptionSink *xsink);
323 DLLEXPORT QoreStringNode *qore_inflate_to_string(const BinaryNode *b, const QoreEncoding *enc, ExceptionSink *xsink);
325 DLLEXPORT BinaryNode *qore_inflate_to_binary(const BinaryNode *b, ExceptionSink *xsink);
327 DLLEXPORT BinaryNode *qore_gzip(void *ptr, unsigned long len, int level, ExceptionSink *xsink);
329 DLLEXPORT QoreStringNode *qore_gunzip_to_string(const BinaryNode *bin, const QoreEncoding *enc, ExceptionSink *xsink);
331 DLLEXPORT BinaryNode *qore_gunzip_to_binary(const BinaryNode *bin, ExceptionSink *xsink);
333 DLLEXPORT BinaryNode *qore_bzip2(void *ptr, unsigned long len, int level, ExceptionSink *xsink);
335 DLLEXPORT QoreStringNode *qore_bunzip2_to_string(const BinaryNode *bin, const QoreEncoding *enc, ExceptionSink *xsink);
337 DLLEXPORT BinaryNode *qore_bunzip2_to_binary(const BinaryNode *bin, ExceptionSink *xsink);
338
340 DLLEXPORT BinaryNode *parseBase64(const char *buf, int len, ExceptionSink *xsink);
341
343 DLLEXPORT BinaryNode *parseHex(const char *buf, int len, ExceptionSink *xsink);
344
345 class AbstractQoreZoneInfo;
346
348 DLLEXPORT const AbstractQoreZoneInfo* findCreateOffsetZone(int seconds_east);
349
351
356 DLLEXPORT const AbstractQoreZoneInfo* find_create_timezone(const char* name, ExceptionSink* xsink);
357
359 DLLEXPORT int tz_get_utc_offset(const AbstractQoreZoneInfo* tz, int64 epoch_offset, bool &is_dst, const char *&zone_name);
361 DLLEXPORT bool tz_has_dst(const AbstractQoreZoneInfo* tz);
363 DLLEXPORT const char* tz_get_region_name(const AbstractQoreZoneInfo* tz);
364
366 #define QORE_OPT_ATOMIC_OPERATIONS "atomic operations"
367 #define QORE_OPT_STACK_GUARD "stack guard"
369 #define QORE_OPT_SIGNAL_HANDLING "signal handling"
371 #define QORE_OPT_RUNTIME_STACK_TRACE "runtime stack tracing"
373 #define QORE_OPT_LIBRARY_DEBUGGING "library debugging"
375 #define QORE_OPT_SHA224 "openssl sha224"
377 #define QORE_OPT_SHA256 "openssl sha256"
379 #define QORE_OPT_SHA384 "openssl sha384"
381 #define QORE_OPT_SHA512 "openssl sha512"
383 #define QORE_OPT_MDC2 "openssl mdc2"
385 #define QORE_OPT_RC5 "openssl rc5"
387 #define QORE_OPT_MD2 "openssl md2"
389 #define QORE_OPT_TERMIOS "termios"
391 #define QORE_OPT_FILE_LOCKING "file locking"
393 #define QORE_OPT_UNIX_USERMGT "unix user management"
395 #define QORE_OPT_UNIX_FILEMGT "unix file management"
397 #define QORE_OPT_FUNC_ROUND "round()"
399 #define QORE_OPT_FUNC_TIMEGM "timegm()"
401 #define QORE_OPT_FUNC_SETEUID "seteuid()"
403 #define QORE_OPT_FUNC_SETEGID "setegid()"
405 #define QORE_OPT_FUNC_SYSTEM "system()"
407 #define QORE_OPT_FUNC_KILL "kill()"
409 #define QORE_OPT_FUNC_FORK "fork()"
411 #define QORE_OPT_FUNC_GETPPID "getppid()"
413 #define QORE_OPT_FUNC_STATVFS "statvfs()"
415 #define QORE_OPT_FUNC_SETSID "setsid()"
417 #define QORE_OPT_FUNC_IS_EXECUTABLE "is_executable()"
419
421 #define QO_OPTION 0
422 #define QO_ALGORITHM 1
423 #define QO_FUNCTION 2
424
426 struct qore_option_s {
427 const char* option;
428 const char* constant;
429 int type;
430 bool value;
431 };
432
434 DLLEXPORT QoreStringNode *q_strerror(int errnum);
436 DLLEXPORT void q_strerror(QoreString &str, int errnum);
437
439 DLLEXPORT extern const qore_option_s *qore_option_list;
441 DLLEXPORT extern size_t qore_option_list_size;
442
444
448 DLLEXPORT QoreStringNode *qore_reassign_signal(int sig, const char *name);
449
451 #define QORE_MAX(a, b) ((a) > (b) ? (a) : (b))
452
454 #define QORE_MIN(a, b) ((a) < (b) ? (a) : (b))
455
456 #define QORE_PARAM_NO_ARG (NULL)
457
458 // define QORE_PATH_MAX
459 #ifndef QORE_PATH_MAX
460 #ifdef _XOPEN_PATH_MAX
461 #define QORE_PATH_MAX _XOPEN_PATH_MAX
462 #else
463 #define QORE_PATH_MAX 1024
464 #endif
465 #endif
466
468
470 DLLEXPORT void parse_set_time_zone(const char *zone);
471
473 DLLEXPORT int qore_usleep(int64 usecs);
474
476 DLLEXPORT bool q_path_is_readable(const char* path);
477
479 DLLEXPORT bool q_parse_bool(const AbstractQoreNode* n);
480
482 DLLEXPORT bool q_parse_bool(const char* str);
483
485 DLLEXPORT bool q_get_option_value(const char* opt);
486
488 DLLEXPORT bool q_get_option_constant_value(const char* opt);
489
491 DLLEXPORT const char* q_mode_to_perm(mode_t mode, QoreString& perm);
492
493 #endif // _QORE_QORELIB_H
qore_option_list
DLLEXPORT const qore_option_s * qore_option_list
list of qore options
q_epoch_us
DLLEXPORT int64 q_epoch_us(int &us)
returns the seconds and microseconds from the epoch
find_create_timezone
DLLEXPORT const AbstractQoreZoneInfo * find_create_timezone(const char *name, ExceptionSink *xsink)
returns a time zone for the given region name or UTC offset given as a string ("+01:00") ...
FeatureList
STL-like list containing all presently-loaded Qore features.
Definition: QoreLib.h:204
QoreEncoding
defines string encoding functions in Qore
Definition: QoreEncoding.h:72
safe_dslist
templated class for a double-ended singly-linked list that can be safely read from multiple threads w...
Definition: safe_dslist:129
qore_deflate
DLLEXPORT BinaryNode * qore_deflate(void *ptr, unsigned long len, int level, ExceptionSink *xsink)
compresses data with the DEFLATE algorithm
QoreHashNode
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:41
qore_setup_argv
DLLEXPORT void qore_setup_argv(int pos, int argc, char *argv[])
sets up the Qore ARGV and QORE_ARGV values
tz_has_dst
DLLEXPORT bool tz_has_dst(const AbstractQoreZoneInfo *tz)
returns true if the zone has daylight savings time ever
qore_exit_process
DLLEXPORT void qore_exit_process(int rc)
instead of calling "exit()", call qore_exit_process() to exit without risking a crash if other thread...
make_class_name
DLLEXPORT char * make_class_name(const char *fn)
function to try and make a class name out of a file path, returns a new string that must be free()ed ...
getSecMinusOneInt
DLLEXPORT int getSecMinusOneInt(const AbstractQoreNode *a)
for getting an integer number of seconds, with -1 as the default, from either a relative time value o...
AbstractQoreNode
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:47
NT_NOTHING
const qore_type_t NT_NOTHING
type value for QoreNothingNode
Definition: node_types.h:34
qore_gunzip_to_string
DLLEXPORT QoreStringNode * qore_gunzip_to_string(const BinaryNode *bin, const QoreEncoding *enc, ExceptionSink *xsink)
gunzips compressed data to a string
q_getgrnam
DLLEXPORT QoreHashNode * q_getgrnam(const char *name)
thread-safe version of getgrnam(): returns a Qore hash of the group information from the group name i...
q_vsprintf
DLLEXPORT QoreStringNode * q_vsprintf(const class QoreListNode *params, int field, int offset, class ExceptionSink *xsink)
a string formatting function that works with Qore data structures
qore_bunzip2_to_binary
DLLEXPORT BinaryNode * qore_bunzip2_to_binary(const BinaryNode *bin, ExceptionSink *xsink)
decompresses bzip2 data to a binary
getMicroSecZeroInt
DLLEXPORT int getMicroSecZeroInt(const AbstractQoreNode *a)
for getting an integer number of microseconds, with 0 as the default, from either a relative time val...
discard
static void discard(AbstractQoreNode *n, ExceptionSink *xsink)
to deref an AbstractQoreNode (when the pointer may be 0)
Definition: QoreLib.h:301
getSecZeroBigInt
DLLEXPORT int64 getSecZeroBigInt(const AbstractQoreNode *a)
for getting an integer number of seconds, with 0 as the default, from either a relative time value or...
qore_option_s::value
bool value
the value of the option
Definition: QoreLib.h:430
parseBase64
DLLEXPORT BinaryNode * parseBase64(const char *buf, int len, ExceptionSink *xsink)
parses a string of base64-encoded data and returns a BinaryNode
tz_get_region_name
DLLEXPORT const char * tz_get_region_name(const AbstractQoreZoneInfo *tz)
returns the reion name for the given time zone
qore_bunzip2_to_string
DLLEXPORT QoreStringNode * qore_bunzip2_to_string(const BinaryNode *bin, const QoreEncoding *enc, ExceptionSink *xsink)
decompresses bzip2 data to a string
q_epoch_ns
DLLEXPORT int64 q_epoch_ns(int &us)
returns the seconds and nanoseconds from the epoch
qore_gzip
DLLEXPORT BinaryNode * qore_gzip(void *ptr, unsigned long len, int level, ExceptionSink *xsink)
gzips data
q_parse_bool
DLLEXPORT bool q_parse_bool(const AbstractQoreNode *n)
tries to parse a boolean value - standard conversion or uses q_parse_bool(const char*) if it's a stri...
FeatureList::FeatureList
DLLLOCAL FeatureList()
initialized by the library, constructor not exported
q_localtime
DLLEXPORT struct tm * q_localtime(const time_t *clock, struct tm *tms)
thread-safe version of "localtime()"
qore_type_t
signed short qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:59
AbstractQoreNode::getTypeName
virtual DLLEXPORT const char * getTypeName() const =0
returns the type name as a c string
QoreString
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:42
QoreStringNode
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:40
getMsZeroInt
DLLEXPORT int getMsZeroInt(const AbstractQoreNode *a)
for getting an integer number of milliseconds, with 0 as the default, from either a relative time val...
qore_option_s::option
const char * option
name of the option
Definition: QoreLib.h:427
qore_usleep
DLLEXPORT int qore_usleep(int64 usecs)
use this function instead of usleep(), as usleep() is not signal-safe on some platforms (ex: Solaris ...
qore_option_s
definition of the elements in the qore_option_list
Definition: QoreLib.h:426
is_nothing
static bool is_nothing(const AbstractQoreNode *n)
to check if an AbstractQoreNode object is NOTHING
Definition: QoreLib.h:293
q_gmtime
DLLEXPORT struct tm * q_gmtime(const time_t *clock, struct tm *tms)
thread-safe version of "gmtime()"
QoreListNode
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:44
q_basename
DLLEXPORT char * q_basename(const char *path)
thread-safe basename function (resulting pointer must be free()ed)
q_sprintf
DLLEXPORT QoreStringNode * q_sprintf(const class QoreListNode *params, int field, int offset, class ExceptionSink *xsink)
a string formatting function that works with Qore data structures
q_getpwuid
DLLEXPORT QoreHashNode * q_getpwuid(uid_t uid)
thread-safe version of getpwuid(): returns a Qore hash of the passwd information from the uid if poss...
qore_reassign_signal
DLLEXPORT QoreStringNode * qore_reassign_signal(int sig, const char *name)
allows a module to take over ownership of a signal
q_getgrgid
DLLEXPORT QoreHashNode * q_getgrgid(uid_t uid)
thread-safe version of getgrgid(): returns a Qore hash of the group information from the gid if possi...
q_dirname
DLLEXPORT char * q_dirname(const char *path)
thread-safe dirname function (resulting pointer must be free()ed)
getSecZeroInt
DLLEXPORT int getSecZeroInt(const AbstractQoreNode *a)
for getting an integer number of seconds, with 0 as the default, from either a relative time value or...
getMsZeroBigInt
DLLEXPORT int64 getMsZeroBigInt(const AbstractQoreNode *a)
for getting an integer number of milliseconds, with 0 as the default, from either a relative time val...
strtoupper
static char * strtoupper(char *str)
convert a string to upper-case in place
Definition: QoreLib.h:253
qore_license_t
qore_license_t
qore library and module license type identifiers
Definition: common.h:74
qore_option_s::constant
const char * constant
name of the constant for this option
Definition: QoreLib.h:428
q_get_option_value
DLLEXPORT bool q_get_option_value(const char *opt)
returns the boolean value of qore library the given option name; false if the option is unknown ...
getMicroSecZeroInt64
DLLEXPORT int64 getMicroSecZeroInt64(const AbstractQoreNode *a)
for getting an integer number of microseconds, with 0 as the default, from either a relative time val...
qore_bzip2
DLLEXPORT BinaryNode * qore_bzip2(void *ptr, unsigned long len, int level, ExceptionSink *xsink)
compresses data with bzip2
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:35
q_path_is_readable
DLLEXPORT bool q_path_is_readable(const char *path)
platform-independent API that tells if the given path is readable by the current user ...
q_strerror
DLLEXPORT QoreStringNode * q_strerror(int errnum)
returns the error string as a QoreStringNode
q_mode_to_perm
DLLEXPORT const char * q_mode_to_perm(mode_t mode, QoreString &perm)
concatenates UNIX-style permissions to perm and from mode and returns a string giving the file type ...
qore_gunzip_to_binary
DLLEXPORT BinaryNode * qore_gunzip_to_binary(const BinaryNode *bin, ExceptionSink *xsink)
gunzips compressed data to a binary
strtolower
static void strtolower(char *str)
convert a string to lower-case in place
Definition: QoreLib.h:245
AbstractQoreNode::deref
DLLEXPORT void deref(ExceptionSink *xsink)
decrements the reference count and calls derefImpl() if there_can_be_only_one is false, otherwise does nothing
qore_get_license
DLLEXPORT qore_license_t qore_get_license()
returns the license type that the library has been initialized under
getMsMinusOneBigInt
DLLEXPORT int64 getMsMinusOneBigInt(const AbstractQoreNode *a)
for getting an integer number of milliseconds, with -1 as the default, from either a relative time va...
getSecMinusOneBigInt
DLLEXPORT int64 getSecMinusOneBigInt(const AbstractQoreNode *a)
for getting an integer number of seconds, with -1 as the default, from either a relative time value o...
q_uname2uid
int q_uname2uid(const char *name, uid_t &uid)
thread-safe way to lookup a uid from a username
parse_set_time_zone
DLLEXPORT void parse_set_time_zone(const char *zone)
to set the time zone from the command line
qore_option_s::type
int type
the type of the option
Definition: QoreLib.h:429
qore_inflate_to_string
DLLEXPORT QoreStringNode * qore_inflate_to_string(const BinaryNode *b, const QoreEncoding *enc, ExceptionSink *xsink)
decompresses data compressed with the DEFLATE algorithm to a string
AbstractQoreNode::getType
DLLLOCAL qore_type_t getType() const
returns the data type
Definition: AbstractQoreNode.h:286
getMsMinusOneInt
DLLEXPORT int getMsMinusOneInt(const AbstractQoreNode *a)
for getting an integer number of milliseconds, with -1 as the default, from either a relative time va...
strnchr
static char * strnchr(const char *str, int len, char c)
find a character in a string up to len
Definition: QoreLib.h:234
q_epoch
DLLEXPORT int64 q_epoch()
returns the seconds from the epoch
common.h
q_gname2gid
int q_gname2gid(const char *name, gid_t &gid)
thread-safe way to lookup a gid from a group name
FeatureList::~FeatureList
DLLLOCAL ~FeatureList()
destructor not exported
findCreateOffsetZone
DLLEXPORT const AbstractQoreZoneInfo * findCreateOffsetZone(int seconds_east)
returns a time zone for the given time zone UTC offset
q_basenameptr
DLLEXPORT char * q_basenameptr(const char *path)
returns a pointer within the same string
q_get_option_constant_value
DLLEXPORT bool q_get_option_constant_value(const char *opt)
returns the boolean value of qore library the given name of the constant for the option; false if the...
parseHex
DLLEXPORT BinaryNode * parseHex(const char *buf, int len, ExceptionSink *xsink)
parses a string of hex characters and returns a BinaryNode
q_realloc
DLLEXPORT void * q_realloc(void *ptr, size_t size)
frees memory if there is an allocation error
q_getpwnam
DLLEXPORT QoreHashNode * q_getpwnam(const char *name)
thread-safe version of getpwnam(): returns a Qore hash of the passwd information from the username if...
strchrs
static char * strchrs(const char *str, const char *chars)
find one of any characters in a string
Definition: QoreLib.h:224
qore_inflate_to_binary
DLLEXPORT BinaryNode * qore_inflate_to_binary(const BinaryNode *b, ExceptionSink *xsink)
decompresses data compressed with the DEFLATE algorithm to a binary
qore_option_list_size
DLLEXPORT size_t qore_option_list_size
number of elements in the option list
qoreFeatureList
DLLEXPORT FeatureList qoreFeatureList
list of qore features
BinaryNode
holds arbitrary binary data
Definition: BinaryNode.h:33
tz_get_utc_offset
DLLEXPORT int tz_get_utc_offset(const AbstractQoreZoneInfo *tz, int64 epoch_offset, bool &is_dst, const char *&zone_name)
returns the UTC offset and local time zone name for the given time given as seconds from the epoch (1...