- qtime_parse_gmtstr()
: qtime.c
-- qtime_timespec_diff()
-: qtime.c
-
-- qtime_timeval_diff()
-: qtime.c
-
- qtokenbucket_consume()
: qtokenbucket.c
diff --git a/doc/html/navtreeindex1.js b/doc/html/navtreeindex1.js
index 5410f8ce..31c73b91 100644
--- a/doc/html/navtreeindex1.js
+++ b/doc/html/navtreeindex1.js
@@ -119,19 +119,14 @@ var NAVTREEINDEX1 =
"qsystem_8c.html#a572fee0d88280a0dd1f5ab0905296eea":[0,0,4,7,0],
"qsystem_8c_source.html":[0,0,4,7],
"qtime_8c.html":[0,0,4,8],
-"qtime_8c.html#a0feed44026ab24d9d366c5997a2173b4":[0,0,4,8,6],
-"qtime_8c.html#a168dde8ecfbe162b5b9dfe036c9537e1":[0,0,4,8,3],
-"qtime_8c.html#a1a3f24d676b909313177459cefa78899":[0,0,4,8,9],
-"qtime_8c.html#a689f608f871f45fb772266bf1f18cdd7":[0,0,4,8,5],
-"qtime_8c.html#a6c536941cca900b390fc199eb3b50c6b":[0,0,4,8,12],
-"qtime_8c.html#a78c99ffd76a7bb3c8c74db76207e9ab4":[0,0,4,8,1],
-"qtime_8c.html#a7e54e9b38d82df0fe112440a89b372dc":[0,0,4,8,11],
-"qtime_8c.html#a8773045a81f883f2ab00761f45e8642c":[0,0,4,8,0],
-"qtime_8c.html#a89b28885c2bb13906855cd6c34cfaed7":[0,0,4,8,7],
-"qtime_8c.html#acbacded92c55a0674eec7590b65d7a3d":[0,0,4,8,10],
-"qtime_8c.html#ad3d8a3bd0c0b677acef144f2c2ef6d73":[0,0,4,8,2],
-"qtime_8c.html#adf628449c7e5425b5c16b61f14a51eaf":[0,0,4,8,8],
-"qtime_8c.html#af33438b243066e6c60d316567196e21e":[0,0,4,8,4],
+"qtime_8c.html#a0feed44026ab24d9d366c5997a2173b4":[0,0,4,8,1],
+"qtime_8c.html#a1a3f24d676b909313177459cefa78899":[0,0,4,8,4],
+"qtime_8c.html#a689f608f871f45fb772266bf1f18cdd7":[0,0,4,8,0],
+"qtime_8c.html#a6c536941cca900b390fc199eb3b50c6b":[0,0,4,8,7],
+"qtime_8c.html#a7e54e9b38d82df0fe112440a89b372dc":[0,0,4,8,6],
+"qtime_8c.html#a89b28885c2bb13906855cd6c34cfaed7":[0,0,4,8,2],
+"qtime_8c.html#acbacded92c55a0674eec7590b65d7a3d":[0,0,4,8,5],
+"qtime_8c.html#adf628449c7e5425b5c16b61f14a51eaf":[0,0,4,8,3],
"qtime_8c_source.html":[0,0,4,8],
"qtokenbucket_8c.html":[0,0,1,5],
"qtokenbucket_8c.html#a5464647c7e3874f8517fdbe787ee6ce3":[0,0,1,5,2],
diff --git a/doc/html/qfile_8c_source.html b/doc/html/qfile_8c_source.html
index d733748d..da7a14c7 100644
--- a/doc/html/qfile_8c_source.html
+++ b/doc/html/qfile_8c_source.html
@@ -623,7 +623,7 @@
bool qfile_lock(int fd)
Lock file.
ssize_t qfile_save(const char *filepath, const void *buf, size_t size, bool append)
Save data into file.
void * qfile_load(const char *filepath, size_t *nbytes)
Load file into memory.
-bool qstrtest(int(*testfunc)(int), const char *str)
Test for an alpha-numeric string.
+bool qstrtest(int(*testfunc)(int), const char *str)
Test for an alpha-numeric string.
bool qfile_unlock(int fd)
Unlock file which is locked by qfile_lock()
char * qstrreplace(const char *mode, char *srcstr, const char *tokstr, const char *word)
Replace string or tokens as word from source string with given mode.
char * qstrlower(char *str)
Convert character to lower character.
diff --git a/doc/html/qlisttbl_8c_source.html b/doc/html/qlisttbl_8c_source.html
index 915a50e5..1b9bce09 100644
--- a/doc/html/qlisttbl_8c_source.html
+++ b/doc/html/qlisttbl_8c_source.html
@@ -1225,7 +1225,7 @@
void qlisttbl_freemulti(qlisttbl_data_t *objs)
qlisttbl->freemulti(): Deallocate object array returned by getmulti().
bool qlisttbl_putint(qlisttbl_t *tbl, const char *name, int64_t num)
qlisttbl->putInt(): Put an integer into this table as string type.
-char * qtime_gmt_str(time_t utctime)
Get GMT time string formatted like 'Wed, 11-Nov-2007 23:19:25 GMT'.
+char * qtime_gmt_str(time_t utctime)
Get GMT time string formatted like 'Wed, 11-Nov-2007 23:19:25 GMT'.
ssize_t qio_printf(int fd, int timeoutms, const char *format,...)
Formatted output to a file descriptor.
void qlisttbl_lock(qlisttbl_t *tbl)
qlisttbl->lock(): Enter critical section.
void * qlisttbl_get(qlisttbl_t *tbl, const char *name, size_t *size, bool newmem)
qlisttbl->get(): Finds an object with given name.
diff --git a/doc/html/qstring_8c.html b/doc/html/qstring_8c.html
index fab0c459..4c47b6ab 100644
--- a/doc/html/qstring_8c.html
+++ b/doc/html/qstring_8c.html
@@ -925,7 +925,7 @@
- Returns
- a pointer of malloced string which contains comma separated number if successful, otherwise returns NULL
-Definition at line 687 of file qstring.c.
+Definition at line 684 of file qstring.c.
@@ -971,7 +971,7 @@
}
- Note
- Basically you can use below test functios without creating your own version. Make sure <ctype.h> header should be included before using any of these functions. isalnum - checks for an alphanumeric character. isalpha - checks for an alphabetic character. isascii - checks whether c is a 7-bit unsigned char value that fits into the ASCII character set. isblank - checks for a blank character; that is, a space or a tab. iscntrl - checks for a control character. isdigit - checks for a digit (0 through 9). isgraph - checks for any printable character except space. islower - checks for a lower-case character. isprint - checks for any printable character including space. ispunct - checks for any printable character which is not a space or an alphanumeric character. isspace - checks for white-space characters. isupper - checks for an uppercase letter. isxdigit - checks for a hexadecimal digits. Please refer "man isalnum" for more details about these functions.
-Definition at line 748 of file qstring.c.
+Definition at line 745 of file qstring.c.
@@ -998,7 +998,7 @@
- Returns
- true if successful, otherwise returns false
-Definition at line 763 of file qstring.c.
+Definition at line 760 of file qstring.c.
@@ -1028,7 +1028,7 @@
printf("It is IPv4 address string.");
}
-Definition at line 821 of file qstring.c.
+Definition at line 818 of file qstring.c.
@@ -1081,7 +1081,7 @@
- Returns
- a pointer of malloced converted string if successful, otherwise returns NULL
qCharEncode("KOREAN_EUCKR_STRING", "EUC-KR", "UTF-8", 1.5);
-Definition at line 862 of file qstring.c.
+Definition at line 859 of file qstring.c.
diff --git a/doc/html/qstring_8c_source.html b/doc/html/qstring_8c_source.html
index a0bf4d0e..013ddea0 100644
--- a/doc/html/qstring_8c_source.html
+++ b/doc/html/qstring_8c_source.html
@@ -103,8 +103,8 @@
-
-
+
+
41 #include "qinternal.h"
42 #include "utilities/qencode.h"
43 #include "utilities/qhash.h"
@@ -718,261 +718,258 @@
-
-
-
-
- 658 GetSystemTimeAsFileTime(&ft);
- 659 time1 = (int)time(NULL);
- 660 time2 = (long)ft.dwLowDateTime;
-
-
- 663 clock_gettime(CLOCK_MONOTONIC, &tv);
- 664 time1 = (int) tv.tv_sec;
- 665 time2 = (
long) tv.tv_nsec;
-
-
-
- 669 snprintf(uniquestr,
sizeof(uniquestr),
"%u%d%d%ld%s", getpid(), rand(),
- 670 time1, time2, (seed != NULL) ? seed :
"");
-
- 672 unsigned char md5hash[16];
- 673 qhashmd5(uniquestr, strlen(uniquestr), md5hash);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 690 str = strp = (
char *) malloc(
sizeof(
char) * (14 + 1));
-
-
+
+
+
+ 657 GetSystemTimeAsFileTime(&ft);
+ 658 usec = ft.dwLowDateTime % 1000000;
+
+
+ 661 gettimeofday(&tv, NULL);
+
+
+
+
+ 666 snprintf(uniquestr,
sizeof(uniquestr),
"%u%d%lu%ld%s", getpid(), rand(),
+ 667 (
unsigned long)time(NULL), usec, (seed != NULL) ? seed :
"");
+
+ 669 unsigned char md5hash[16];
+ 670 qhashmd5(uniquestr, strlen(uniquestr), md5hash);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 687 str = strp = (
char *) malloc(
sizeof(
char) * (14 + 1));
+
+
+
+ 691 char buf[10 + 1], *bufp;
+ 692 snprintf(buf,
sizeof(buf),
"%d", abs(number));
- 694 char buf[10 + 1], *bufp;
- 695 snprintf(buf,
sizeof(buf),
"%d", abs(number));
-
-
-
- 699 for (bufp = buf; *bufp !=
'\0'; strp++, bufp++) {
-
- 701 if ((strlen(bufp)) % 3 == 1 && *(bufp + 1) !=
'\0')
-
-
-
-
-
-
-
-
-
+
+
+ 696 for (bufp = buf; *bufp !=
'\0'; strp++, bufp++) {
+
+ 698 if ((strlen(bufp)) % 3 == 1 && *(bufp + 1) !=
'\0')
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 748 bool qstrtest(
int (*testfunc)(
int),
const char *str) {
- 749 for (; *str; str++) {
- 750 if (testfunc(*str) == 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
- 764 int i, alpa, dot, gol;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 745 bool qstrtest(
int (*testfunc)(
int),
const char *str) {
+ 746 for (; *str; str++) {
+ 747 if (testfunc(*str) == 0)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 761 int i, alpa, dot, gol;
+
+
+
-
-
-
- 769 for (i = alpa = dot = gol = 0; email[i] !=
'\0'; i++) {
-
-
-
-
-
-
-
-
-
-
- 780 if ((i > 0) && (email[i - 1] ==
'@'))
-
- 782 if ((gol > 0) && (email[i - 1] ==
'.'))
-
-
-
-
-
-
- 789 if ((email[i] >=
'0') && (email[i] <=
'9'))
-
- 791 else if ((email[i] >=
'A') && (email[i] <=
'Z'))
-
- 793 else if ((email[i] >=
'a') && (email[i] <=
'z'))
-
- 795 else if ((email[i] ==
'-') || (email[i] ==
'_'))
-
-
-
-
-
-
-
- 803 if ((alpa <= 3) || (gol == 0) || (dot == 0))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 822 char *dupstr = strdup(str);
-
-
-
- 826 for (s1 = dupstr, periodcnt = 0; (s2 = strchr(s1,
'.')) != NULL;
- 827 s1 = s2 + 1, periodcnt++) {
-
-
-
- 831 if (
qstrtest(isdigit, s1) ==
false || (n = atoi(s1)) <= 0 || n >= 256) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ 766 for (i = alpa = dot = gol = 0; email[i] !=
'\0'; i++) {
+
+
+
+
+
+
+
+
+
+
+ 777 if ((i > 0) && (email[i - 1] ==
'@'))
+
+ 779 if ((gol > 0) && (email[i - 1] ==
'.'))
+
+
+
+
+
+
+ 786 if ((email[i] >=
'0') && (email[i] <=
'9'))
+
+ 788 else if ((email[i] >=
'A') && (email[i] <=
'Z'))
+
+ 790 else if ((email[i] >=
'a') && (email[i] <=
'z'))
+
+ 792 else if ((email[i] ==
'-') || (email[i] ==
'_'))
+
+
+
+
+
+
+
+ 800 if ((alpa <= 3) || (gol == 0) || (dot == 0))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 819 char *dupstr = strdup(str);
+
+
+
+ 823 for (s1 = dupstr, periodcnt = 0; (s2 = strchr(s1,
'.')) != NULL;
+ 824 s1 = s2 + 1, periodcnt++) {
+
+
+
+ 828 if (
qstrtest(isdigit, s1) ==
false || (n = atoi(s1)) <= 0 || n >= 256) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 863 const char *tocode,
float mag) {
-
-
-
+
+
+
+
+
+ 860 const char *tocode,
float mag) {
+
+
+
+
+ 865 char *fromstr = (
char *) str;
+ 866 size_t fromsize = strlen(fromstr) + 1;
- 868 char *fromstr = (
char *) str;
- 869 size_t fromsize = strlen(fromstr) + 1;
-
- 871 size_t tosize =
sizeof(char) * ((mag * (fromsize - 1)) + 1);
- 872 char *tostr = (
char *) malloc(tosize);
-
-
- 875 char *tostr1 = tostr;
-
- 877 iconv_t it = iconv_open(tocode, fromcode);
-
- 879 DEBUG(
"iconv_open() failed.");
-
-
+ 868 size_t tosize =
sizeof(char) * ((mag * (fromsize - 1)) + 1);
+ 869 char *tostr = (
char *) malloc(tosize);
+
+
+ 872 char *tostr1 = tostr;
+
+ 874 iconv_t it = iconv_open(tocode, fromcode);
+
+ 876 DEBUG(
"iconv_open() failed.");
+
+
+
+ 880 int ret = iconv(it, &fromstr, &fromsize, &tostr, &tosize);
+
- 883 int ret = iconv(it, &fromstr, &fromsize, &tostr, &tosize);
-
-
-
- 887 DEBUG(
"iconv() failed.");
-
-
-
-
-
-
-
-
-
+
+ 884 DEBUG(
"iconv() failed.");
+
+
+
+
+
+
+
+
+
char * qstrdup_between(const char *str, const char *start, const char *end)
Duplicate a substing set.
char * qhex_encode(const void *bin, size_t size)
Encode data to Hexadecimal digit format.
char * qstrcatf(char *str, const char *format,...)
Append formatted string to the end of the source str.
char * qstrupper(char *str)
Convert character to bigger character.
char * qstrtrim_tail(char *str)
Remove tailing white spaces(including CR, LF) of the string.
char * qstrgets(char *buf, size_t size, char **offset)
Get one line from the string offset.
-bool qstr_is_ip4addr(const char *str)
Test for an IPv4 address string.
+bool qstr_is_ip4addr(const char *str)
Test for an IPv4 address string.
qlist_t * qlist(int options)
Create new qlist_t linked-list container.
char * qstrtrim_head(char *str)
Remove heading white spaces of the string.
char * qstrdupf(const char *format,...)
Duplicate a formatted string.
bool qhashmd5(const void *data, size_t nbytes, void *retbuf)
Calculate 128-bit(16-bytes) MD5 hash.
-char * qstr_conv_encoding(const char *str, const char *fromcode, const char *tocode, float mag)
Convert character encoding.
+char * qstr_conv_encoding(const char *str, const char *fromcode, const char *tocode, float mag)
Convert character encoding.
char * qstrncpy(char *dst, size_t size, const char *src, size_t nbytes)
Copy src string to dst no more than n bytes.
qlist_t * qstrtokenizer(const char *str, const char *delimiters)
String Tokenizer.
char * qstrtrim(char *str)
Remove white spaces(including CR, LF) from head and tail of the string.
@@ -980,11 +977,11 @@
char * qstrcpy(char *dst, size_t size, const char *src)
Copy src string to dst.
char * qstrtok(char *str, const char *delimiters, char *retstop, int *offset)
Split string into tokens.
void * qmemdup(const void *data, size_t size)
Duplicate a copy of memory data.
-bool qstrtest(int(*testfunc)(int), const char *str)
Test for an alpha-numeric string.
+bool qstrtest(int(*testfunc)(int), const char *str)
Test for an alpha-numeric string.
char * qstrrev(char *str)
Reverse the order of characters in the string.
-bool qstr_is_email(const char *email)
Test for an email-address formatted string.
+bool qstr_is_email(const char *email)
Test for an email-address formatted string.
char * qstrreplace(const char *mode, char *srcstr, const char *tokstr, const char *word)
Replace string or tokens as word from source string with given mode.
-char * qstr_comma_number(int number)
Convert integer to comma string.
+char * qstr_comma_number(int number)
Convert integer to comma string.
char * qstrlower(char *str)
Convert character to lower character.
char * qstrunique(const char *seed)
Generate unique id.
static bool head(qhttpclient_t *client, const char *uri, int *rescode, qlisttbl_t *reqheaders, qlisttbl_t *resheaders)
qhttpclient->head(): Sends a HEAD request.
diff --git a/doc/html/qtime_8c.html b/doc/html/qtime_8c.html
index 2d3cdb4a..905a76e6 100644
--- a/doc/html/qtime_8c.html
+++ b/doc/html/qtime_8c.html
@@ -62,7 +62,6 @@