Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
gautam22188@iiitd.edu.in /
miniconda3 /
include /
[ HOME SHELL ]
Name
Size
Permission
Action
GL
[ DIR ]
drwxr-xr-x
X11
[ DIR ]
drwxr-xr-x
curl
[ DIR ]
drwxr-xr-x
dbus-1.0
[ DIR ]
drwxr-xr-x
fmt
[ DIR ]
drwxr-xr-x
gmock
[ DIR ]
drwxr-xr-x
gtest
[ DIR ]
drwxr-xr-x
libxml2
[ DIR ]
drwxr-xr-x
lzma
[ DIR ]
drwxr-xr-x
mamba
[ DIR ]
drwxr-xr-x
ncurses
[ DIR ]
drwxr-xr-x
ncursesw
[ DIR ]
drwxr-xr-x
nghttp2
[ DIR ]
drwxr-xr-x
nlohmann
[ DIR ]
drwxr-xr-x
openssl
[ DIR ]
drwxr-xr-x
python3.13
[ DIR ]
drwxr-xr-x
readline
[ DIR ]
drwxr-xr-x
reproc
[ DIR ]
drwxr-xr-x
reproc++
[ DIR ]
drwxr-xr-x
solv
[ DIR ]
drwxr-xr-x
textstyle
[ DIR ]
drwxr-xr-x
tl
[ DIR ]
drwxr-xr-x
unicode
[ DIR ]
drwxr-xr-x
unistring
[ DIR ]
drwxr-xr-x
uuid
[ DIR ]
drwxr-xr-x
xcb
[ DIR ]
drwxr-xr-x
yaml-cpp
[ DIR ]
drwxr-xr-x
archive.h
54.78
KB
-rw-r--r--
archive_entry.h
34.6
KB
-rw-r--r--
ares.h
46.85
KB
-rw-r--r--
ares_build.h
1.07
KB
-rw-r--r--
ares_dns.h
5.67
KB
-rw-r--r--
ares_dns_record.h
46.57
KB
-rw-r--r--
ares_nameser.h
13.05
KB
-rw-r--r--
ares_version.h
1.86
KB
-rw-r--r--
autosprintf.h
2.36
KB
-rw-r--r--
bzlib.h
6.09
KB
-rw-r--r--
curses.h
98.88
KB
-rw-r--r--
cursesapp.h
7.06
KB
-rw-r--r--
cursesf.h
27.57
KB
-rw-r--r--
cursesm.h
19.53
KB
-rw-r--r--
cursesp.h
8.61
KB
-rw-r--r--
cursesw.h
49.23
KB
-rw-r--r--
cursslk.h
7.16
KB
-rw-r--r--
default.h
581
B
-rw-r--r--
eti.h
2.9
KB
-rw-r--r--
etip.h
9.91
KB
-rw-r--r--
ev++.h
20.07
KB
-rw-r--r--
ev.h
29.55
KB
-rw-r--r--
expat.h
43.68
KB
-rw-r--r--
expat_config.h
3.28
KB
-rw-r--r--
expat_external.h
6.03
KB
-rw-r--r--
fakemysql.h
8.73
KB
-rw-r--r--
fakepq.h
1.16
KB
-rw-r--r--
fakesql.h
6.37
KB
-rw-r--r--
ffi.h
13.95
KB
-rw-r--r--
ffitarget.h
4.81
KB
-rw-r--r--
form.h
18.47
KB
-rw-r--r--
gettext-po.h
15.18
KB
-rw-r--r--
iconv.h
9.03
KB
-rw-r--r--
idn2.h
13.86
KB
-rw-r--r--
itcl.h
5.53
KB
-rw-r--r--
itcl2TclOO.h
1.76
KB
-rw-r--r--
itclDecls.h
6.86
KB
-rw-r--r--
itclInt.h
36.19
KB
-rw-r--r--
itclIntDecls.h
41.75
KB
-rw-r--r--
itclMigrate2TclCore.h
2.85
KB
-rw-r--r--
itclTclIntStubsFcn.h
1.68
KB
-rw-r--r--
jansson.h
15.95
KB
-rw-r--r--
jansson_config.h
1.59
KB
-rw-r--r--
ks_names.h
44.85
KB
-rw-r--r--
libcharset.h
1.48
KB
-rw-r--r--
libssh2.h
59.24
KB
-rw-r--r--
libssh2_publickey.h
4.83
KB
-rw-r--r--
libssh2_sftp.h
16.96
KB
-rw-r--r--
localcharset.h
5.92
KB
-rw-r--r--
lz4.h
42.25
KB
-rw-r--r--
lz4frame.h
31.98
KB
-rw-r--r--
lz4frame_static.h
2
KB
-rw-r--r--
lz4hc.h
19.71
KB
-rw-r--r--
lzma.h
9.56
KB
-rw-r--r--
menu.h
11.61
KB
-rw-r--r--
mysqlStubs.h
5.52
KB
-rw-r--r--
ncurses.h
98.88
KB
-rw-r--r--
ncurses_dll.h
4.08
KB
-rw-r--r--
odbcStubs.h
5.06
KB
-rw-r--r--
panel.h
4.42
KB
-rw-r--r--
pcre2.h
50.11
KB
-rw-r--r--
pcre2posix.h
7.18
KB
-rw-r--r--
pqStubs.h
3.5
KB
-rw-r--r--
simdjson.h
4.81
MB
-rw-r--r--
sqlite3.h
656.05
KB
-rw-r--r--
sqlite3ext.h
37.73
KB
-rw-r--r--
tcl.h
92.03
KB
-rw-r--r--
tclDecls.h
171.28
KB
-rw-r--r--
tclInt.h
170.46
KB
-rw-r--r--
tclIntDecls.h
55.63
KB
-rw-r--r--
tclIntPlatDecls.h
22.71
KB
-rw-r--r--
tclOO.h
4.16
KB
-rw-r--r--
tclOODecls.h
9.45
KB
-rw-r--r--
tclOOInt.h
23.6
KB
-rw-r--r--
tclOOIntDecls.h
7.01
KB
-rw-r--r--
tclPlatDecls.h
4
KB
-rw-r--r--
tclPort.h
1.17
KB
-rw-r--r--
tclThread.h
821
B
-rw-r--r--
tclTomMath.h
30.19
KB
-rw-r--r--
tclTomMathDecls.h
26.77
KB
-rw-r--r--
tclUnixPort.h
20.22
KB
-rw-r--r--
tdbc.h
1.62
KB
-rw-r--r--
tdbcDecls.h
1.46
KB
-rw-r--r--
tdbcInt.h
1.24
KB
-rw-r--r--
term.h
40.88
KB
-rw-r--r--
term_entry.h
8.46
KB
-rw-r--r--
termcap.h
3.4
KB
-rw-r--r--
test_data.hpp
85
B
-rw-r--r--
textstyle.h
22.28
KB
-rw-r--r--
tk.h
57.28
KB
-rw-r--r--
tk3d.h
3.04
KB
-rw-r--r--
tkArray.h
18
KB
-rw-r--r--
tkBusy.h
1.58
KB
-rw-r--r--
tkButton.h
12.2
KB
-rw-r--r--
tkCanvas.h
11.22
KB
-rw-r--r--
tkColor.h
2.59
KB
-rw-r--r--
tkDList.h
16.36
KB
-rw-r--r--
tkDecls.h
76.03
KB
-rw-r--r--
tkEntry.h
10.97
KB
-rw-r--r--
tkFileFilter.h
2.51
KB
-rw-r--r--
tkFont.h
7.82
KB
-rw-r--r--
tkImgPhoto.h
8.83
KB
-rw-r--r--
tkInt.h
47.1
KB
-rw-r--r--
tkIntDecls.h
49.86
KB
-rw-r--r--
tkIntPlatDecls.h
29.12
KB
-rw-r--r--
tkIntXlibDecls.h
66.76
KB
-rw-r--r--
tkMacOSX.h
1016
B
-rw-r--r--
tkMacOSXColor.h
16.71
KB
-rw-r--r--
tkMacOSXConstants.h
5.08
KB
-rw-r--r--
tkMacOSXCursors.h
4.21
KB
-rw-r--r--
tkMacOSXDebug.h
952
B
-rw-r--r--
tkMacOSXDefault.h
18.11
KB
-rw-r--r--
tkMacOSXEvent.h
527
B
-rw-r--r--
tkMacOSXFont.h
797
B
-rw-r--r--
tkMacOSXInt.h
4.83
KB
-rw-r--r--
tkMacOSXKeysyms.h
48.87
KB
-rw-r--r--
tkMacOSXPort.h
4.76
KB
-rw-r--r--
tkMacOSXPrivate.h
18.39
KB
-rw-r--r--
tkMacOSXWm.h
10.01
KB
-rw-r--r--
tkMacOSXXCursors.h
36.92
KB
-rw-r--r--
tkMenu.h
20.73
KB
-rw-r--r--
tkMenubutton.h
7.85
KB
-rw-r--r--
tkPlatDecls.h
6.67
KB
-rw-r--r--
tkPort.h
632
B
-rw-r--r--
tkScale.h
8.81
KB
-rw-r--r--
tkScrollbar.h
6.7
KB
-rw-r--r--
tkSelect.h
6.61
KB
-rw-r--r--
tkText.h
45.98
KB
-rw-r--r--
tkUndo.h
3.59
KB
-rw-r--r--
tkUnixDefault.h
16.95
KB
-rw-r--r--
tkUnixInt.h
674
B
-rw-r--r--
tkUnixPort.h
4.11
KB
-rw-r--r--
tkUuid.h
92
B
-rw-r--r--
unctrl.h
3.11
KB
-rw-r--r--
unicase.h
20.36
KB
-rw-r--r--
uniconv.h
7.36
KB
-rw-r--r--
unictype.h
48.22
KB
-rw-r--r--
unigbrk.h
5.39
KB
-rw-r--r--
unilbrk.h
6.79
KB
-rw-r--r--
unimetadata.h
1.15
KB
-rw-r--r--
uniname.h
1.94
KB
-rw-r--r--
uninorm.h
10.64
KB
-rw-r--r--
unistdio.h
9.96
KB
-rw-r--r--
unistr.h
23.25
KB
-rw-r--r--
unitypes.h
2.26
KB
-rw-r--r--
uniwbrk.h
3.18
KB
-rw-r--r--
uniwidth.h
2.14
KB
-rw-r--r--
zconf.h
16.08
KB
-rw-r--r--
zdict.h
25.89
KB
-rw-r--r--
zlib.h
94.56
KB
-rw-r--r--
zstd.h
177.49
KB
-rw-r--r--
zstd_errors.h
4.18
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tkDList.h
/* * tkDList.h -- * * A list is headed by pointers to first and last element. The elements * are doubly linked so that an arbitrary element can be removed without * a need to traverse the list. New elements can be added to the list * before or after an existing element or at the head/tail of the list. * A list may be traversed in the forward or backward direction. * * Copyright (c) 2018 Gregor Cramer. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ /* * Note that this file will not be included in header files, it is the purpose * of this file to be included in source files only. Thus we are not using the * prefix "Tk_" here for functions, because all the functions have private scope. */ /* * ------------------------------------------------------------------------------- * Use the double linked list in the following way: * ------------------------------------------------------------------------------- * typedef struct MyListEntry { TK_DLIST_LINKS(MyListEntry); int value; } MyListEntry; * TK_DLIST_DEFINE(MyList, MyListEntry); * MyList listHdr = TK_DLIST_LIST_INITIALIZER; // or MyList_Init(&listHdr) * MyListEntry *p; * int i = 0; * MyList_Append(&listHdr, (MyListEntry *)ckalloc(sizeof(MyListEntry))); * MyList_Append(&listHdr, (MyListEntry *)ckalloc(sizeof(MyListEntry))); * TK_DLIST_FOREACH(p, &listHdr) { p->value = i++; } * // ... * MyList_RemoveHead(&listHdr); * MyList_RemoveHead(&listHdr); * MyList_Clear(MyListEntry, &listHdr); // invokes ckfree() for each element * ------------------------------------------------------------------------------- * IMPORTANT NOTE: TK_DLIST_LINKS must be used at start of struct! */ #ifndef TK_DLIST_DEFINED #define TK_DLIST_DEFINED #include "tkInt.h" /* * List definitions. */ #define TK_DLIST_LINKS(ElemType) \ struct { \ struct ElemType *prev; /* previous element */ \ struct ElemType *next; /* next element */ \ } _dl_ #define TK_DLIST_LIST_INITIALIZER { NULL, NULL } #define TK_DLIST_ELEM_INITIALIZER { NULL, NULL } /*************************************************************************/ /* * DList_Init: Initialize list header. This can also be used to clear the * list. * * See also: DList_Clear() */ /*************************************************************************/ /* * DList_ElemInit: Initialize a list element. */ /*************************************************************************/ /* * DList_InsertAfter: Insert 'elem' after 'listElem'. 'elem' must not * be linked, but 'listElem' must be linked. */ /*************************************************************************/ /* * DList_InsertBefore: Insert 'elem' before 'listElem'. 'elem' must not * be linked, but 'listElem' must be linked. */ /*************************************************************************/ /* * DList_Prepend: Insert 'elem' at start of list. This element must not * be linked. * * See also: DList_Append() */ /*************************************************************************/ /* * DList_Append: Append 'elem' to end of list. This element must not * be linked. * * See also: DList_Prepend() */ /*************************************************************************/ /* * DList_Move: Append all list items of 'src' to end of 'dst'. */ /*************************************************************************/ /* * DList_Remove: Remove 'elem' from list. This element must be linked. * * See also: DList_Free() */ /*************************************************************************/ /* * DList_Free: Remove 'elem' from list and free it. This element must * be linked. * * See also: DList_Remove() */ /*************************************************************************/ /* * DList_RemoveHead: Remove first element from list. The list must * not be empty. * * See also: DList_FreeHead() */ /*************************************************************************/ /* * DList_RemoveTail: Remove last element from list. The list must * not be empty. * * See also: DList_FreeTail() */ /*************************************************************************/ /* * DList_FreeHead: Remove first element from list and free it. * The list must not be empty. * * See also: DList_RemoveHead() */ /*************************************************************************/ /* * DList_FreeTail: Remove last element from list and free it. * The list must not be empty. * * See also: DList_RemoveTail() */ /*************************************************************************/ /* * DList_SwapElems: Swap positions of given elements 'lhs' and 'rhs'. * Both elements must be linked, and must belong to same list. */ /*************************************************************************/ /* * DList_Clear: Clear whole list and free all elements. * * See also: DList_Init */ /*************************************************************************/ /* * DList_Traverse: Iterate over all elements in list from first to last. * Call given function func(head, elem) for each element. The function has * to return the next element in list to traverse, normally this is * DList_Next(elem). * * See also: TK_DLIST_FOREACH, TK_DLIST_FOREACH_REVERSE */ /*************************************************************************/ /* * DList_First: Return pointer of first element in list, maybe it's NULL. */ /*************************************************************************/ /* * DList_Last: Return pointer of last element in list, maybe it's NULL. */ /*************************************************************************/ /* * DList_Next: Return pointer of next element after 'elem', maybe it's NULL. * * See also: DList_Prev() */ /*************************************************************************/ /* * DList_Prev: Return pointer of previous element before 'elem', maybe it's * NULL. * * See also: DList_Next() */ /*************************************************************************/ /* * DList_IsEmpty: Test whether given list is empty. */ /*************************************************************************/ /* * DList_IsLinked: Test whether given element is linked. */ /*************************************************************************/ /* * DList_IsFirst: Test whether given element is first element in list. * Note that 'elem' must be linked. * * See also: DList_IsLast(), DList_IsLinked() */ /*************************************************************************/ /* * DList_IsLast: Test whether given element is last element in list. * Note that 'elem' must be linked. * * See also: DList_IsFirst(), DList_IsLinked() */ /*************************************************************************/ /* * DList_Size: Count number of elements in given list. */ /*************************************************************************/ /* * TK_DLIST_FOREACH: Iterate over all elements in list from first to last. * 'var' is the name of the variable which points to current element. * * See also: TK_DLIST_FOREACH_REVERSE, DList_Traverse() */ /*************************************************************************/ /* * TK_DLIST_FOREACH_REVERSE: Iterate over all elements in list from last * to first (backwards). 'var' is the name of the variable which points to * current element. */ /*************************************************************************/ #if defined(__GNUC__) || defined(__clang__) # define __TK_DLIST_UNUSED __attribute__((unused)) #else # define __TK_DLIST_UNUSED #endif #define TK_DLIST_DEFINE(LT, ElemType) /* LT = type of head/list */ \ /* ------------------------------------------------------------------------- */ \ typedef struct LT { \ struct ElemType *first; /* first element */ \ struct ElemType *last; /* last element */ \ } LT; \ \ typedef struct ElemType *(LT##_Func)(LT *head, struct ElemType *elem); \ \ __TK_DLIST_UNUSED \ static void \ LT##_Init(LT *head) \ { \ assert(head); \ head->first = NULL; \ head->last = NULL; \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_ElemInit(struct ElemType *elem) \ { \ assert(elem); \ elem->_dl_.next = NULL; \ elem->_dl_.prev = NULL; \ } \ \ __TK_DLIST_UNUSED \ static int \ LT##_IsEmpty(LT *head) \ { \ assert(head); \ return head->first == NULL; \ } \ \ __TK_DLIST_UNUSED \ static int \ LT##_IsLinked(struct ElemType *elem) \ { \ assert(elem); \ return elem->_dl_.next && elem->_dl_.prev; \ } \ \ __TK_DLIST_UNUSED \ static int \ LT##_IsFirst(struct ElemType *elem) \ { \ assert(LT##_IsLinked(elem)); \ return elem->_dl_.prev->_dl_.prev == elem; \ } \ \ __TK_DLIST_UNUSED \ static int \ LT##_IsLast(struct ElemType *elem) \ { \ assert(LT##_IsLinked(elem)); \ return elem->_dl_.next->_dl_.next == elem; \ } \ \ __TK_DLIST_UNUSED \ static struct ElemType * \ LT##_First(LT *head) \ { \ assert(head); \ return head->first; \ } \ \ __TK_DLIST_UNUSED \ static struct ElemType * \ LT##_Last(LT *head) \ { \ assert(head); \ return head->last; \ } \ \ __TK_DLIST_UNUSED \ static struct ElemType * \ LT##_Next(struct ElemType *elem) \ { \ assert(elem); \ return LT##_IsLast(elem) ? NULL : elem->_dl_.next; \ } \ \ __TK_DLIST_UNUSED \ static struct ElemType * \ LT##_Prev(struct ElemType *elem) \ { \ assert(elem); \ return LT##_IsFirst(elem) ? NULL : elem->_dl_.prev; \ } \ \ __TK_DLIST_UNUSED \ static unsigned \ LT##_Size(const LT *head) \ { \ const struct ElemType *elem; \ unsigned size = 0; \ assert(head); \ if ((elem = head->first)) { \ for ( ; elem != (void *) head; elem = elem->_dl_.next) { \ ++size; \ } \ } \ return size; \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_InsertAfter(struct ElemType *listElem, struct ElemType *elem) \ { \ assert(listElem); \ assert(elem); \ elem->_dl_.next = listElem->_dl_.next; \ elem->_dl_.prev = listElem; \ listElem->_dl_.next->_dl_.prev = elem; \ listElem->_dl_.next = elem; \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_InsertBefore(struct ElemType *listElem, struct ElemType *elem) \ { \ assert(listElem); \ assert(elem); \ elem->_dl_.next = listElem; \ elem->_dl_.prev = listElem->_dl_.prev;; \ listElem->_dl_.prev->_dl_.next = elem; \ listElem->_dl_.prev = elem; \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Prepend(LT *head, struct ElemType *elem) \ { \ assert(head); \ assert(elem); \ elem->_dl_.prev = (PSEntry *) head; \ if (!head->first) { \ elem->_dl_.next = (PSEntry *) head; \ head->last = elem; \ } else { \ elem->_dl_.next = head->first; \ head->first->_dl_.prev = elem; \ } \ head->first = elem; \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Append(LT *head, struct ElemType *elem) \ { \ assert(head); \ assert(elem); \ elem->_dl_.next = (PSEntry *) head; \ if (!head->first) { \ elem->_dl_.prev = (PSEntry *) head; \ head->first = elem; \ } else { \ elem->_dl_.prev = head->last; \ head->last->_dl_.next = elem; \ } \ head->last = elem; \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Move(LT *dst, LT *src) \ { \ assert(dst); \ assert(src); \ if (src->first) { \ if (dst->first) { \ dst->last->_dl_.next = src->first; \ src->first->_dl_.prev = dst->last; \ dst->last = src->last; \ } else { \ *dst = *src; \ dst->first->_dl_.prev = (PSEntry *) dst; \ } \ dst->last->_dl_.next = (PSEntry *) dst; \ LT##_Init(src); \ } \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Remove(struct ElemType *elem) \ { \ int isFirst, isLast; \ assert(LT##_IsLinked(elem)); \ isFirst = LT##_IsFirst(elem); \ isLast = LT##_IsLast(elem); \ if (isFirst && isLast) { \ ((LT *) elem->_dl_.prev)->first = NULL; \ ((LT *) elem->_dl_.next)->last = NULL; \ } else { \ if (isFirst) { \ ((LT *) elem->_dl_.prev)->first = elem->_dl_.next; \ } else { \ elem->_dl_.prev->_dl_.next = elem->_dl_.next; \ } \ if (isLast) { \ ((LT *) elem->_dl_.next)->last = elem->_dl_.prev; \ } else { \ elem->_dl_.next->_dl_.prev = elem->_dl_.prev; \ } \ } \ LT##_ElemInit(elem); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Free(struct ElemType *elem) \ { \ LT##_Remove(elem); \ ckfree((void *) elem); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_RemoveHead(LT *head) \ { \ assert(!LT##_IsEmpty(head)); \ LT##_Remove(head->first); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_RemoveTail(LT *head) \ { \ assert(!LT##_IsEmpty(head)); \ LT##_Remove(head->last); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_FreeHead(LT *head) \ { \ assert(!LT##_IsEmpty(head)); \ LT##_Free(head->first); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_FreeTail(LT *head) \ { \ assert(!LT##_IsEmpty(head)); \ LT##_Free(head->last); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_SwapElems(struct ElemType *lhs, struct ElemType *rhs) \ { \ assert(lhs); \ assert(rhs); \ if (lhs != rhs) { \ struct ElemType tmp; \ if (LT##_IsFirst(lhs)) { \ ((LT *) lhs->_dl_.prev)->first = rhs; \ } else if (LT##_IsFirst(rhs)) { \ ((LT *) rhs->_dl_.prev)->first = lhs; \ } \ if (LT##_IsLast(lhs)) { \ ((LT *) lhs->_dl_.next)->last = rhs; \ } else if (LT##_IsLast(rhs)) { \ ((LT *) rhs->_dl_.next)->last = lhs; \ } \ tmp._dl_ = lhs->_dl_; \ lhs->_dl_ = rhs->_dl_; \ rhs->_dl_ = tmp._dl_; \ } \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Clear(LT *head) \ { \ struct ElemType *p; \ struct ElemType *next; \ assert(head); \ for (p = head->first; p; p = next) { \ next = LT##_Next(p); \ ckfree((void *) p); \ } \ LT##_Init(head); \ } \ \ __TK_DLIST_UNUSED \ static void \ LT##_Traverse(LT *head, LT##_Func func) \ { \ struct ElemType *next; \ struct ElemType *p; \ assert(head); \ for (p = head->first; p; p = next) { \ next = func(head, p); \ } \ } \ /* ------------------------------------------------------------------------- */ #define TK_DLIST_FOREACH(var, head) \ assert(head); \ for (var = head->first ? head->first : (PSEntry *) head; var != (PSEntry *) head; var = var->_dl_.next) #define TK_DLIST_FOREACH_REVERSE(var, head) \ assert(head); \ for (var = head->last ? head->last : (PSEntry *) head; var != (PSEntry *) head; var = var->_dl_.prev) #endif /* TK_DLIST_DEFINED */ /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 105 * End: * vi:set ts=8 sw=4: */
Close