logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tcutil - the utility API

Api Of Array List

       The function `tclistnew' is used in order to create a list object.

              TCLIST*tclistnew(void);
                     The return value is the new list object.

       The function `tclistnew2' is used in order to create a list object with expecting the number of elements.

              TCLIST*tclistnew2(intanum);
                     `anum' specifies the number of elements expected to be stored in the list.
                     The return value is the new list object.

       The function `tclistnew3' is used in order to create a list object with initial string elements.

              TCLIST*tclistnew3(constchar*str,...);
                     `str' specifies the string of the first element.
                     The other arguments are other elements.  They should be trailed by a `NULL' argument.
                     The return value is the new list object.

       The function `tclistdup' is used in order to copy a list object.

              TCLIST*tclistdup(constTCLIST*list);
                     `list' specifies the list object.
                     The return value is the new list object equivalent to the specified object.

       The function `tclistdel' is used in order to delete a list object.

              voidtclistdel(TCLIST*list);
                     `list' specifies the list object.
                     Note that the deleted object and its derivatives can not be used anymore.

       The function `tclistnum' is used in order to get the number of elements of a list object.

              inttclistnum(constTCLIST*list);
                     `list' specifies the list object.
                     The return value is the number of elements of the list.

       The function `tclistval' is used in order to get the pointer to the  region  of  an  element  of  a  list
       object.

              constvoid*tclistval(constTCLIST*list,intindex,int*sp);
                     `list' specifies the list object.
                     `index' specifies the index of the element.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the value.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the return value can be treated as a character string.  If `index' is equal to or more than
                     the number of elements, the return value is `NULL'.

       The function `tclistval2' is used in order to get the string of an element of a list object.

              constchar*tclistval2(constTCLIST*list,intindex);
                     `list' specifies the list object.
                     `index' specifies the index of the element.
                     The return value is the string of the value.
                     If `index' is equal to or more than the number of elements, the return value is `NULL'.

       The function `tclistpush' is used in order to add an element at the end of a list object.

              voidtclistpush(TCLIST*list,constvoid*ptr,intsize);
                     `list' specifies the list object.
                     `ptr' specifies the pointer to the region of the new element.
                     `size' specifies the size of the region.

       The function `tclistpush2' is used in order to add a string element at the end of a list object.

              voidtclistpush2(TCLIST*list,constchar*str);
                     `list' specifies the list object.
                     `str' specifies the string of the new element.

       The function `tclistpop' is used in order to remove an element of the end of a list object.

              void*tclistpop(TCLIST*list,int*sp);
                     `list' specifies the list object.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the removed element.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.  If the list is empty, the return value is `NULL'.

       The function `tclistpop2' is used in order to remove a string element of the end of a list object.

              char*tclistpop2(TCLIST*list);
                     `list' specifies the list object.
                     The return value is the string of the removed element.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.   If  the  list  is  empty,  the
                     return value is `NULL'.

       The function `tclistunshift' is used in order to add an element at the top of a list object.

              voidtclistunshift(TCLIST*list,constvoid*ptr,intsize);
                     `list' specifies the list object.
                     `ptr' specifies the pointer to the region of the new element.
                     `size' specifies the size of the region.

       The function `tclistunshift2' is used in order to add a string element at the top of a list object.

              voidtclistunshift2(TCLIST*list,constchar*str);
                     `list' specifies the list object.
                     `str' specifies the string of the new element.

       The function `tclistshift' is used in order to remove an element of the top of a list object.

              void*tclistshift(TCLIST*list,int*sp);
                     `list' specifies the list object.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the removed element.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.  If the list is empty, the return value is `NULL'.

       The function `tclistshift2' is used in order to remove a string element of the top of a list object.

              char*tclistshift2(TCLIST*list);
                     `list' specifies the list object.
                     The return value is the string of the removed element.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.   If  the  list  is  empty,  the
                     return value is `NULL'.

       The  function  `tclistinsert'  is  used  in  order  to add an element at the specified location of a list
       object.

              voidtclistinsert(TCLIST*list,intindex,constvoid*ptr,intsize);
                     `list' specifies the list object.
                     `index' specifies the index of the new element.
                     `ptr' specifies the pointer to the region of the new element.
                     `size' specifies the size of the region.
                     If `index' is equal to or more than the number of elements, this function has no effect.

       The function `tclistinsert2' is used in order to add a string element at the specified location of a list
       object.

              voidtclistinsert2(TCLIST*list,intindex,constchar*str);
                     `list' specifies the list object.
                     `index' specifies the index of the new element.
                     `str' specifies the string of the new element.
                     If `index' is equal to or more than the number of elements, this function has no effect.

       The function `tclistremove' is used in order to remove an element at the specified  location  of  a  list
       object.

              void*tclistremove(TCLIST*list,intindex,int*sp);
                     `list' specifies the list object.
                     `index' specifies the index of the element to be removed.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the removed element.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it  is  no  longer  in use.  If `index' is equal to or more than the number of elements, no
                     element is removed and the return value is `NULL'.

       The function `tclistremove2' is used in order to remove a string element at the specified location  of  a
       list object.

              char*tclistremove2(TCLIST*list,intindex);
                     `list' specifies the list object.
                     `index' specifies the index of the element to be removed.
                     The return value is the string of the removed element.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.  If `index' is equal to or  more
                     than the number of elements, no element is removed and the return value is `NULL'.

       The  function  `tclistover'  is used in order to overwrite an element at the specified location of a list
       object.

              voidtclistover(TCLIST*list,intindex,constvoid*ptr,intsize);
                     `list' specifies the list object.
                     `index' specifies the index of the element to be overwritten.
                     `ptr' specifies the pointer to the region of the new content.
                     `size' specifies the size of the new content.
                     If `index' is equal to or more than the number of elements, this function has no effect.

       The function `tclistover2' is used in order to overwrite a string element at the specified location of  a
       list object.

              voidtclistover2(TCLIST*list,intindex,constchar*str);
                     `list' specifies the list object.
                     `index' specifies the index of the element to be overwritten.
                     `str' specifies the string of the new content.
                     If `index' is equal to or more than the number of elements, this function has no effect.

       The function `tclistsort' is used in order to sort elements of a list object in lexical order.

              voidtclistsort(TCLIST*list);
                     `list' specifies the list object.

       The function `tclistlsearch' is used in order to search a list object for an element using liner search.

              inttclistlsearch(constTCLIST*list,constvoid*ptr,intsize);
                     `list' specifies the list object.
                     `ptr' specifies the pointer to the region of the key.
                     `size' specifies the size of the region.
                     The return value is the index of a corresponding element or -1 if there is no corresponding
                     element.
                     If two or more elements correspond, the former returns.

       The function `tclistbsearch' is used in order to search a list object for an element using binary search.

              inttclistbsearch(constTCLIST*list,constvoid*ptr,intsize);
                     `list' specifies the list object.  It should be sorted in lexical order.
                     `ptr' specifies the pointer to the region of the key.
                     `size' specifies the size of the region.
                     The return value is the index of a corresponding element or -1 if there is no corresponding
                     element.
                     If two or more elements correspond, which returns is not defined.

       The function `tclistclear' is used in order to clear a list object.

              voidtclistclear(TCLIST*list);
                     `list' specifies the list object.
                     All elements are removed.

       The function `tclistdump' is used in order to serialize a list object into a byte array.

              void*tclistdump(constTCLIST*list,int*sp);
                     `list' specifies the list object.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the result serial region.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tclistload' is used in order to create a list object from a serialized byte array.

              TCLIST*tclistload(constvoid*ptr,intsize);
                     `ptr' specifies the pointer to the region of serialized byte array.
                     `size' specifies the size of the region.
                     The return value is a new list object.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

Api Of Basic Utilities

       The constant `tcversion' is the string containing the version information.

              externconstchar*tcversion;

       The variable `tcfatalfunc' is the pointer to the call back function for handling a fatal error.

              externvoid(*tcfatalfunc)(constchar*);
                     The argument specifies the error message.
                     The initial value of this variable is `NULL'.  If the value is `NULL', the default function
                     is  called  when  a  fatal  error  occurs.   A fatal error occurs when memory allocation is
                     failed.

       The function `tcmalloc' is used in order to allocate a region on memory.

              void*tcmalloc(size_tsize);
                     `size' specifies the size of the region.
                     The return value is the pointer to the allocated region.
                     This function handles failure of memory allocation implicitly.  Because the region  of  the
                     return  value  is  allocated  with the `malloc' call, it should be released with the `free'
                     call when it is no longer in use.

       The function `tccalloc' is used in order to allocate a nullified region on memory.

              void*tccalloc(size_tnmemb,size_tsize);
                     `nmemb' specifies the number of elements.
                     `size' specifies the size of each element.
                     The return value is the pointer to the allocated nullified region.
                     This function handles failure of memory allocation implicitly.  Because the region  of  the
                     return  value  is  allocated  with the `calloc' call, it should be released with the `free'
                     call when it is no longer in use.

       The function `tcrealloc' is used in order to re-allocate a region on memory.

              void*tcrealloc(void*ptr,size_tsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the pointer to the re-allocated region.
                     This function handles failure of memory allocation implicitly.  Because the region  of  the
                     return  value  is  allocated with the `realloc' call, it should be released with the `free'
                     call when it is no longer in use.

       The function `tcmemdup' is used in order to duplicate a region on memory.

              void*tcmemdup(constvoid*ptr,size_tsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the pointer to the allocated region of the duplicate.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcstrdup' is used in order to duplicate a string on memory.

              char*tcstrdup(constvoid*str);
                     `str' specifies the string.
                     The return value is the allocated string equivalent to the specified string.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.

       The function `tcfree' is used in order to free a region on memory.

              voidtcfree(void*ptr);
                     `ptr' specifies the pointer to the region.  If it is `NULL', this function has no effect.
                     Although this function is just a wrapper of `free' call, this  is  useful  in  applications
                     using another package of the `malloc' series.

Api Of Encoding Utilities

       The function `tcurlencode' is used in order to encode a serial object with URL encoding.

              char*tcurlencode(constchar*ptr,intsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the result string.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call if when is no longer in use.

       The function `tcurldecode' is used in order to decode a string encoded with URL encoding.

              char*tcurldecode(constchar*str,int*sp);
                     `str' specifies the encoded string.
                     `sp'  specifies  the  pointer to a variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the result.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcurlbreak' is used in order to break up a URL into elements.

              TCMAP*tcurlbreak(constchar*str);
                     `str' specifies the URL string.
                     The  return  value  is  the map object whose keys are the name of elements.  The key "self"
                     indicates the URL itself.  The key "scheme" indicates the scheme.  The key "host" indicates
                     the host of the server.  The key "port" indicates the port number of the server.   The  key
                     "authority"  indicates the authority information.  The key "path" indicates the path of the
                     resource.  The key "file" indicates the file name without the directory section.   The  key
                     "query" indicates the query string.  The key "fragment" indicates the fragment string.
                     Supported  schema  are  HTTP,  HTTPS,  FTP,  and  FILE.   Absolute URL and relative URL are
                     supported.  Because the object of the return value is created with the function `tcmapnew',
                     it should be deleted with the function `tcmapdel' when it is no longer in use.

       The function `tcurlresolve' is used in order to resolve a relative URL with an absolute URL.

              char*tcurlresolve(constchar*base,constchar*target);
                     `base' specifies the absolute URL of the base location.
                     `target' specifies the URL to be resolved.
                     The return value is the resolved URL.  If the target URL is relative, a new URL of relative
                     location from the base location is returned.  Else, a copy of the target URL is returned.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcbaseencode' is used in order to encode a serial object with Base64 encoding.

              char*tcbaseencode(constchar*ptr,intsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the result string.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call if when is no longer in use.

       The function `tcbasedecode' is used in order to decode a string encoded with Base64 encoding.

              char*tcbasedecode(constchar*str,int*sp);
                     `str' specifies the encoded string.
                     `sp' specifies the pointer to a variable into which the size of the region  of  the  return
                     value is assigned.
                     The return value is the pointer to the region of the result.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  Because the region  of  the  return
                     value  is allocated with the `malloc' call, it should be released with the `free' call when
                     it is no longer in use.

       The function `tcquoteencode' is used in order to encode a serial object with Quoted-printable encoding.

              char*tcquoteencode(constchar*ptr,intsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the result string.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call if when is no longer in use.

       The function `tcquotedecode' is used in order to decode a string encoded with Quoted-printable encoding.

              char*tcquotedecode(constchar*str,int*sp);
                     `str' specifies the encoded string.
                     `sp'  specifies  the  pointer to a variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the result.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcmimeencode' is used in order to encode a string with MIME encoding.

              char*tcmimeencode(constchar*str,constchar*encname,boolbase);
                     `str' specifies the string.
                     `encname' specifies the string of the name of the character encoding.
                     `base' specifies whether to use Base64 encoding.  If it is false, Quoted-printable is used.
                     The return value is the result string.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.

       The function `tcmimedecode' is used in order to decode a string encoded with MIME encoding.

              char*tcmimedecode(constchar*str,char*enp);
                     `str' specifies the encoded string.
                     `enp' specifies the pointer to the region into which the name of encoding is  written.   If
                     it  is  `NULL',  it is not used.  The size of the buffer should be equal to or more than 32
                     bytes.
                     The return value is the result string.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcmimebreak' is used in order to split a string of MIME into headers and the body.

              char*tcmimebreak(constchar*ptr,intsize,TCMAP*headers,int*sp);
                     `ptr' specifies the pointer to the region of MIME data.
                     `size' specifies the size of the region.
                     `headers'  specifies a map object to store headers.  If it is `NULL', it is not used.  Each
                     key of the map is an uncapitalized header name.
                     `sp' specifies the pointer to the variable into which the size of the region of the  return
                     value is assigned.
                     The return value is the pointer to the region of the body data.
                     If  the content type is defined, the header map has the key "TYPE" specifying the type.  If
                     the character encoding is defined, the key "CHARSET" indicates the encoding name.   If  the
                     boundary  string  of multipart is defined, the key "BOUNDARY" indicates the string.  If the
                     content disposition is defined, the key "DISPOSITION" indicates the direction.  If the file
                     name is defined, the key "FILENAME" indicates the name.  If the attribute name is  defined,
                     the  key  "NAME"  indicates  the name.  Because the region of the return value is allocated
                     with the `malloc' call, it should be released with the `free' call when it is no longer  in
                     use.

       The function `tcmimeparts' is used in order to split multipart data of MIME into its parts.

              TCLIST*tcmimeparts(constchar*ptr,intsize,constchar*boundary);
                     `ptr' specifies the pointer to the region of multipart data of MIME.
                     `size' specifies the size of the region.
                     `boundary' specifies the boundary string.
                     The return value is a list object.  Each element of the list is the data of a part.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tchexencode' is used in order to encode a serial object with hexadecimal encoding.

              char*tchexencode(constchar*ptr,intsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the result string.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call if when is no longer in use.

       The function `tchexdecode' is used in order to decode a string encoded with hexadecimal encoding.

              char*tchexdecode(constchar*str,int*sp);
                     `str' specifies the encoded string.
                     `sp' specifies the pointer to a variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the result.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  Because the region  of  the  return
                     value  is allocated with the `malloc' call, it should be released with the `free' call when
                     it is no longer in use.

       The function `tcpackencode' is used in order to compress a serial object with Packbits encoding.

              char*tcpackencode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp' specifies the pointer to the variable into which the size of the region of the  return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.

       The function `tcpackdecode' is used in order to decompress  a  serial  object  compressed  with  Packbits
       encoding.

              char*tcpackdecode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies  the  pointer to a variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcbsencode' is used in order to compress a serial object with TCBS encoding.

              char*tcbsencode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcbsdecode' is used in order to decompress a serial object compressed with TCBS encoding.

              char*tcbsdecode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies  the  pointer to a variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcdeflate' is used in order to compress a serial object with Deflate encoding.

              char*tcdeflate(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcinflate' is used in order to decompress a serial object compressed with Deflate encoding.

              char*tcinflate(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies  the  pointer to a variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcgzipencode' is used in order to compress a serial object with GZIP encoding.

              char*tcgzipencode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcgzipdecode' is used in order to decompress a serial object compressed with GZIP encoding.

              char*tcgzipdecode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies  the  pointer to a variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it is no longer in use.

       The function `tcgetcrc' is used in order to get the CRC32 checksum of a serial object.

              unsignedinttcgetcrc(constchar*ptr,intsize);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     The return value is the CRC32 checksum of the object.

       The function `tcbzipencode' is used in order to compress a serial object with BZIP2 encoding.

              char*tcbzipencode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The  function  `tcbzipdecode'  is  used  in  order  to  decompress  a serial object compressed with BZIP2
       encoding.

              char*tcbzipdecode(constchar*ptr,intsize,int*sp);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `sp' specifies the pointer to a variable into which the size of the region  of  the  return
                     value is assigned.
                     If successful, the return value is the pointer to the result object, else, it is `NULL'.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  Because the region  of  the  return
                     value  is allocated with the `malloc' call, it should be released with the `free' call when
                     it is no longer in use.

       The function `tcberencode' is used in order to encode an array of nonnegative integers with BER encoding.

              char*tcberencode(constunsignedint*ary,intanum,int*sp);
                     `ary' specifies the pointer to the array of nonnegative integers.
                     `anum' specifies the size of the array.
                     `sp' specifies the pointer to a variable into which the size of the region  of  the  return
                     value is assigned.
                     The return value is the pointer to the region of the result.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call if when is no longer in use.

       The function `tcberdecode' is used in order to decode a serial object encoded with BER encoding.

              unsignedint*tcberdecode(constchar*ptr,intsize,int*np);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `np' specifies the pointer to a variable into which the number of elements  of  the  return
                     value is assigned.
                     The return value is the pointer to the array of the result.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call if when is no longer in use.

       The function `tcxmlescape' is used in order to escape  meta  characters  in  a  string  with  the  entity
       references of XML.

              char*tcxmlescape(constchar*str);
                     `str' specifies the string.
                     The return value is the pointer to the escaped string.
                     This  function escapes only `&', `<', `>', and `"'.  Because the region of the return value
                     is allocated with the `malloc' call, it should be released with the `free' call when it  is
                     no longer in use.

       The function `tcxmlunescape' is used in order to unescape entity references in a string of XML.

              char*tcxmlunescape(constchar*str);
                     `str' specifies the string.
                     The return value is the unescaped string.
                     This  function  restores only `&amp;', `&lt;', `&gt;', and `&quot;'.  Because the region of
                     the return value is allocated with the `malloc' call, it should be released with the `free'
                     call when it is no longer in use.

Api Of Extensible String

       The function `tcxstrnew' is used in order to create an extensible string object.

              TCXSTR*tcxstrnew(void);
                     The return value is the new extensible string object.

       The function `tcxstrnew2' is used in order to create an extensible string object from a character string.

              TCXSTR*tcxstrnew2(constchar*str);
                     `str' specifies the string of the initial content.
                     The return value is the new extensible string object containing the specified string.

       The  function  `tcxstrnew3'  is  used  in  order  to  create an extensible string object with the initial
       allocation size.

              TCXSTR*tcxstrnew3(intasiz);
                     `asiz' specifies the initial allocation size.
                     The return value is the new extensible string object.

       The function `tcxstrdup' is used in order to copy an extensible string object.

              TCXSTR*tcxstrdup(constTCXSTR*xstr);
                     `xstr' specifies the extensible string object.
                     The return value is the new extensible string object equivalent to the specified object.

       The function `tcxstrdel' is used in order to delete an extensible string object.

              voidtcxstrdel(TCXSTR*xstr);
                     `xstr' specifies the extensible string object.
                     Note that the deleted object and its derivatives can not be used anymore.

       The function `tcxstrcat' is used in order to concatenate a region to the  end  of  an  extensible  string
       object.

              voidtcxstrcat(TCXSTR*xstr,constvoid*ptr,intsize);
                     `xstr' specifies the extensible string object.
                     `ptr' specifies the pointer to the region to be appended.
                     `size' specifies the size of the region.

       The  function `tcxstrcat2' is used in order to concatenate a character string to the end of an extensible
       string object.

              voidtcxstrcat2(TCXSTR*xstr,constchar*str);
                     `xstr' specifies the extensible string object.
                     `str' specifies the string to be appended.

       The function `tcxstrptr' is used in order to get the pointer  of  the  region  of  an  extensible  string
       object.

              constvoid*tcxstrptr(constTCXSTR*xstr);
                     `xstr' specifies the extensible string object.
                     The return value is the pointer of the region of the object.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.

       The function `tcxstrsize' is used in order to get the size of the region of an extensible string object.

              inttcxstrsize(constTCXSTR*xstr);
                     `xstr' specifies the extensible string object.
                     The return value is the size of the region of the object.

       The function `tcxstrclear' is used in order to clear an extensible string object.

              voidtcxstrclear(TCXSTR*xstr);
                     `xstr' specifies the extensible string object.
                     The internal buffer of the object is cleared and the size is set zero.

       The function `tcxstrprintf' is used in order to  perform  formatted  output  into  an  extensible  string
       object.

              voidtcxstrprintf(TCXSTR*xstr,constchar*format,...);
                     `xstr' specifies the extensible string object.
                     `format' specifies the printf-like format string.  The conversion character `%' can be used
                     with  such  flag  characters as `s', `d', `o', `u', `x', `X', `c', `e', `E', `f', `g', `G',
                     `@', `?', `b', and `%'.  `@' works as with `s' but escapes meta  characters  of  XML.   `?'
                     works  as  with  `s'  but  escapes  meta characters of URL.  `b' converts an integer to the
                     string as binary numbers.  The other conversion character work as with each original.
                     The other arguments are used according to the format string.

       The function `tcsprintf' is used in order to allocate a formatted string on memory.

              char*tcsprintf(constchar*format,...);
                     `format' specifies the printf-like format string.  The conversion character `%' can be used
                     with such flag characters as `s', `d', `o', `u', `x', `X', `c', `e', `E',  `f',  `g',  `G',
                     `@',  `?',  `b',  and  `%'.  `@' works as with `s' but escapes meta characters of XML.  `?'
                     works as with `s' but escapes meta characters of URL.   `b'  converts  an  integer  to  the
                     string as binary numbers.  The other conversion character work as with each original.
                     The other arguments are used according to the format string.
                     The return value is the pointer to the region of the result string.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.

Api Of Filesystem Utilities

       The function `tcrealpath' is used in order to get the canonicalized absolute path of a file.

              char*tcrealpath(constchar*path);
                     `path' specifies the path of the file.
                     The return value is the canonicalized absolute path of a file, or `NULL'  if  the  path  is
                     invalid.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in use.

       The function `tcstatfile' is used in order to get the status information of a file.

              booltcstatfile(constchar*path,bool*isdirp,int64_t*sizep,int64_t*mtimep);
                     `path' specifies the path of the file.
                     `isdirp' specifies the pointer to a variable into which whether the file is a directory  is
                     assigned.  If it is `NULL', it is ignored.
                     `sizep'  specifies  the  pointer to a variable into which the size of the file is assigned.
                     If it is `NULL', it is ignored.
                     `ntimep' specifies the pointer to a variable into which the size of the file  is  assigned.
                     If it is `NULL', it is ignored.
                     If successful, the return value is true, else, it is false.

       The function `tcreadfile' is used in order to read whole data of a file.

              void*tcreadfile(constchar*path,intlimit,int*sp);
                     `path' specifies the path of the file.  If it is `NULL', the standard input is specified.
                     `limit'  specifies  the  limiting  size  of  reading  data.   If it is not more than 0, the
                     limitation is not specified.
                     `sp' specifies the pointer to the variable into which the size of the region of the  return
                     value is assigned.  If it is `NULL', it is not used.
                     The  return value is the pointer to the allocated region of the read data, or `NULL' if the
                     file could not be opened.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     when is no longer in use.

       The function `tcreadfilelines' is used in order to read every line of a file.

              TCLIST*tcreadfilelines(constchar*path);
                     `path' specifies the path of the file.  If it is `NULL', the standard input is specified.
                     The return value is a list object of every lines if successful, else it is `NULL'.
                     Line  separators  are  cut out.  Because the object of the return value is created with the
                     function `tclistnew', it should be deleted with the function  `tclistdel'  when  it  is  no
                     longer in use.

       The function `tcwritefile' is used in order to write data into a file.

              booltcwritefile(constchar*path,constvoid*ptr,intsize);
                     `path' specifies the path of the file.  If it is `NULL', the standard output is specified.
                     `ptr' specifies the pointer to the data region.
                     `size' specifies the size of the region.
                     If successful, the return value is true, else, it is false.

       The function `tccopyfile' is used in order to copy a file.

              booltccopyfile(constchar*src,constchar*dest);
                     `src' specifies the path of the source file.
                     `dest' specifies the path of the destination file.
                     The return value is true if successful, else, it is false.
                     If the destination file exists, it is overwritten.

       The function `tcreaddir' is used in order to read names of files in a directory.

              TCLIST*tcreaddir(constchar*path);
                     `path' specifies the path of the directory.
                     The return value is a list object of names if successful, else it is `NULL'.
                     Links to the directory itself and to the parent directory are ignored.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tcglobpat' is used in order to expand a pattern into a list of matched paths.

              TCLIST*tcglobpat(constchar*pattern);
                     `pattern' specifies the matching pattern.
                     The return value is a list object of matched paths.  If no path is matched, an  empty  list
                     is returned.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tcremovelink' is used in  order  to  remove  a  file  or  a  directory  and  its  sub  ones
       recursively.

              booltcremovelink(constchar*path);
                     `path' specifies the path of the link.
                     If  successful,  the  return  value is true, else, it is false.  False is returned when the
                     link does not exist or the permission is denied.

       The function `tcwrite' is used in order to write data into a file.

              booltcwrite(intfd,constvoid*buf,size_tsize);
                     `fd' specifies the file descriptor.
                     `buf' specifies the buffer to be written.
                     `size' specifies the size of the buffer.
                     The return value is true if successful, else, it is false.

       The function `tcread' is used in order to read data from a file.

              booltcread(intfd,void*buf,size_tsize);
                     `fd' specifies the file descriptor.
                     `buf' specifies the buffer to store into.
                     `size' specifies the size of the buffer.
                     The return value is true if successful, else, it is false.

       The function `tclock' is used in order to lock a file.

              booltclock(intfd,boolex,boolnb);
                     `fd' specifies the file descriptor.
                     `ex' specifies whether an exclusive lock or a shared lock is performed.
                     `nb' specifies whether to request with non-blocking.
                     The return value is true if successful, else, it is false.

       The function `tcunlock' is used in order to unlock a file.

              booltcunlock(intfd);
                     `fd' specifies the file descriptor.
                     The return value is true if successful, else, it is false.

       The function `tcsystem' is used in order to execute a shell command.

              inttcsystem(constchar**args,intanum);
                     `args' specifies an array of the command name and its arguments.
                     `anum' specifies the number of elements of the array.
                     The return value is the exit code of the command or `INT_MAX' on failure.
                     The command name and the arguments are quoted and meta characters are escaped.

Api Of Hash Map

       The function `tcmapnew' is used in order to create a map object.

              TCMAP*tcmapnew(void);
                     The return value is the new map object.

       The function `tcmapnew2' is used in order to create a map  object  with  specifying  the  number  of  the
       buckets.

              TCMAP*tcmapnew2(uint32_tbnum);
                     `bnum' specifies the number of the buckets.
                     The return value is the new map object.

       The function `tcmapnew3' is used in order to create a map object with initial string elements.

              TCMAP*tcmapnew3(constchar*str,...);
                     `str' specifies the string of the first element.
                     The other arguments are other elements.  They should be trailed by a `NULL' argument.
                     The return value is the new map object.
                     The key and the value of each record are situated one after the other.

       The function `tcmapdup' is used in order to copy a map object.

              TCMAP*tcmapdup(constTCMAP*map);
                     `map' specifies the map object.
                     The return value is the new map object equivalent to the specified object.

       The function `tcmapdel' is used in order to delete a map object.

              voidtcmapdel(TCMAP*map);
                     `map' specifies the map object.
                     Note that the deleted object and its derivatives can not be used anymore.

       The function `tcmapput' is used in order to store a record into a map object.

              voidtcmapput(TCMAP*map,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If a record with the same key exists in the map, it is overwritten.

       The function `tcmapput2' is used in order to store a string record into a map object.

              voidtcmapput2(TCMAP*map,constchar*kstr,constchar*vstr);
                     `map' specifies the map object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If a record with the same key exists in the map, it is overwritten.

       The function `tcmapputkeep' is used in order to store a new record into a map object.

              booltcmapputkeep(TCMAP*map,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the map, this function has no effect.

       The function `tcmapputkeep2' is used in order to store a new string record into a map object.

              booltcmapputkeep2(TCMAP*map,constchar*kstr,constchar*vstr);
                     `map' specifies the map object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the map, this function has no effect.

       The  function  `tcmapputcat'  is  used  in  order  to  concatenate a value at the end of the value of the
       existing record in a map object.

              voidtcmapputcat(TCMAP*map,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If there is no corresponding record, a new record is created.

       The function `tcmapputcat2' is used in order to concatenate a string value at the end of the value of the
       existing record in a map object.

              voidtcmapputcat2(TCMAP*map,constchar*kstr,constchar*vstr);
                     `map' specifies the map object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If there is no corresponding record, a new record is created.

       The function `tcmapout' is used in order to remove a record of a map object.

              booltcmapout(TCMAP*map,constvoid*kbuf,intksiz);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     If successful, the return value is true.  False is returned when no record  corresponds  to
                     the specified key.

       The function `tcmapout2' is used in order to remove a string record of a map object.

              booltcmapout2(TCMAP*map,constchar*kstr);
                     `map' specifies the map object.
                     `kstr' specifies the string of the key.
                     If  successful,  the return value is true.  False is returned when no record corresponds to
                     the specified key.

       The function `tcmapget' is used in order to retrieve a record in a map object.

              constvoid*tcmapget(constTCMAP*map,constvoid*kbuf,intksiz,int*sp);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `sp' specifies the pointer to the variable into which the size of the region of the  return
                     value is assigned.
                     If  successful,  the  return  value  is  the  pointer  to  the  region  of the value of the
                     corresponding record.  `NULL' is returned when no record corresponds.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the return value can be treated as a character string.

       The function `tcmapget2' is used in order to retrieve a string record in a map object.

              constchar*tcmapget2(constTCMAP*map,constchar*kstr);
                     `map' specifies the map object.
                     `kstr' specifies the string of the key.
                     If  successful,  the  return  value is the string of the value of the corresponding record.
                     `NULL' is returned when no record corresponds.

       The function `tcmapmove' is used in order to move a record to the edge of a map object.

              booltcmapmove(TCMAP*map,constvoid*kbuf,intksiz,boolhead);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of a key.
                     `ksiz' specifies the size of the region of the key.
                     `head' specifies the destination which is the head if it is true or the tail if else.
                     If successful, the return value is true.  False is returned when no record  corresponds  to
                     the specified key.

       The function `tcmapmove2' is used in order to move a string record to the edge of a map object.

              booltcmapmove2(TCMAP*map,constchar*kstr,boolhead);
                     `map' specifies the map object.
                     `kstr' specifies the string of a key.
                     `head' specifies the destination which is the head if it is true or the tail if else.
                     If  successful,  the return value is true.  False is returned when no record corresponds to
                     the specified key.

       The function `tcmapiterinit' is used in order to initialize the iterator of a map object.

              voidtcmapiterinit(TCMAP*map);
                     `map' specifies the map object.
                     The iterator is used in order to access the key of every record stored in the map object.

       The function `tcmapiternext' is used in order to get the next key of the iterator of a map object.

              constvoid*tcmapiternext(TCMAP*map,int*sp);
                     `map' specifies the map object.
                     `sp' specifies the pointer to the variable into which the size of the region of the  return
                     value is assigned.
                     If  successful,  the return value is the pointer to the region of the next key, else, it is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value can be treated as a character string.  The order of iteration is assured
                     to be the same as the stored order.

       The function `tcmapiternext2' is used in order to get the next key  string  of  the  iterator  of  a  map
       object.

              constchar*tcmapiternext2(TCMAP*map);
                     `map' specifies the map object.
                     If  successful,  the return value is the pointer to the region of the next key, else, it is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     The order of iteration is assured to be the same as the stored order.

       The function `tcmaprnum' is used in order to get the number of records stored in a map object.

              uint64_ttcmaprnum(constTCMAP*map);
                     `map' specifies the map object.
                     The return value is the number of the records stored in the map object.

       The function `tcmapmsiz' is used in order to get the total size of memory used in a map object.

              uint64_ttcmapmsiz(constTCMAP*map);
                     `map' specifies the map object.
                     The return value is the total size of memory used in a map object.

       The function `tcmapkeys' is used in order to create a list object containing all keys in a map object.

              TCLIST*tcmapkeys(constTCMAP*map);
                     `map' specifies the map object.
                     The return value is the new list object containing all keys in the map object.
                     Because the object of the return value is created with the function `tclistnew', it  should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tcmapvals' is used in order to create a list object containing all values in a map object.

              TCLIST*tcmapvals(constTCMAP*map);
                     `map' specifies the map object.
                     The return value is the new list object containing all values in the map object.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tcmapaddint' is used in order to add an integer to a record in a map object.

              inttcmapaddint(TCMAP*map,constvoid*kbuf,intksiz,intnum);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as an integer and is added to.  If
                     no record corresponds, a new record of the additional value is stored.

       The function `tcmapadddouble' is used in order to add a real number to a record in a map object.

              doubletcmapadddouble(TCMAP*map,constvoid*kbuf,intksiz,doublenum);
                     `map' specifies the map object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as a real number and is added  to.
                     If no record corresponds, a new record of the additional value is stored.

       The function `tcmapclear' is used in order to clear a map object.

              voidtcmapclear(TCMAP*map);
                     `map' specifies the map object.
                     All records are removed.

       The function `tcmapcutfront' is used in order to remove front records of a map object.

              voidtcmapcutfront(TCMAP*map,intnum);
                     `map' specifies the map object.
                     `num' specifies the number of records to be removed.

       The function `tcmapdump' is used in order to serialize a map object into a byte array.

              void*tcmapdump(constTCMAP*map,int*sp);
                     `map' specifies the map object.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the result serial region.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcmapload' is used in order to create a map object from a serialized byte array.

              TCMAP*tcmapload(constvoid*ptr,intsize);
                     `ptr' specifies the pointer to the region of serialized byte array.
                     `size' specifies the size of the region.
                     The return value is a new map object.
                     Because  the  object of the return value is created with the function `tcmapnew', it should
                     be deleted with the function `tcmapdel' when it is no longer in use.

Api Of Memory Pool

       The function `tcmpoolnew' is used in order to create a memory pool object.

              TCMPOOL*tcmpoolnew(void);
                     The return value is the new memory pool object.

       The function `tcmpooldel' is used in order to delete a memory pool object.

              voidtcmpooldel(TCMPOOL*mpool);
                     `mpool' specifies the memory pool object.
                     Note that the deleted object and its derivatives can not be used anymore.

       The function `tcmpoolpush' is used in order to relegate an arbitrary object to a memory pool object.

              void*tcmpoolpush(TCMPOOL*mpool,void*ptr,void(*del)(void*));
                     `mpool' specifies the memory pool object.
                     `ptr'  specifies the pointer to the object to be relegated.  If it is `NULL', this function
                     has no effect.
                     `del' specifies the pointer to the function to delete the object.
                     The return value is the pointer to the given object.
                     This function assures that the specified object is deleted when the memory pool  object  is
                     deleted.

       The function `tcmpoolpushptr' is used in order to relegate an allocated region to a memory pool object.

              void*tcmpoolpushptr(TCMPOOL*mpool,void*ptr);
                     `mpool' specifies the memory pool object.
                     `ptr'  specifies the pointer to the region to be relegated.  If it is `NULL', this function
                     has no effect.
                     The return value is the pointer to the given object.
                     This function assures that the specified region is released when the memory pool object  is
                     deleted.

       The  function `tcmpoolpushxstr' is used in order to relegate an extensible string object to a memory pool
       object.

              TCXSTR*tcmpoolpushxstr(TCMPOOL*mpool,TCXSTR*xstr);
                     `mpool' specifies the memory pool object.
                     `xstr' specifies the extensible string object.  If it  is  `NULL',  this  function  has  no
                     effect.
                     The return value is the pointer to the given object.
                     This  function  assures that the specified object is deleted when the memory pool object is
                     deleted.

       The function `tcmpoolpushlist' is used in order to relegate a list object to a memory pool object.

              TCLIST*tcmpoolpushlist(TCMPOOL*mpool,TCLIST*list);
                     `mpool' specifies the memory pool object.
                     `list' specifies the list object.  If it is `NULL', this function has no effect.
                     The return value is the pointer to the given object.
                     This function assures that the specified object is deleted when the memory pool  object  is
                     deleted.

       The function `tcmpoolpushmap' is used in order to relegate a map object to a memory pool object.

              TCMAP*tcmpoolpushmap(TCMPOOL*mpool,TCMAP*map);
                     `mpool' specifies the memory pool object.
                     `map' specifies the map object.  If it is `NULL', this function has no effect.
                     The return value is the pointer to the given object.
                     This  function  assures that the specified object is deleted when the memory pool object is
                     deleted.

       The function `tcmpoolpushtree' is used in order to relegate a tree object to a memory pool object.

              TCTREE*tcmpoolpushtree(TCMPOOL*mpool,TCTREE*tree);
                     `mpool' specifies the memory pool object.
                     `tree' specifies the tree object.  If it is `NULL', this function has no effect.
                     The return value is the pointer to the given object.
                     This function assures that the specified object is deleted when the memory pool  object  is
                     deleted.

       The function `tcmpoolmalloc' is used in order to allocate a region relegated to a memory pool object.

              void*tcmpoolmalloc(TCMPOOL*mpool,size_tsize);
                     `mpool' specifies the memory pool object.
                     The return value is the pointer to the allocated region under the memory pool.

       The  function  `tcmpoolxstrnew'  is  used  in  order to create an extensible string object relegated to a
       memory pool object.

              TCXSTR*tcmpoolxstrnew(TCMPOOL*mpool);
                     The return value is the new extensible string object under the memory pool.

       The function `tcmpoollistnew' is used in order to create a list object relegated to a memory pool object.

              TCLIST*tcmpoollistnew(TCMPOOL*mpool);
                     The return value is the new list object under the memory pool.

       The function `tcmpoolmapnew' is used in order to create a map object relegated to a memory pool object.

              TCMAP*tcmpoolmapnew(TCMPOOL*mpool);
                     The return value is the new map object under the memory pool.

       The function `tcmpooltreenew' is used in order to create a tree object relegated to a memory pool object.

              TCTREE*tcmpooltreenew(TCMPOOL*mpool);
                     The return value is the new tree object under the memory pool.

       The function `tcmpoolpop' is used in order to remove the most recently installed  cleanup  handler  of  a
       memory pool object.

              voidtcmpoolpop(TCMPOOL*mpool,boolexe);
                     `mpool' specifies the memory pool object.
                     `exe' specifies whether to execute the destructor of the removed handler.

       The function `tcmpoolclear' is used in order to remove all cleanup handler of a memory pool object.

              voidtcmpoolclear(TCMPOOL*mpool,boolexe);
                     `mpool' specifies the memory pool object.
                     `exe' specifies whether to execute the destructors of the removed handlers.

       The function `tcmpoolglobal' is used in order to get the global memory pool object.

              TCMPOOL*tcmpoolglobal(void);
                     The return value is the global memory pool object.
                     The  global memory pool object is a singleton and assured to be deleted when the process is
                     terminating normally.

Api Of Miscellaneous Utilities

       The function `tclmax' is used in order to get the larger value of two integers.

              longtclmax(longa,longb);
                     `a' specifies an integer.
                     `b' specifies the other integer.
                     The return value is the larger value of the two.

       The function `tclmin' is used in order to get the lesser value of two integers.

              longtclmin(longa,longb);
                     `a' specifies an integer.
                     `b' specifies the other integer.
                     The return value is the lesser value of the two.

       The function `tclrand' is used in order to  get  a  random  number  as  long  integer  based  on  uniform
       distribution.

              unsignedlongtclrand(void);
                     The return value is the random number between 0 and `ULONG_MAX'.
                     This  function  uses  the random number source device and generates a real random number if
                     possible.

       The function `tcdrand' is used in order to get a  random  number  as  double  decimal  based  on  uniform
       distribution.

              doubletcdrand(void);
                     The return value is the random number equal to or greater than 0, and less than 1.0.
                     This  function  uses  the random number source device and generates a real random number if
                     possible.

       The function `tcdrandnd' is used in order to get a random  number  as  double  decimal  based  on  normal
       distribution.

              doubletcdrandnd(doubleavg,doublesd);
                     `avg' specifies the average.
                     `sd' specifies the standard deviation.
                     The return value is the random number.
                     This  function  uses  the random number source device and generates a real random number if
                     possible.

       The function `tcstricmp' is used in order to compare two strings with case insensitive evaluation.

              inttcstricmp(constchar*astr,constchar*bstr);
                     `astr' specifies a string.
                     `bstr' specifies of the other string.
                     The return value is positive if the former is big, negative if the latter is big, 0 if both
                     are equivalent.

       The function `tcstrfwm' is used in order to check whether a string begins with a key.

              booltcstrfwm(constchar*str,constchar*key);
                     `str' specifies the target string.
                     `key' specifies the forward matching key string.
                     The return value is true if the target string begins with the key, else, it is false.

       The function `tcstrifwm' is used in order to  check  whether  a  string  begins  with  a  key  with  case
       insensitive evaluation.

              booltcstrifwm(constchar*str,constchar*key);
                     `str' specifies the target string.
                     `key' specifies the forward matching key string.
                     The return value is true if the target string begins with the key, else, it is false.

       The function `tcstrbwm' is used in order to check whether a string ends with a key.

              booltcstrbwm(constchar*str,constchar*key);
                     `str' specifies the target string.
                     `key' specifies the backward matching key string.
                     The return value is true if the target string ends with the key, else, it is false.

       The function `tcstribwm' is used in order to check whether a string ends with a key with case insensitive
       evaluation.

              booltcstribwm(constchar*str,constchar*key);
                     `str' specifies the target string.
                     `key' specifies the backward matching key string.
                     The return value is true if the target string ends with the key, else, it is false.

       The function `tcstrdist' is used in order to calculate the edit distance of two strings.

              inttcstrdist(constchar*astr,constchar*bstr);
                     `astr' specifies a string.
                     `bstr' specifies of the other string.
                     The return value is the edit distance which is known as the Levenshtein distance.  The cost
                     is calculated by byte.

       The function `tcstrdistutf' is used in order to calculate the edit distance of two UTF-8 strings.

              inttcstrdistutf(constchar*astr,constchar*bstr);
                     `astr' specifies a string.
                     `bstr' specifies of the other string.
                     The return value is the edit distance which is known as the Levenshtein distance.  The cost
                     is calculated by Unicode character.

       The function `tcstrtoupper' is used in order to convert the letters of a string into upper case.

              char*tcstrtoupper(char*str);
                     `str' specifies the string to be converted.
                     The return value is the string itself.

       The function `tcstrtolower' is used in order to convert the letters of a string into lower case.

              char*tcstrtolower(char*str);
                     `str' specifies the string to be converted.
                     The return value is the string itself.

       The function `tcstrtrim' is used in order to cut space characters at head or tail of a string.

              char*tcstrtrim(char*str);
                     `str' specifies the string to be converted.
                     The return value is the string itself.

       The function `tcstrsqzspc' is used in order to squeeze space characters in a string and trim it.

              char*tcstrsqzspc(char*str);
                     `str' specifies the string to be converted.
                     The return value is the string itself.

       The function `tcstrsubchr' is used in order to substitute characters in a string.

              char*tcstrsubchr(char*str,constchar*rstr,constchar*sstr);
                     `str' specifies the string to be converted.
                     `rstr' specifies the string containing characters to be replaced.
                     `sstr' specifies the string containing characters to be substituted.
                     If  the  substitute string is shorter then the replacement string, corresponding characters
                     are removed.

       The function `tcstrcntutf' is used in order to count the number of characters in a string of UTF-8.

              inttcstrcntutf(constchar*str);
                     `str' specifies the string of UTF-8.
                     The return value is the number of characters in the string.

       The function `tcstrcututf' is used in order to  cut  a  string  of  UTF-8  at  the  specified  number  of
       characters.

              char*tcstrcututf(char*str,intnum);
                     `str' specifies the string of UTF-8.
                     `num' specifies the number of characters to be kept.
                     The return value is the string itself.

       The function `tcstrutftoucs' is used in order to convert a UTF-8 string into a UCS-2 array.

              voidtcstrutftoucs(constchar*str,uint16_t*ary,int*np);
                     `str' specifies the UTF-8 string.
                     `ary'  specifies  the  pointer to the region into which the result UCS-2 codes are written.
                     The size of the buffer should be sufficient.
                     `np' specifies the pointer to a variable into which the number of elements  of  the  result
                     array is assigned.

       The function `tcstrucstoutf' is used in order to convert a UCS-2 array into a UTF-8 string.

              inttcstrucstoutf(constuint16_t*ary,intnum,char*str);
                     `ary' specifies the array of UCS-2 codes.
                     `num' specifies the number of the array.
                     `str'  specifies  the  pointer to the region into which the result UTF-8 string is written.
                     The size of the buffer should be sufficient.
                     The return value is the length of the result string.

       The function `tcstrsplit' is used in order to create a list object by splitting a string.

              TCLIST*tcstrsplit(constchar*str,constchar*delims);
                     `str' specifies the source string.
                     `delims' specifies a string containing delimiting characters.
                     The return value is a list object of the split elements.
                     If two delimiters are successive, it is assumed that an empty element is between  the  two.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tcstrjoin' is used in order to create a string by joining all elements of a list object.

              char*tcstrjoin(constTCLIST*list,chardelim);
                     `list' specifies a list object.
                     `delim' specifies a delimiting character.
                     The return value is the result string.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcatoi' is used in order to convert a string to an integer.

              int64_ttcatoi(constchar*str);
                     `str' specifies the string.
                     The  return  value is the integer.  If the string does not contain numeric expression, 0 is
                     returned.
                     This function is equivalent to `atoll' except that it does not depend on the locale.

       The function `tcatoix' is used in order to convert a string with a metric prefix to an integer.

              int64_ttcatoix(constchar*str);
                     `str' specifies the string, which can be trailed by a binary metric prefix.  "K", "M", "G",
                     "T", "P", and "E" are supported.  They are case-insensitive.
                     The return value is the integer.  If the string does not contain numeric expression,  0  is
                     returned.   If  the  integer  overflows  the domain, `INT64_MAX' or `INT64_MIN' is returned
                     according to the sign.

       The function `tcatof' is used in order to convert a string to a real number.

              doubletcatof(constchar*str);
                     `str' specifies the string.
                     The return value is the real number.  If the string does not  contain  numeric  expression,
                     0.0 is returned.
                     This function is equivalent to `atof' except that it does not depend on the locale.

       The function `tcregexmatch' is used in order to check whether a string matches a regular expression.

              booltcregexmatch(constchar*str,constchar*regex);
                     `str' specifies the target string.
                     `regex'  specifies  the  regular  expression  string.   If it begins with `*', the trailing
                     substring is used as a case-insensitive regular expression.
                     The return value is true if matching is success, else, it is false.

       The function `tcregexreplace' is used in order to replace each substring matching  a  regular  expression
       string.

              char*tcregexreplace(constchar*str,constchar*regex,constchar*alt);
                     `str' specifies the target string.
                     `regex' specifies the regular expression string for substrings.  If it begins with `*', the
                     trailing substring is used as a case-insensitive regular expression.
                     `alt' specifies the alternative string with which each substrings is replaced.  Each `&' in
                     the  string  is  replaced  with  the  matched substring.  Each `´ in the string escapes the
                     following character.  Special escapes  "1"  through  "9"  referring  to  the  corresponding
                     matching sub-expressions in the regular expression string are supported.
                     The  return  value is a new converted string.  Even if the regular expression is invalid, a
                     copy of the original string is returned.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tcmd5hash' is used in order to get the MD5 hash value of a serial object.

              voidtcmd5hash(constvoid*ptr,intsize,char*buf);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `buf'  specifies  the  pointer  to the region into which the result string is written.  The
                     size of the buffer should be equal to or more than 48 bytes.

       The function `tcarccipher' is used in order to cipher or decipher a serial object with the Arcfour stream
       cipher.

              voidtcarccipher(constvoid*ptr,intsize,constvoid*kbuf,intksiz,void*obuf);
                     `ptr' specifies the pointer to the region.
                     `size' specifies the size of the region.
                     `kbuf' specifies the pointer to the region of the cipher key.
                     `ksiz' specifies the size of the region of the cipher key.
                     `obuf' specifies the pointer to the region into which the result data is written.  The size
                     of the buffer should be equal to or more than the input region.

       The function `tctime' is used in order to get the time of day in seconds.

              doubletctime(void);
                     The return value is the time of day in seconds.  The accuracy is in microseconds.

       The function `tccalendar' is used in order to get the Gregorian calendar of a time.

              voidtccalendar(int64_tt,intjl,int*yearp,int*monp,int*dayp,int*hourp,int*minp,int*secp);
                     `t' specifies the source time in seconds from the epoch.  If it is `INT64_MAX', the current
                     time is specified.
                     `jl' specifies the jet lag of a location in seconds.  If it is `INT_MAX', the local jet lag
                     is specified.
                     `yearp'  specifies  the  pointer  to  a  variable  to which the year is assigned.  If it is
                     `NULL', it is not used.
                     `monp' specifies the pointer to a variable to which  the  month  is  assigned.   If  it  is
                     `NULL', it is not used.  1 means January and 12 means December.
                     `dayp'  specifies  the pointer to a variable to which the day of the month is assigned.  If
                     it is `NULL', it is not used.
                     `hourp' specifies the pointer to a variable to which the  hours  is  assigned.   If  it  is
                     `NULL', it is not used.
                     `minp'  specifies  the  pointer  to  a variable to which the minutes is assigned.  If it is
                     `NULL', it is not used.
                     `secp' specifies the pointer to a variable to which the seconds  is  assigned.   If  it  is
                     `NULL', it is not used.

       The function `tcdatestrwww' is used in order to format a date as a string in W3CDTF.

              voidtcdatestrwww(int64_tt,intjl,char*buf);
                     `t' specifies the source time in seconds from the epoch.  If it is `INT64_MAX', the current
                     time is specified.
                     `jl' specifies the jet lag of a location in seconds.  If it is `INT_MAX', the local jet lag
                     is specified.
                     `buf'  specifies  the  pointer  to the region into which the result string is written.  The
                     size of the buffer should be equal to or more than 48 bytes.
                     W3CDTF represents a date as "YYYY-MM-DDThh:mm:ddTZD".

       The function `tcdatestrhttp' is used in order to format a date as a string in RFC 1123 format.

              voidtcdatestrhttp(int64_tt,intjl,char*buf);
                     `t' specifies the source time in seconds from the epoch.  If it is `INT64_MAX', the current
                     time is specified.
                     `jl' specifies the jet lag of a location in seconds.  If it is `INT_MAX', the local jet lag
                     is specified.
                     `buf' specifies the pointer to the region into which the result  string  is  written.   The
                     size of the buffer should be equal to or more than 48 bytes.
                     RFC 1123 format represents a date as "Wdy, DD-Mon-YYYY hh:mm:dd TZD".

       The function `tcstrmktime' is used in order to get the time value of a date string.

              int64_ttcstrmktime(constchar*str);
                     `str'  specifies  the  date  string  in  decimal,  hexadecimal,  W3CDTF, or RFC 822 (1123).
                     Decimal can be trailed by "s" for in seconds, "m" for in minutes, "h" for in hours, and "d"
                     for in days.
                     The return value is the time value of the date or `INT64_MIN' if the format is invalid.

       The function `tcjetlag' is used in order to get the jet lag of the local time.

              inttcjetlag(void);
                     The return value is the jet lag of the local time in seconds.

       The function `tcdayofweek' is used in order to get the day of week of a date.

              inttcdayofweek(intyear,intmon,intday);
                     `year' specifies the year of a date.
                     `mon' specifies the month of the date.
                     `day' specifies the day of the date.
                     The return value is the day of week of the date.  0 means Sunday and 6 means Saturday.

Api Of On-Memory Hash Database

       The function `tcmdbnew' is used in order to create an on-memory hash database object.

              TCMDB*tcmdbnew(void);
                     The return value is the new on-memory hash database object.
                     The object can be shared by plural threads because of the internal mutex.

       The function `tcmdbnew2' is used in order to create an on-memory hash database object with specifying the
       number of the buckets.

              TCMDB*tcmdbnew2(uint32_tbnum);
                     `bnum' specifies the number of the buckets.
                     The return value is the new on-memory hash database object.
                     The object can be shared by plural threads because of the internal mutex.

       The function `tcmdbdel' is used in order to delete an on-memory hash database object.

              voidtcmdbdel(TCMDB*mdb);
                     `mdb' specifies the on-memory hash database object.

       The function `tcmdbput' is used in order to store a record into an on-memory hash database object.

              voidtcmdbput(TCMDB*mdb,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If a record with the same key exists in the database, it is overwritten.

       The  function  `tcmdbput2'  is  used  in  order  to store a string record into an on-memory hash database
       object.

              voidtcmdbput2(TCMDB*mdb,constchar*kstr,constchar*vstr);
                     `mdb' specifies the on-memory hash database object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If a record with the same key exists in the database, it is overwritten.

       The function `tcmdbputkeep' is used in order to store a  new  record  into  an  on-memory  hash  database
       object.

              booltcmdbputkeep(TCMDB*mdb,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the database, this function has no effect.

       The  function  `tcmdbputkeep2'  is  used  in  order  to  store a new string record into an on-memory hash
       database object.

              booltcmdbputkeep2(TCMDB*mdb,constchar*kstr,constchar*vstr);
                     `mdb' specifies the on-memory hash database object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the database, this function has no effect.

       The function `tcmdbputcat' is used in order to concatenate a value at the end of the existing  record  in
       an on-memory hash database.

              voidtcmdbputcat(TCMDB*mdb,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If there is no corresponding record, a new record is created.

       The function `tcmdbputcat2' is used in order to concatenate a string at the end of the existing record in
       an on-memory hash database.

              voidtcmdbputcat2(TCMDB*mdb,constchar*kstr,constchar*vstr);
                     `mdb' specifies the on-memory hash database object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If there is no corresponding record, a new record is created.

       The function `tcmdbout' is used in order to remove a record of an on-memory hash database object.

              booltcmdbout(TCMDB*mdb,constvoid*kbuf,intksiz);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     If  successful,  the return value is true.  False is returned when no record corresponds to
                     the specified key.

       The function `tcmdbout2' is used in order to remove a string record of an on-memory hash database object.

              booltcmdbout2(TCMDB*mdb,constchar*kstr);
                     `mdb' specifies the on-memory hash database object.
                     `kstr' specifies the string of the key.
                     If successful, the return value is true.  False is returned when no record  corresponds  to
                     the specified key.

       The function `tcmdbget' is used in order to retrieve a record in an on-memory hash database object.

              void*tcmdbget(TCMDB*mdb,constvoid*kbuf,intksiz,int*sp);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value  is  the  pointer  to  the  region  of  the  value  of  the
                     corresponding record.  `NULL' is returned when no record corresponds.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  Because the region  of  the  return
                     value  is allocated with the `malloc' call, it should be released with the `free' call when
                     it is no longer in use.

       The function `tcmdbget2' is used in order to retrieve a string  record  in  an  on-memory  hash  database
       object.

              char*tcmdbget2(TCMDB*mdb,constchar*kstr);
                     `mdb' specifies the on-memory hash database object.
                     `kstr' specifies the string of the key.
                     If  successful,  the  return  value is the string of the value of the corresponding record.
                     `NULL' is returned when no record corresponds.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The  function  `tcmdbvsiz' is used in order to get the size of the value of a record in an on-memory hash
       database object.

              inttcmdbvsiz(TCMDB*mdb,constvoid*kbuf,intksiz);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     If successful, the return value is the size of the value of the corresponding record, else,
                     it is -1.

       The function `tcmdbvsiz2' is used in order to get the size  of  the  value  of  a  string  record  in  an
       on-memory hash database object.

              inttcmdbvsiz2(TCMDB*mdb,constchar*kstr);
                     `mdb' specifies the on-memory hash database object.
                     `kstr' specifies the string of the key.
                     If successful, the return value is the size of the value of the corresponding record, else,
                     it is -1.

       The  function  `tcmdbiterinit'  is used in order to initialize the iterator of an on-memory hash database
       object.

              voidtcmdbiterinit(TCMDB*mdb);
                     `mdb' specifies the on-memory hash database object.
                     The iterator is used in order to access the key of every record  stored  in  the  on-memory
                     hash database.

       The  function  `tcmdbiternext'  is used in order to get the next key of the iterator of an on-memory hash
       database object.

              void*tcmdbiternext(TCMDB*mdb,int*sp);
                     `mdb' specifies the on-memory hash database object.
                     `sp' specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the region of the next key, else,  it  is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  Because the region  of  the  return
                     value  is allocated with the `malloc' call, it should be released with the `free' call when
                     it is no longer in use.  The order of iteration is assured to be the  same  as  the  stored
                     order.

       The function `tcmdbiternext2' is used in order to get the next key string of the iterator of an on-memory
       hash database object.

              char*tcmdbiternext2(TCMDB*mdb);
                     `mdb' specifies the on-memory hash database object.
                     If  successful,  the return value is the pointer to the region of the next key, else, it is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released  with  the  `free'  call  when  it is no longer in use.  The order of iteration is
                     assured to be the same as the stored order.

       The function `tcmdbfwmkeys' is used in order to get forward matching keys in an on-memory  hash  database
       object.

              TCLIST*tcmdbfwmkeys(TCMDB*mdb,constvoid*pbuf,intpsiz,intmax);
                     `mdb' specifies the on-memory hash database object.
                     `pbuf' specifies the pointer to the region of the prefix.
                     `psiz' specifies the size of the region of the prefix.
                     `max'  specifies  the maximum number of keys to be fetched.  If it is negative, no limit is
                     specified.
                     The return value is a list object of the corresponding  keys.   This  function  does  never
                     fail.  It returns an empty list even if no key corresponds.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no  longer  in  use.   Note  that  this
                     function may be very slow because every key in the database is scanned.

       The  function  `tcmdbfwmkeys2'  is used in order to get forward matching string keys in an on-memory hash
       database object.

              TCLIST*tcmdbfwmkeys2(TCMDB*mdb,constchar*pstr,intmax);
                     `mdb' specifies the on-memory hash database object.
                     `pstr' specifies the string of the prefix.
                     `max' specifies the maximum number of keys to be fetched.  If it is negative, no  limit  is
                     specified.
                     The  return  value  is  a  list object of the corresponding keys.  This function does never
                     fail.  It returns an empty list even if no key corresponds.
                     Because the object of the return value is created with the function `tclistnew', it  should
                     be  deleted  with  the  function  `tclistdel'  when it is no longer in use.  Note that this
                     function may be very slow because every key in the database is scanned.

       The function `tcmdbrnum' is used in order to get the number  of  records  stored  in  an  on-memory  hash
       database object.

              uint64_ttcmdbrnum(TCMDB*mdb);
                     `mdb' specifies the on-memory hash database object.
                     The return value is the number of the records stored in the database.

       The  function  `tcmdbmsiz'  is  used  in  order to get the total size of memory used in an on-memory hash
       database object.

              uint64_ttcmdbmsiz(TCMDB*mdb);
                     `mdb' specifies the on-memory hash database object.
                     The return value is the total size of memory used in the database.

       The function `tcmdbaddint' is used in order to add an integer to a record in an on-memory  hash  database
       object.

              inttcmdbaddint(TCMDB*mdb,constvoid*kbuf,intksiz,intnum);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as an integer and is added to.  If
                     no record corresponds, a new record of the additional value is stored.

       The  function  `tcmdbadddouble'  is  used  in order to add a real number to a record in an on-memory hash
       database object.

              doubletcmdbadddouble(TCMDB*mdb,constvoid*kbuf,intksiz,doublenum);
                     `mdb' specifies the on-memory hash database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as a real number and is added  to.
                     If no record corresponds, a new record of the additional value is stored.

       The function `tcmdbvanish' is used in order to clear an on-memory hash database object.

              voidtcmdbvanish(TCMDB*mdb);
                     `mdb' specifies the on-memory hash database object.
                     All records are removed.

       The  function  `tcmdbcutfront'  is  used  in  order to remove front records of an on-memory hash database
       object.

              voidtcmdbcutfront(TCMDB*mdb,intnum);
                     `mdb' specifies the on-memory hash database object.
                     `num' specifies the number of records to be removed.

Api Of On-Memory Tree Database

       The function `tcndbnew' is used in order to create an on-memory tree database object.

              TCNDB*tcndbnew(void);
                     The return value is the new on-memory tree database object.
                     The object can be shared by plural threads because of the internal mutex.

       The function `tcndbnew2' is used in order to create an on-memory tree database object with specifying the
       custom comparison function.

              TCNDB*tcndbnew2(TCCMPcmp,void*cmpop);
                     `cmp' specifies the pointer to the custom comparison function.
                     `cmpop' specifies an arbitrary pointer to  be  given  as  a  parameter  of  the  comparison
                     function.  If it is not needed, `NULL' can be specified.
                     The return value is the new on-memory tree database object.
                     The  default  comparison  function  compares  keys  of  two  records by lexical order.  The
                     functions `tccmplexical' (default),  `tccmpdecimal',  `tccmpint32',  and  `tccmpint64'  are
                     built-in.  The object can be shared by plural threads because of the internal mutex.

       The function `tcndbdel' is used in order to delete an on-memory tree database object.

              voidtcndbdel(TCNDB*ndb);
                     `ndb' specifies the on-memory tree database object.

       The function `tcndbput' is used in order to store a record into an on-memory tree database object.

              voidtcndbput(TCNDB*ndb,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If a record with the same key exists in the database, it is overwritten.

       The  function  `tcndbput2'  is  used  in  order  to store a string record into an on-memory tree database
       object.

              voidtcndbput2(TCNDB*ndb,constchar*kstr,constchar*vstr);
                     `ndb' specifies the on-memory tree database object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If a record with the same key exists in the database, it is overwritten.

       The function `tcndbputkeep' is used in order to store a  new  record  into  an  on-memory  tree  database
       object.

              booltcndbputkeep(TCNDB*ndb,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the database, this function has no effect.

       The  function  `tcndbputkeep2'  is  used  in  order  to  store a new string record into an on-memory tree
       database object.

              booltcndbputkeep2(TCNDB*ndb,constchar*kstr,constchar*vstr);
                     `ndb' specifies the on-memory tree database object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the database, this function has no effect.

       The function `tcndbputcat' is used in order to concatenate a value at the end of the existing  record  in
       an on-memory tree database.

              voidtcndbputcat(TCNDB*ndb,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If there is no corresponding record, a new record is created.

       The function `tcndbputcat2' is used in order to concatenate a string at the end of the existing record in
       an on-memory tree database.

              voidtcndbputcat2(TCNDB*ndb,constchar*kstr,constchar*vstr);
                     `ndb' specifies the on-memory tree database object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If there is no corresponding record, a new record is created.

       The function `tcndbout' is used in order to remove a record of an on-memory tree database object.

              booltcndbout(TCNDB*ndb,constvoid*kbuf,intksiz);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     If  successful,  the return value is true.  False is returned when no record corresponds to
                     the specified key.

       The function `tcndbout2' is used in order to remove a string record of an on-memory tree database object.

              booltcndbout2(TCNDB*ndb,constchar*kstr);
                     `ndb' specifies the on-memory tree database object.
                     `kstr' specifies the string of the key.
                     If successful, the return value is true.  False is returned when no record  corresponds  to
                     the specified key.

       The function `tcndbget' is used in order to retrieve a record in an on-memory tree database object.

              void*tcndbget(TCNDB*ndb,constvoid*kbuf,intksiz,int*sp);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value  is  the  pointer  to  the  region  of  the  value  of  the
                     corresponding record.  `NULL' is returned when no record corresponds.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  Because the region  of  the  return
                     value  is allocated with the `malloc' call, it should be released with the `free' call when
                     it is no longer in use.

       The function `tcndbget2' is used in order to retrieve a string  record  in  an  on-memory  tree  database
       object.

              char*tcndbget2(TCNDB*ndb,constchar*kstr);
                     `ndb' specifies the on-memory tree database object.
                     `kstr' specifies the string of the key.
                     If  successful,  the  return  value is the string of the value of the corresponding record.
                     `NULL' is returned when no record corresponds.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The  function  `tcndbvsiz' is used in order to get the size of the value of a record in an on-memory tree
       database object.

              inttcndbvsiz(TCNDB*ndb,constvoid*kbuf,intksiz);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     If successful, the return value is the size of the value of the corresponding record, else,
                     it is -1.

       The function `tcndbvsiz2' is used in order to get the size  of  the  value  of  a  string  record  in  an
       on-memory tree database object.

              inttcndbvsiz2(TCNDB*ndb,constchar*kstr);
                     `ndb' specifies the on-memory tree database object.
                     `kstr' specifies the string of the key.
                     If successful, the return value is the size of the value of the corresponding record, else,
                     it is -1.

       The  function  `tcndbiterinit'  is used in order to initialize the iterator of an on-memory tree database
       object.

              voidtcndbiterinit(TCNDB*ndb);
                     `ndb' specifies the on-memory tree database object.
                     The iterator is used in order to access the key of every record  stored  in  the  on-memory
                     database.

       The  function  `tcndbiternext'  is used in order to get the next key of the iterator of an on-memory tree
       database object.

              void*tcndbiternext(TCNDB*ndb,int*sp);
                     `ndb' specifies the on-memory tree database object.
                     `sp' specifies the pointer to the variable into which the size of the region of the  return
                     value is assigned.
                     If  successful,  the return value is the pointer to the region of the next key, else, it is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     Because an additional zero code is appended at the end of the region of the  return  value,
                     the  return  value  can be treated as a character string.  Because the region of the return
                     value is allocated with the `malloc' call, it should be released with the `free' call  when
                     it  is  no  longer  in use.  The order of iteration is assured to be the same as the stored
                     order.

       The function `tcndbiternext2' is used in order to get the next key string of the iterator of an on-memory
       tree database object.

              char*tcndbiternext2(TCNDB*ndb);
                     `ndb' specifies the on-memory tree database object.
                     If successful, the return value is the pointer to the region of the next key, else,  it  is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     Because  the  region  of the return value is allocated with the `malloc' call, it should be
                     released with the `free' call when it is no longer in  use.   The  order  of  iteration  is
                     assured to be the same as the stored order.

       The  function  `tcndbfwmkeys' is used in order to get forward matching keys in an on-memory tree database
       object.

              TCLIST*tcndbfwmkeys(TCNDB*ndb,constvoid*pbuf,intpsiz,intmax);
                     `ndb' specifies the on-memory tree database object.
                     `pbuf' specifies the pointer to the region of the prefix.
                     `psiz' specifies the size of the region of the prefix.
                     `max' specifies the maximum number of keys to be fetched.  If it is negative, no  limit  is
                     specified.
                     The  return  value  is  a  list object of the corresponding keys.  This function does never
                     fail.  It returns an empty list even if no key corresponds.
                     Because the object of the return value is created with the function `tclistnew', it  should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The  function  `tcndbfwmkeys2'  is used in order to get forward matching string keys in an on-memory tree
       database object.

              TCLIST*tcndbfwmkeys2(TCNDB*ndb,constchar*pstr,intmax);
                     `ndb' specifies the on-memory tree database object.
                     `pstr' specifies the string of the prefix.
                     `max' specifies the maximum number of keys to be fetched.  If it is negative, no  limit  is
                     specified.
                     The  return  value  is  a  list object of the corresponding keys.  This function does never
                     fail.  It returns an empty list even if no key corresponds.
                     Because the object of the return value is created with the function `tclistnew', it  should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The  function  `tcndbrnum'  is  used  in  order  to get the number of records stored in an on-memory tree
       database object.

              uint64_ttcndbrnum(TCNDB*ndb);
                     `ndb' specifies the on-memory tree database object.
                     The return value is the number of the records stored in the database.

       The function `tcndbmsiz' is used in order to get the total size of  memory  used  in  an  on-memory  tree
       database object.

              uint64_ttcndbmsiz(TCNDB*ndb);
                     `ndb' specifies the on-memory tree database object.
                     The return value is the total size of memory used in the database.

       The  function  `tcndbaddint' is used in order to add an integer to a record in an on-memory tree database
       object.

              inttcndbaddint(TCNDB*ndb,constvoid*kbuf,intksiz,intnum);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as an integer and is added to.  If
                     no record corresponds, a new record of the additional value is stored.

       The function `tcndbadddouble' is used in order to add a real number to a  record  in  an  on-memory  tree
       database object.

              doubletcndbadddouble(TCNDB*ndb,constvoid*kbuf,intksiz,doublenum);
                     `ndb' specifies the on-memory tree database object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If  the corresponding record exists, the value is treated as a real number and is added to.
                     If no record corresponds, a new record of the additional value is stored.

       The function `tcndbvanish' is used in order to clear an on-memory tree database object.

              voidtcndbvanish(TCNDB*ndb);
                     `ndb' specifies the on-memory tree database object.
                     All records are removed.

       The function `tcndbcutfringe' is used in order to remove fringe records of  an  on-memory  tree  database
       object.

              voidtcndbcutfringe(TCNDB*ndb,intnum);
                     `ndb' specifies the on-memory tree database object.
                     `num' specifies the number of records to be removed.

Api Of Ordered Tree

       The function `tctreenew' is used in order to create a tree object.

              TCTREE*tctreenew(void);
                     The return value is the new tree object.

       The function `tctreenew2' is used in order to create a tree object with specifying the custom  comparison
       function.

              TCTREE*tctreenew2(TCCMPcmp,void*cmpop);
                     `cmp'  specifies  the  pointer  to  the  custom  comparison  function.   It  receives  five
                     parameters.  The first parameter is the pointer to the  region  of  one  key.   The  second
                     parameter  is the size of the region of one key.  The third parameter is the pointer to the
                     region of the other key.  The fourth parameter is the size of the region of the other  key.
                     The  fifth  parameter is the pointer to the optional opaque object.  It returns positive if
                     the former is big, negative if the latter is big, 0 if both are equivalent.
                     `cmpop' specifies an arbitrary pointer to  be  given  as  a  parameter  of  the  comparison
                     function.  If it is not needed, `NULL' can be specified.
                     The return value is the new tree object.
                     The  default  comparison  function  compares  keys  of  two  records by lexical order.  The
                     functions `tccmplexical' (default),  `tccmpdecimal',  `tccmpint32',  and  `tccmpint64'  are
                     built-in.

       The function `tctreedup' is used in order to copy a tree object.

              TCTREE*tctreedup(constTCTREE*tree);
                     `tree' specifies the tree object.
                     The return value is the new tree object equivalent to the specified object.

       The function `tctreedel' is used in order to delete a tree object.

              voidtctreedel(TCTREE*tree);
                     `tree' specifies the tree object.
                     Note that the deleted object and its derivatives can not be used anymore.

       The function `tctreeput' is used in order to store a record into a tree object.

              voidtctreeput(TCTREE*tree,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If a record with the same key exists in the tree, it is overwritten.

       The function `tctreeput2' is used in order to store a string record into a tree object.

              voidtctreeput2(TCTREE*tree,constchar*kstr,constchar*vstr);
                     `tree' specifies the tree object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If a record with the same key exists in the tree, it is overwritten.

       The function `tctreeputkeep' is used in order to store a new record into a tree object.

              booltctreeputkeep(TCTREE*tree,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the tree, this function has no effect.

       The function `tctreeputkeep2' is used in order to store a new string record into a tree object.

              booltctreeputkeep2(TCTREE*tree,constchar*kstr,constchar*vstr);
                     `tree' specifies the tree object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If successful, the return value is true, else, it is false.
                     If a record with the same key exists in the tree, this function has no effect.

       The  function  `tctreeputcat'  is  used  in  order  to concatenate a value at the end of the value of the
       existing record in a tree object.

              voidtctreeputcat(TCTREE*tree,constvoid*kbuf,intksiz,constvoid*vbuf,intvsiz);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `vbuf' specifies the pointer to the region of the value.
                     `vsiz' specifies the size of the region of the value.
                     If there is no corresponding record, a new record is created.

       The function `tctreeputcat2' is used in order to concatenate a string value at the end of  the  value  of
       the existing record in a tree object.

              voidtctreeputcat2(TCTREE*tree,constchar*kstr,constchar*vstr);
                     `tree' specifies the tree object.
                     `kstr' specifies the string of the key.
                     `vstr' specifies the string of the value.
                     If there is no corresponding record, a new record is created.

       The function `tctreeout' is used in order to remove a record of a tree object.

              booltctreeout(TCTREE*tree,constvoid*kbuf,intksiz);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     If  successful,  the return value is true.  False is returned when no record corresponds to
                     the specified key.

       The function `tctreeout2' is used in order to remove a string record of a tree object.

              booltctreeout2(TCTREE*tree,constchar*kstr);
                     `tree' specifies the tree object.
                     `kstr' specifies the string of the key.
                     If successful, the return value is true.  False is returned when no record  corresponds  to
                     the specified key.

       The function `tctreeget' is used in order to retrieve a record in a tree object.

              constvoid*tctreeget(TCTREE*tree,constvoid*kbuf,intksiz,int*sp);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value  is  the  pointer  to  the  region  of  the  value  of  the
                     corresponding record.  `NULL' is returned when no record corresponds.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.

       The function `tctreeget2' is used in order to retrieve a string record in a tree object.

              constchar*tctreeget2(TCTREE*tree,constchar*kstr);
                     `tree' specifies the tree object.
                     `kstr' specifies the string of the key.
                     If successful, the return value is the string of the value  of  the  corresponding  record.
                     `NULL' is returned when no record corresponds.

       The function `tctreeiterinit' is used in order to initialize the iterator of a tree object.

              voidtctreeiterinit(TCTREE*tree);
                     `tree' specifies the tree object.
                     The iterator is used in order to access the key of every record stored in the tree object.

       The function `tctreeiternext' is used in order to get the next key of the iterator of a tree object.

              constvoid*tctreeiternext(TCTREE*tree,int*sp);
                     `tree' specifies the tree object.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     If successful, the return value is the pointer to the region of the next key, else,  it  is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     Because  an  additional zero code is appended at the end of the region of the return value,
                     the return value can be treated as a character string.  The order of iteration  is  assured
                     to be ascending of the keys.

       The  function  `tctreeiternext2'  is  used  in order to get the next key string of the iterator of a tree
       object.

              constchar*tctreeiternext2(TCTREE*tree);
                     `tree' specifies the tree object.
                     If successful, the return value is the pointer to the region of the next key, else,  it  is
                     `NULL'.  `NULL' is returned when no record can be fetched from the iterator.
                     The order of iteration is assured to be ascending of the keys.

       The function `tctreernum' is used in order to get the number of records stored in a tree object.

              uint64_ttctreernum(constTCTREE*tree);
                     `tree' specifies the tree object.
                     The return value is the number of the records stored in the tree object.

       The function `tctreemsiz' is used in order to get the total size of memory used in a tree object.

              uint64_ttctreemsiz(constTCTREE*tree);
                     `tree' specifies the tree object.
                     The return value is the total size of memory used in a tree object.

       The function `tctreekeys' is used in order to create a list object containing all keys in a tree object.

              TCLIST*tctreekeys(constTCTREE*tree);
                     `tree' specifies the tree object.
                     The return value is the new list object containing all keys in the tree object.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tctreevals' is used in order to create a list  object  containing  all  values  in  a  tree
       object.

              TCLIST*tctreevals(constTCTREE*tree);
                     `tree' specifies the tree object.
                     The return value is the new list object containing all values in the tree object.
                     Because  the object of the return value is created with the function `tclistnew', it should
                     be deleted with the function `tclistdel' when it is no longer in use.

       The function `tctreeaddint' is used in order to add an integer to a record in a tree object.

              inttctreeaddint(TCTREE*tree,constvoid*kbuf,intksiz,intnum);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as an integer and is added to.  If
                     no record corresponds, a new record of the additional value is stored.

       The function `tctreeadddouble' is used in order to add a real number to a record in a tree object.

              doubletctreeadddouble(TCTREE*tree,constvoid*kbuf,intksiz,doublenum);
                     `tree' specifies the tree object.
                     `kbuf' specifies the pointer to the region of the key.
                     `ksiz' specifies the size of the region of the key.
                     `num' specifies the additional value.
                     The return value is the summation value.
                     If the corresponding record exists, the value is treated as a real number and is added  to.
                     If no record corresponds, a new record of the additional value is stored.

       The function `tctreeclear' is used in order to clear a tree object.

              voidtctreeclear(TCTREE*tree);
                     `tree' specifies the tree object.
                     All records are removed.

       The function `tctreecutfringe' is used in order to remove fringe records of a tree object.

              voidtctreecutfringe(TCTREE*tree,intnum);
                     `tree' specifies the tree object.
                     `num' specifies the number of records to be removed.

       The function `tctreedump' is used in order to serialize a tree object into a byte array.

              void*tctreedump(constTCTREE*tree,int*sp);
                     `tree' specifies the tree object.
                     `sp'  specifies the pointer to the variable into which the size of the region of the return
                     value is assigned.
                     The return value is the pointer to the region of the result serial region.
                     Because the region of the return value is allocated with the `malloc' call,  it  should  be
                     released with the `free' call when it is no longer in use.

       The function `tctreeload' is used in order to create a tree object from a serialized byte array.

              TCTREE*tctreeload(constvoid*ptr,intsize,TCCMPcmp,void*cmpop);
                     `ptr' specifies the pointer to the region of serialized byte array.
                     `size' specifies the size of the region.
                     `cmp' specifies the pointer to the custom comparison function.
                     `cmpop'  specifies  an  arbitrary  pointer  to  be  given  as a parameter of the comparison
                     function.
                     If it is not needed, `NULL' can be specified.
                     The return value is a new tree object.
                     Because the object of the return value is created with the function `tctreenew', it  should
                     be deleted with the function `tctreedel' when it is no longer in use.

Description

       The  utility API is a set of routines to handle records on memory easily.  Especially, extensible string,
       array list, hash map, and ordered tree are useful.

       To use the utility API, include `tcutil.h'  and  related  standard  header  files.   Usually,  write  the
       following description near the front of a source file.

              #include<tcutil.h>#include<stdlib.h>#include<time.h>#include<stdbool.h>#include<stdint.h>

       Objects whose type is pointer to `TCXSTR' are used for extensible string.  An extensible string object is
       created  with  the function `tcxstrnew' and is deleted with the function `tcxstrdel'.  Objects whose type
       is pointer to `TCLIST' are used for array list.  A list object is created with the  function  `tclistnew'
       and is deleted with the function `tclistdel'.  Objects whose type is pointer to `TCMAP' are used for hash
       map.   A  map object is created with the function `tcmapnew' and is deleted with the function `tcmapdel'.
       Objects whose type is pointer to `TCTREE' are used for ordered tree.  A tree object is created  with  the
       function `tctreenew' and is deleted with the function `tctreedel'.  To avoid memory leak, it is important
       to delete every object when it is no longer in use.

Name

       tcutil - the utility API

See Also

tcutest(1), tcucodec(1), tokyocabinet(3)

Man Page                                           2012-08-18                                          TCUTIL(3)

See Also