⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cabin.3

📁 harvest是一个下载html网页得机器人
💻 3
📖 第 1 页 / 共 3 页
字号:
.PPThe function `cbrealloc' is used in order to re\-allocate a region on memory..TP.B void *cbrealloc(void *ptr, size_t size);`ptr' specifies the pointer to a region.  `size' specifies the size of the region.  The return value is the pointer to the re\-allocated region.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if it is no longer in use..PPThe function `memdup' is used in order to duplicate a region on memory..TP.B char *cbmemdup(const char *ptr, int size);`ptr' specifies the pointer to a region.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'.  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 if it is no longer in use..PPThe function `cbglobalgc' is used in order to register the pointer or handle of an object to the global garbage collector..TP.B void cbglobalgc(void *ptr, void (*func)(void *));`ptr' specifies the pointer or handle of an object.  `func' specifies the pointer to a function to release resouces of the object.  Its argument is the pointer or handle of the object to release.  This function assures that resources of an object are released when the process exits normally by returning from the `main' function or calling the `exit' function..PPThe function `cbisort' is used in order to sort an array using insert sort..TP.B void cbisort(void *base, int nmemb, int size, int(*compar)(const void *, const void *));`base' spacifies the pointer to an array.  `nmemb' specifies the number of elements of the array.  `size' specifies the size of each element.  `compar' specifies the pointer to comparing function.  The two arguments specify the pointers of elements.  The comparing function should returns positive if the former is big, negative if the latter is big, 0 if both are equal.  Insert sort is useful only if most elements have been sorted already..PPThe function `cbssort' is used in order to sort an array using shell sort..TP.B void cbssort(void *base, int nmemb, int size, int(*compar)(const void *, const void *));`base' spacifies the pointer to an array.  `nmemb' specifies the number of elements of the array.  `size' specifies the size of each element.  `compar' specifies the pointer to comparing function.  The two arguments specify the pointers of elements.  The comparing function should returns positive if the former is big, negative if the latter is big, 0 if both are equal.  If most elements have been sorted, shell sort may be faster than heap sort or quick sort..PPThe function `cbhsort' is used in order to sort an array using heap sort..TP.B void cbhsort(void *base, int nmemb, int size, int(*compar)(const void *, const void *));`base' spacifies the pointer to an array.  `nmemb' specifies the number of elements of the array.  `size' specifies the size of each element. `compar' specifies the pointer to comparing function.  The two arguments specify the pointers of elements.  The comparing function should returns positive if the former is big, negative if the latter is big, 0 if both are equal.  Although heap sort is robust against bias of input, quick sort is faster in most cases..PPThe function `cbqsort' is used in order to sort an array using quick sort..TP.B void cbqsort(void *base, int nmemb, int size, int(*compar)(const void *, const void *));`base' spacifies the pointer to an array.  `nmemb' specifies the number of elements of the array.  `size' specifies the size of each element. `compar' specifies the pointer to comparing function.  The two arguments specify the pointers of elements.  The comparing function should returns positive if the former is big, negative if the latter is big, 0 if both are equal.  Being sensitive to bias of input, quick sort is the fastest sorting algorithm..PPThe function `cbdatumopen' is used in order to get a datum handle..TP.B CBDATUM *cbdatumopen(const char *ptr, int size);`ptr' specifies the pointer to the region of the initial content.  If it is `NULL', an empty datum is created.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'.  The return value is a datum handle..PPThe function `cbdatumdup' is used in order to copy a datum..TP.B CBDATUM *cbdatumdup(const CBDATUM *datum);`datum' specifies a datum handle.  The return value is a new datum handle..PPThe function `cbdatumclose' is used in order to free a datum handle..TP.B void cbdatumclose(CBDATUM *datum);`datum' specifies a datum handle.  Because the region of a closed handle is released, it becomes impossible to use the handle..PPThe function `cbdatumcat' is used in order to concatenate a datum and a region..TP.B void cbdatumcat(CBDATUM *datum, const char *ptr, int size);`datum' specifies a datum handle.  `ptr' specifies the pointer to the region to be appended.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'..PPThe function `cbdatumptr' is used in order to get the pointer of the region of a datum..TP.B const char *cbdatumptr(const CBDATUM *datum);`datum' specifies a datum handle.  The return value is the pointer of the region of a datum.  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..PPThe function `cbdatumsize' is used in order to get the size of the region of a datum..TP.B int cbdatumsize(const CBDATUM *datum);`datum' specifies a datum handle.  The return value is the size of the region of a datum..PPThe function `cbdatumsetsize' is used in order to change the size of the region of a datum..TP.B void cbdatumsetsize(CBDATUM *datum, int size);`datum' specifies a datum handle.  `size' specifies the new size of the region.  If the new size is bigger than the one of old, the surplus region is filled with zero codes..PPThe function `cblistopen' is used in order to get a list handle..TP.B CBLIST *cblistopen(void);The return value is a list handle..PPThe function `cblistdup' is used in order to copy a list..TP.B CBLIST *cblistdup(const CBLIST *list);`list' specifies a list handle.  The return value is a new list handle..PPThe function `cblistclose' is used in order to close a list handle..TP.B void cblistclose(CBLIST *list);`list' specifies a list handle.  Because the region of a closed handle is released, it becomes impossible to use the handle..PPThe function `cblistnum' is used in order to get the number of elements of a list..TP.B int cblistnum(const CBLIST *list);`list' specifies a list handle.  The return value is the number of elements of the list..PPThe function `cblistval' is used in order to get the pointer to the region of an element..TP.B const char *cblistval(const CBLIST *list, int index, int *sp);`list' specifies a list handle.  `index' specifies the index of an element.  `sp' specifies the pointer to a variable to 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 region of the 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.  If `index' is equal to or more than the number of elements, the return value is `NULL'..PPThe function `cblistpush' is used in order to add an element at the end of a list..TP.B void cblistpush(CBLIST *list, const char *ptr, int size);`list' specifies a list handle.  `ptr' specifies the pointer to the region of an element.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'..PPThe function `cblistpop' is used in order to remove an element of the end of a list..TP.B char *cblistpop(CBLIST *list, int *sp);`list' specifies a list handle.  `sp' specifies the pointer to a variable to 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 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.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if it is no longer in use.  If the list is empty, the return value is `NULL'..PPThe function `cblistunshift' is used in order to add an element at the top of a list..TP.B void cblistunshift(CBLIST *list, const char *ptr, int size);`list' specifies a list handle.  `ptr' specifies the pointer to the region of an element.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'..PPThe function `cblistshift' is used in order to remove an element of the top of a list..TP.B char *cblistshift(CBLIST *list, int *sp);`list' specifies a list handle.  `sp' specifies the pointer to a variable to 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 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.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if it is no longer in use.  If the list is empty, the return value is `NULL'..PPThe function `cblistinsert' is used in orderto add an element at the specified location of a list..TP.B void cblistinsert(CBLIST *list, int index, const char *ptr, int size);`list' specifies a list handle.  `index' specifies the index of an element.  `ptr' specifies the pointer to the region of the element.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'..PPThe function `cblistremove' is used in order to remove an element at the specified location of a list..TP.B char *cblistremove(CBLIST *list, int index, int *sp);`list' specifies a list handle.  `index' specifies the index of an element.  `sp' specifies the pointer to a variable to 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 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.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call if 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'..PPThe function `cblistsort' is used in order to sort elements of a list in lexical order..TP.B void cblistsort(CBLIST *list);`list' specifies a list handle.  Quick sort is used for sorting..PPThe function `cblistlsearch' is used in order to search a list for an element using liner search..TP.B int cblistlsearch(const CBLIST *list, const char *ptr, int size);`list' specifies a list handle.  `ptr' specifies the pointer to the region of a key.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'.  The return value is the index of a corresponding element or \-1 if there is no corresponding element.  If two or more elements corresponds, the former returns..PPThe function `cblistbsearch' is used in order to search a list for an element using binary search..TP.B int cblistbsearch(const CBLIST *list, const char *ptr, int size);`list' specifies a list handle.  It should be sorted in lexical order.  `ptr' specifies the pointer to the region of a key.  `size' specifies the size of the region.  If it is negative, the size is assigned with `strlen(ptr)'.  The return value is the index of a corresponding element or \-1 if there is no corresponding element.  If two or more elements corresponds, which returnes is not defined..PPThe function `cblistdump' is used in order to serialize a list into a byte array..TP.B char *cblistdump(const CBLIST *list, int *sp);`list' specifies a list handle.  `sp' specifies the pointer to a variable to 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 if it is no longer in use..PPThe function `cblistload' is used in order to redintegrate a serialized list..TP.B CBLIST *cblistload(const char *ptr, int size);`ptr' specifies the pointer to a byte array.  `size' specifies the size of the region.  The return value is a new list handle..PPThe function `cbmapopen' is used in order to get a map handle..TP.B CBMAP *cbmapopen(void);The return value is a map handle..PP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -