Coverage Report

Created: 2026-02-14 06:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cairo/src/cairo-list-inline.h
Line
Count
Source
1
/* cairo - a vector graphics library with display and print output
2
 *
3
 * Copyright © 2009 Chris Wilson
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it either under the terms of the GNU Lesser General Public
7
 * License version 2.1 as published by the Free Software Foundation
8
 * (the "LGPL") or, at your option, under the terms of the Mozilla
9
 * Public License Version 1.1 (the "MPL"). If you do not alter this
10
 * notice, a recipient may use your version of this file under either
11
 * the MPL or the LGPL.
12
 *
13
 * You should have received a copy of the LGPL along with this library
14
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
15
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16
 * You should have received a copy of the MPL along with this library
17
 * in the file COPYING-MPL-1.1
18
 *
19
 * The contents of this file are subject to the Mozilla Public License
20
 * Version 1.1 (the "License"); you may not use this file except in
21
 * compliance with the License. You may obtain a copy of the License at
22
 * http://www.mozilla.org/MPL/
23
 *
24
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
26
 * the specific language governing rights and limitations.
27
 *
28
 * The Original Code is the cairo graphics library.
29
 *
30
 * The Initial Developer of the Original Code is Chris Wilson.
31
 *
32
 * Contributor(s):
33
 *      Chris Wilson <chris@chris-wilson.co.uk>
34
 *
35
 */
36
37
#ifndef CAIRO_LIST_INLINE_H
38
#define CAIRO_LIST_INLINE_H
39
40
#include "cairo-list-private.h"
41
42
/*< private >
43
 * cairo_list_entry:
44
 * @ptr: the pointer to the #cairo_list_t member.
45
 * @type: the type of the struct.
46
 * @member: the name of the list_head within the struct.
47
 *
48
 * Return value: the pointer the struct containing the @member that @ptr points to.
49
 **/
50
#define cairo_list_entry(ptr, type, member) \
51
2.76M
  cairo_container_of(ptr, type, member)
52
53
#define cairo_list_first_entry(ptr, type, member) \
54
3.33k
  cairo_list_entry((ptr)->next, type, member)
55
56
#define cairo_list_last_entry(ptr, type, member) \
57
54
  cairo_list_entry((ptr)->prev, type, member)
58
59
/*< private >
60
 * cairo_list_foreach:
61
 * @pos: a #cairo_list_t* to use as a loop variable.
62
 * @head: the list.
63
 *
64
 * Iterate the list. @pos points to the #cairo_list_t member of the entry struct.
65
 **/
66
#define cairo_list_foreach(pos, head)                                   \
67
  for (pos = (head)->next; pos != (head); pos = pos->next)
68
69
/*< private >
70
 * cairo_list_foreach_entry:
71
 * @pos: a variable of type T * to use as a loop variable.
72
 * @type: the type of the entry struct
73
 * @head: the list
74
 * @member: the name of the #cairo_list_t member of the entry
75
 *
76
 * Iterate the list of type T.
77
 **/
78
#define cairo_list_foreach_entry(pos, type, head, member)   \
79
27.1k
  for (pos = cairo_list_entry((head)->next, type, member);\
80
27.1k
       &pos->member != (head);         \
81
27.1k
       pos = cairo_list_entry(pos->member.next, type, member))
82
83
/*< private >
84
 * cairo_list_foreach_entry_safe:
85
 * @pos: a variable of type T * to use as a loop variable.
86
 * @n: a variable of type T * that point to the next item after @pos.
87
 * @type: the type of the entry struct
88
 * @head: the list
89
 * @member: the name of the #cairo_list_t member of the entry
90
 *
91
 * Iterate the list of type T. It is safe to remove items while
92
 * iterating. @n is a temporary variable required to support safe
93
 * iterating.
94
 *
95
 * |[<!-- language="C" -->
96
 *      struct foo {
97
 *          int a;
98
 *          cairo_list_t list;
99
 *      }
100
 *
101
 *      struct foo linked_list;
102
 *      cairo_list_init (&linked_list);
103
 *      ... calls to cairo_list_add (entry, &linked_list);
104
 *
105
 *      struct foo *pos, *next;
106
 *      cairo_list_foreach_entry_safe(pos, next, struct foo, &linked_list, list) {
107
 *          printf("%d\n", pos->a);
108
 *          cairo_list_del (pos);
109
 *      }
110
 * ]|
111
 **/
112
#define cairo_list_foreach_entry_safe(pos, n, type, head, member) \
113
37.0k
  for (pos = cairo_list_entry ((head)->next, type, member),\
114
37.0k
       n = cairo_list_entry (pos->member.next, type, member);\
115
37.1k
       &pos->member != (head);         \
116
37.0k
       pos = n, n = cairo_list_entry (n->member.next, type, member))
117
118
/*< private >
119
 * cairo_list_foreach_entry:
120
 * @pos: a variable of type T * to use as a loop variable.
121
 * @type: the type of the entry struct
122
 * @head: the list
123
 * @member: the name of the #cairo_list_t member of the entry
124
 *
125
 * Iterate the list of type T in reverse direction.
126
 **/
127
#define cairo_list_foreach_entry_reverse(pos, type, head, member) \
128
  for (pos = cairo_list_entry((head)->prev, type, member);\
129
       &pos->member != (head);          \
130
       pos = cairo_list_entry(pos->member.prev, type, member))
131
132
/*< private >
133
 * cairo_list_foreach_entry_safe:
134
 * @pos: a variable of type T * to use as a loop variable.
135
 * @n: a variable of type T * that point to the next item after @pos.
136
 * @type: the type of the entry struct
137
 * @head: the list
138
 * @member: the name of the #cairo_list_t member of the entry
139
 *
140
 * Iterate the list of type T in reverse direction. It is safe to
141
 * remove items while iterating. @n is a temporary variable required
142
 * to support safe iterating.
143
 **/
144
#define cairo_list_foreach_entry_reverse_safe(pos, n, type, head, member) \
145
  for (pos = cairo_list_entry((head)->prev, type, member),\
146
       n = cairo_list_entry (pos->member.prev, type, member);\
147
       &pos->member != (head);          \
148
       pos = n, n = cairo_list_entry (n->member.prev, type, member))
149
150
#ifdef CAIRO_LIST_DEBUG
151
static inline void
152
_cairo_list_validate (const cairo_list_t *link)
153
{
154
    assert (link->next->prev == link);
155
    assert (link->prev->next == link);
156
}
157
static inline void
158
cairo_list_validate (const cairo_list_t *head)
159
{
160
    cairo_list_t *link;
161
162
    cairo_list_foreach (link, head)
163
  _cairo_list_validate (link);
164
}
165
static inline cairo_bool_t
166
cairo_list_is_empty (const cairo_list_t *head);
167
static inline void
168
cairo_list_validate_is_empty (const cairo_list_t *head)
169
{
170
    assert (head->next == NULL || (cairo_list_is_empty (head) && head->next == head->prev));
171
}
172
#else
173
#define _cairo_list_validate(link)
174
#define cairo_list_validate(head)
175
#define cairo_list_validate_is_empty(head)
176
#endif
177
178
/*< private >
179
 * cairo_list_init:
180
 * @entry: list entry to initialize
181
 *
182
 * Initializes the list entry to point to itself. The result is an
183
 * empty list.
184
 **/
185
static inline void
186
cairo_list_init (cairo_list_t *entry)
187
712k
{
188
712k
    entry->next = entry;
189
712k
    entry->prev = entry;
190
712k
}
cairo-pattern.c:cairo_list_init
Line
Count
Source
187
239k
{
188
239k
    entry->next = entry;
189
239k
    entry->prev = entry;
190
239k
}
cairo-recording-surface.c:cairo_list_init
Line
Count
Source
187
10.2k
{
188
10.2k
    entry->next = entry;
189
10.2k
    entry->prev = entry;
190
10.2k
}
cairo-scaled-font.c:cairo_list_init
Line
Count
Source
187
6
{
188
6
    entry->next = entry;
189
6
    entry->prev = entry;
190
6
}
cairo-surface.c:cairo_list_init
Line
Count
Source
187
87.9k
{
188
87.9k
    entry->next = entry;
189
87.9k
    entry->prev = entry;
190
87.9k
}
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_init
cairo-pdf-interchange.c:cairo_list_init
Line
Count
Source
187
1.32k
{
188
1.32k
    entry->next = entry;
189
1.32k
    entry->prev = entry;
190
1.32k
}
cairo-gstate.c:cairo_list_init
Line
Count
Source
187
155k
{
188
155k
    entry->next = entry;
189
155k
    entry->prev = entry;
190
155k
}
Unexecuted instantiation: cairo-image-source.c:cairo_list_init
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_init
Unexecuted instantiation: cairo-observer.c:cairo_list_init
cairo-path-fixed.c:cairo_list_init
Line
Count
Source
187
217k
{
188
217k
    entry->next = entry;
189
217k
    entry->prev = entry;
190
217k
}
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_init
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_init
cairo-tag-attributes.c:cairo_list_init
Line
Count
Source
187
5
{
188
5
    entry->next = entry;
189
5
    entry->prev = entry;
190
5
}
cairo-tag-stack.c:cairo_list_init
Line
Count
Source
187
1.32k
{
188
1.32k
    entry->next = entry;
189
1.32k
    entry->prev = entry;
190
1.32k
}
Unexecuted instantiation: cairo-ft-font.c:cairo_list_init
191
192
static inline void
193
__cairo_list_add (cairo_list_t *entry,
194
            cairo_list_t *prev,
195
      cairo_list_t *next)
196
176k
{
197
176k
    next->prev = entry;
198
176k
    entry->next = next;
199
176k
    entry->prev = prev;
200
176k
    prev->next = entry;
201
176k
}
Unexecuted instantiation: cairo-pattern.c:__cairo_list_add
cairo-recording-surface.c:__cairo_list_add
Line
Count
Source
196
633
{
197
633
    next->prev = entry;
198
633
    entry->next = next;
199
633
    entry->prev = prev;
200
633
    prev->next = entry;
201
633
}
Unexecuted instantiation: cairo-scaled-font.c:__cairo_list_add
cairo-surface.c:__cairo_list_add
Line
Count
Source
196
6.58k
{
197
6.58k
    next->prev = entry;
198
6.58k
    entry->next = next;
199
6.58k
    entry->prev = prev;
200
6.58k
    prev->next = entry;
201
6.58k
}
Unexecuted instantiation: cairo-pdf-surface.c:__cairo_list_add
cairo-pdf-interchange.c:__cairo_list_add
Line
Count
Source
196
29
{
197
29
    next->prev = entry;
198
29
    entry->next = next;
199
29
    entry->prev = prev;
200
29
    prev->next = entry;
201
29
}
cairo-gstate.c:__cairo_list_add
Line
Count
Source
196
168k
{
197
168k
    next->prev = entry;
198
168k
    entry->next = next;
199
168k
    entry->prev = prev;
200
168k
    prev->next = entry;
201
168k
}
Unexecuted instantiation: cairo-image-source.c:__cairo_list_add
Unexecuted instantiation: cairo-mask-compositor.c:__cairo_list_add
Unexecuted instantiation: cairo-observer.c:__cairo_list_add
cairo-path-fixed.c:__cairo_list_add
Line
Count
Source
196
69
{
197
69
    next->prev = entry;
198
69
    entry->next = next;
199
69
    entry->prev = prev;
200
69
    prev->next = entry;
201
69
}
Unexecuted instantiation: cairo-spans-compositor.c:__cairo_list_add
Unexecuted instantiation: cairo-traps-compositor.c:__cairo_list_add
Unexecuted instantiation: cairo-tag-attributes.c:__cairo_list_add
cairo-tag-stack.c:__cairo_list_add
Line
Count
Source
196
58
{
197
58
    next->prev = entry;
198
58
    entry->next = next;
199
58
    entry->prev = prev;
200
58
    prev->next = entry;
201
58
}
Unexecuted instantiation: cairo-ft-font.c:__cairo_list_add
202
203
/*< private >
204
 * cairo_list_add:
205
 * @entry: new entry
206
 * @head: linked list head
207
 *
208
 * Insert a @entry at the start of the list.
209
 **/
210
static inline void
211
cairo_list_add (cairo_list_t *entry, cairo_list_t *head)
212
162k
{
213
162k
    cairo_list_validate (head);
214
162k
    cairo_list_validate_is_empty (entry);
215
162k
    __cairo_list_add (entry, head, head->next);
216
162k
    cairo_list_validate (head);
217
162k
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_add
cairo-recording-surface.c:cairo_list_add
Line
Count
Source
212
633
{
213
633
    cairo_list_validate (head);
214
633
    cairo_list_validate_is_empty (entry);
215
633
    __cairo_list_add (entry, head, head->next);
216
633
    cairo_list_validate (head);
217
633
}
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_add
cairo-surface.c:cairo_list_add
Line
Count
Source
212
6.58k
{
213
6.58k
    cairo_list_validate (head);
214
6.58k
    cairo_list_validate_is_empty (entry);
215
6.58k
    __cairo_list_add (entry, head, head->next);
216
6.58k
    cairo_list_validate (head);
217
6.58k
}
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_add
Unexecuted instantiation: cairo-pdf-interchange.c:cairo_list_add
cairo-gstate.c:cairo_list_add
Line
Count
Source
212
155k
{
213
155k
    cairo_list_validate (head);
214
155k
    cairo_list_validate_is_empty (entry);
215
155k
    __cairo_list_add (entry, head, head->next);
216
155k
    cairo_list_validate (head);
217
155k
}
Unexecuted instantiation: cairo-image-source.c:cairo_list_add
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_add
Unexecuted instantiation: cairo-observer.c:cairo_list_add
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_add
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_add
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_add
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_add
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_add
Unexecuted instantiation: cairo-ft-font.c:cairo_list_add
218
219
/*< private >
220
 * cairo_list_add_tail:
221
 * @entry: new entry
222
 * @head: linked list head
223
 *
224
 * Append a @entry to the end of the list.
225
 **/
226
static inline void
227
cairo_list_add_tail (cairo_list_t *entry, cairo_list_t *head)
228
156
{
229
156
    cairo_list_validate (head);
230
156
    cairo_list_validate_is_empty (entry);
231
156
    __cairo_list_add (entry, head->prev, head);
232
156
    cairo_list_validate (head);
233
156
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_add_tail
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_add_tail
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_add_tail
Unexecuted instantiation: cairo-surface.c:cairo_list_add_tail
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_add_tail
cairo-pdf-interchange.c:cairo_list_add_tail
Line
Count
Source
228
29
{
229
29
    cairo_list_validate (head);
230
29
    cairo_list_validate_is_empty (entry);
231
29
    __cairo_list_add (entry, head->prev, head);
232
29
    cairo_list_validate (head);
233
29
}
Unexecuted instantiation: cairo-gstate.c:cairo_list_add_tail
Unexecuted instantiation: cairo-image-source.c:cairo_list_add_tail
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_add_tail
Unexecuted instantiation: cairo-observer.c:cairo_list_add_tail
cairo-path-fixed.c:cairo_list_add_tail
Line
Count
Source
228
69
{
229
69
    cairo_list_validate (head);
230
69
    cairo_list_validate_is_empty (entry);
231
69
    __cairo_list_add (entry, head->prev, head);
232
69
    cairo_list_validate (head);
233
69
}
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_add_tail
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_add_tail
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_add_tail
cairo-tag-stack.c:cairo_list_add_tail
Line
Count
Source
228
58
{
229
58
    cairo_list_validate (head);
230
58
    cairo_list_validate_is_empty (entry);
231
58
    __cairo_list_add (entry, head->prev, head);
232
58
    cairo_list_validate (head);
233
58
}
Unexecuted instantiation: cairo-ft-font.c:cairo_list_add_tail
234
235
static inline void
236
__cairo_list_del (cairo_list_t *prev, cairo_list_t *next)
237
176k
{
238
176k
    next->prev = prev;
239
176k
    prev->next = next;
240
176k
}
Unexecuted instantiation: cairo-pattern.c:__cairo_list_del
cairo-recording-surface.c:__cairo_list_del
Line
Count
Source
237
633
{
238
633
    next->prev = prev;
239
633
    prev->next = next;
240
633
}
Unexecuted instantiation: cairo-scaled-font.c:__cairo_list_del
cairo-surface.c:__cairo_list_del
Line
Count
Source
237
6.58k
{
238
6.58k
    next->prev = prev;
239
6.58k
    prev->next = next;
240
6.58k
}
Unexecuted instantiation: cairo-pdf-surface.c:__cairo_list_del
cairo-pdf-interchange.c:__cairo_list_del
Line
Count
Source
237
29
{
238
29
    next->prev = prev;
239
29
    prev->next = next;
240
29
}
cairo-gstate.c:__cairo_list_del
Line
Count
Source
237
168k
{
238
168k
    next->prev = prev;
239
168k
    prev->next = next;
240
168k
}
Unexecuted instantiation: cairo-image-source.c:__cairo_list_del
Unexecuted instantiation: cairo-mask-compositor.c:__cairo_list_del
Unexecuted instantiation: cairo-observer.c:__cairo_list_del
Unexecuted instantiation: cairo-path-fixed.c:__cairo_list_del
Unexecuted instantiation: cairo-spans-compositor.c:__cairo_list_del
Unexecuted instantiation: cairo-traps-compositor.c:__cairo_list_del
Unexecuted instantiation: cairo-tag-attributes.c:__cairo_list_del
cairo-tag-stack.c:__cairo_list_del
Line
Count
Source
237
58
{
238
58
    next->prev = prev;
239
58
    prev->next = next;
240
58
}
Unexecuted instantiation: cairo-ft-font.c:__cairo_list_del
241
242
static inline void
243
_cairo_list_del (cairo_list_t *entry)
244
162k
{
245
162k
    __cairo_list_del (entry->prev, entry->next);
246
162k
}
Unexecuted instantiation: cairo-pattern.c:_cairo_list_del
cairo-recording-surface.c:_cairo_list_del
Line
Count
Source
244
633
{
245
633
    __cairo_list_del (entry->prev, entry->next);
246
633
}
Unexecuted instantiation: cairo-scaled-font.c:_cairo_list_del
cairo-surface.c:_cairo_list_del
Line
Count
Source
244
6.58k
{
245
6.58k
    __cairo_list_del (entry->prev, entry->next);
246
6.58k
}
Unexecuted instantiation: cairo-pdf-surface.c:_cairo_list_del
cairo-pdf-interchange.c:_cairo_list_del
Line
Count
Source
244
29
{
245
29
    __cairo_list_del (entry->prev, entry->next);
246
29
}
cairo-gstate.c:_cairo_list_del
Line
Count
Source
244
155k
{
245
155k
    __cairo_list_del (entry->prev, entry->next);
246
155k
}
Unexecuted instantiation: cairo-image-source.c:_cairo_list_del
Unexecuted instantiation: cairo-mask-compositor.c:_cairo_list_del
Unexecuted instantiation: cairo-observer.c:_cairo_list_del
Unexecuted instantiation: cairo-path-fixed.c:_cairo_list_del
Unexecuted instantiation: cairo-spans-compositor.c:_cairo_list_del
Unexecuted instantiation: cairo-traps-compositor.c:_cairo_list_del
Unexecuted instantiation: cairo-tag-attributes.c:_cairo_list_del
cairo-tag-stack.c:_cairo_list_del
Line
Count
Source
244
58
{
245
58
    __cairo_list_del (entry->prev, entry->next);
246
58
}
Unexecuted instantiation: cairo-ft-font.c:_cairo_list_del
247
248
/*< private >
249
 * cairo_list_del:
250
 * @entry: entry to remove
251
 *
252
 * Remove @entry from the list it is in.
253
 **/
254
static inline void
255
cairo_list_del (cairo_list_t *entry)
256
162k
{
257
162k
    _cairo_list_del (entry);
258
162k
    cairo_list_init (entry);
259
162k
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_del
cairo-recording-surface.c:cairo_list_del
Line
Count
Source
256
633
{
257
633
    _cairo_list_del (entry);
258
633
    cairo_list_init (entry);
259
633
}
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_del
cairo-surface.c:cairo_list_del
Line
Count
Source
256
6.58k
{
257
6.58k
    _cairo_list_del (entry);
258
6.58k
    cairo_list_init (entry);
259
6.58k
}
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_del
cairo-pdf-interchange.c:cairo_list_del
Line
Count
Source
256
29
{
257
29
    _cairo_list_del (entry);
258
29
    cairo_list_init (entry);
259
29
}
cairo-gstate.c:cairo_list_del
Line
Count
Source
256
155k
{
257
155k
    _cairo_list_del (entry);
258
155k
    cairo_list_init (entry);
259
155k
}
Unexecuted instantiation: cairo-image-source.c:cairo_list_del
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_del
Unexecuted instantiation: cairo-observer.c:cairo_list_del
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_del
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_del
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_del
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_del
cairo-tag-stack.c:cairo_list_del
Line
Count
Source
256
58
{
257
58
    _cairo_list_del (entry);
258
58
    cairo_list_init (entry);
259
58
}
Unexecuted instantiation: cairo-ft-font.c:cairo_list_del
260
261
/*< private >
262
 * cairo_list_move:
263
 * @entry: entry to move
264
 * @head: linked list to move @entry to
265
 *
266
 * Remove @entry from the list it is in and insert it at the start of @head list.
267
 **/
268
static inline void
269
cairo_list_move (cairo_list_t *entry, cairo_list_t *head)
270
13.9k
{
271
13.9k
    cairo_list_validate (head);
272
13.9k
    __cairo_list_del (entry->prev, entry->next);
273
13.9k
    __cairo_list_add (entry, head, head->next);
274
13.9k
    cairo_list_validate (head);
275
13.9k
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_move
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_move
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_move
Unexecuted instantiation: cairo-surface.c:cairo_list_move
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_move
Unexecuted instantiation: cairo-pdf-interchange.c:cairo_list_move
cairo-gstate.c:cairo_list_move
Line
Count
Source
270
13.9k
{
271
13.9k
    cairo_list_validate (head);
272
13.9k
    __cairo_list_del (entry->prev, entry->next);
273
13.9k
    __cairo_list_add (entry, head, head->next);
274
13.9k
    cairo_list_validate (head);
275
13.9k
}
Unexecuted instantiation: cairo-image-source.c:cairo_list_move
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_move
Unexecuted instantiation: cairo-observer.c:cairo_list_move
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_move
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_move
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_move
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_move
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_move
Unexecuted instantiation: cairo-ft-font.c:cairo_list_move
276
277
/*< private >
278
 * cairo_list_move_tail:
279
 * @entry: entry tp move
280
 * @head: linked list to move @entry to
281
 *
282
 * Remove @entry from the list it is in and append it to the end of @head list.
283
 **/
284
static inline void
285
cairo_list_move_tail (cairo_list_t *entry, cairo_list_t *head)
286
0
{
287
0
    cairo_list_validate (head);
288
0
    __cairo_list_del (entry->prev, entry->next);
289
0
    __cairo_list_add (entry, head->prev, head);
290
0
    cairo_list_validate (head);
291
0
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_move_tail
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_move_tail
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_move_tail
Unexecuted instantiation: cairo-surface.c:cairo_list_move_tail
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_move_tail
Unexecuted instantiation: cairo-pdf-interchange.c:cairo_list_move_tail
Unexecuted instantiation: cairo-gstate.c:cairo_list_move_tail
Unexecuted instantiation: cairo-image-source.c:cairo_list_move_tail
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_move_tail
Unexecuted instantiation: cairo-observer.c:cairo_list_move_tail
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_move_tail
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_move_tail
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_move_tail
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_move_tail
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_move_tail
Unexecuted instantiation: cairo-ft-font.c:cairo_list_move_tail
292
293
/*< private >
294
 * cairo_list_move_list:
295
 * @old: List to move
296
 * @new: List to move to. Should be empty,
297
 *
298
 * Move @old list to @new list, fixing up the references.
299
 **/
300
static inline void
301
cairo_list_move_list (cairo_list_t *old, cairo_list_t *new)
302
0
{
303
0
    __cairo_list_add (new, old->prev, old->next);
304
0
    cairo_list_init (old);
305
0
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_move_list
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_move_list
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_move_list
Unexecuted instantiation: cairo-surface.c:cairo_list_move_list
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_move_list
Unexecuted instantiation: cairo-pdf-interchange.c:cairo_list_move_list
Unexecuted instantiation: cairo-gstate.c:cairo_list_move_list
Unexecuted instantiation: cairo-image-source.c:cairo_list_move_list
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_move_list
Unexecuted instantiation: cairo-observer.c:cairo_list_move_list
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_move_list
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_move_list
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_move_list
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_move_list
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_move_list
Unexecuted instantiation: cairo-ft-font.c:cairo_list_move_list
306
307
/*< private >
308
 * cairo_list_is_first:
309
 * @entry: entry to check
310
 * @head: linked list
311
 *
312
 * Return %TRUE if @entry is the first item in @head.
313
 **/
314
static inline cairo_bool_t
315
cairo_list_is_first (const cairo_list_t *entry,
316
               const cairo_list_t *head)
317
0
{
318
0
    cairo_list_validate (head);
319
0
    return entry->prev == head;
320
0
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_is_first
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_is_first
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_is_first
Unexecuted instantiation: cairo-surface.c:cairo_list_is_first
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_is_first
Unexecuted instantiation: cairo-pdf-interchange.c:cairo_list_is_first
Unexecuted instantiation: cairo-gstate.c:cairo_list_is_first
Unexecuted instantiation: cairo-image-source.c:cairo_list_is_first
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_is_first
Unexecuted instantiation: cairo-observer.c:cairo_list_is_first
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_is_first
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_is_first
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_is_first
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_is_first
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_is_first
Unexecuted instantiation: cairo-ft-font.c:cairo_list_is_first
321
322
/*< private >
323
 * cairo_list_is_last:
324
 * @entry: entry to check
325
 * @head: linked list
326
 *
327
 * Return %TRUE if @entry is the last item in @head.
328
 **/
329
static inline cairo_bool_t
330
cairo_list_is_last (const cairo_list_t *entry,
331
              const cairo_list_t *head)
332
0
{
333
0
    cairo_list_validate (head);
334
0
    return entry->next == head;
335
0
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_is_last
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_is_last
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_is_last
Unexecuted instantiation: cairo-surface.c:cairo_list_is_last
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_is_last
Unexecuted instantiation: cairo-pdf-interchange.c:cairo_list_is_last
Unexecuted instantiation: cairo-gstate.c:cairo_list_is_last
Unexecuted instantiation: cairo-image-source.c:cairo_list_is_last
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_is_last
Unexecuted instantiation: cairo-observer.c:cairo_list_is_last
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_is_last
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_is_last
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_is_last
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_is_last
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_is_last
Unexecuted instantiation: cairo-ft-font.c:cairo_list_is_last
336
337
/*< private >
338
 * cairo_list_is_empty:
339
 * @head: linked list
340
 *
341
 * Return %TRUE if @head is empty.
342
 **/
343
static inline cairo_bool_t
344
cairo_list_is_empty (const cairo_list_t *head)
345
266k
{
346
266k
    cairo_list_validate (head);
347
266k
    return head->next == head;
348
266k
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_is_empty
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_is_empty
cairo-scaled-font.c:cairo_list_is_empty
Line
Count
Source
345
2
{
346
2
    cairo_list_validate (head);
347
2
    return head->next == head;
348
2
}
cairo-surface.c:cairo_list_is_empty
Line
Count
Source
345
264k
{
346
264k
    cairo_list_validate (head);
347
264k
    return head->next == head;
348
264k
}
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_is_empty
cairo-pdf-interchange.c:cairo_list_is_empty
Line
Count
Source
345
27
{
346
27
    cairo_list_validate (head);
347
27
    return head->next == head;
348
27
}
Unexecuted instantiation: cairo-gstate.c:cairo_list_is_empty
Unexecuted instantiation: cairo-image-source.c:cairo_list_is_empty
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_is_empty
Unexecuted instantiation: cairo-observer.c:cairo_list_is_empty
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_is_empty
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_is_empty
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_is_empty
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_is_empty
cairo-tag-stack.c:cairo_list_is_empty
Line
Count
Source
345
1.38k
{
346
1.38k
    cairo_list_validate (head);
347
1.38k
    return head->next == head;
348
1.38k
}
Unexecuted instantiation: cairo-ft-font.c:cairo_list_is_empty
349
350
/*< private >
351
 * cairo_list_is_singular:
352
 * @head: linked list
353
 *
354
 * Return %TRUE if @head has only one entry.
355
 **/
356
static inline cairo_bool_t
357
cairo_list_is_singular (const cairo_list_t *head)
358
27
{
359
27
    cairo_list_validate (head);
360
27
    return head->next != head && head->next == head->prev;
361
27
}
Unexecuted instantiation: cairo-pattern.c:cairo_list_is_singular
Unexecuted instantiation: cairo-recording-surface.c:cairo_list_is_singular
Unexecuted instantiation: cairo-scaled-font.c:cairo_list_is_singular
Unexecuted instantiation: cairo-surface.c:cairo_list_is_singular
Unexecuted instantiation: cairo-pdf-surface.c:cairo_list_is_singular
cairo-pdf-interchange.c:cairo_list_is_singular
Line
Count
Source
358
27
{
359
27
    cairo_list_validate (head);
360
27
    return head->next != head && head->next == head->prev;
361
27
}
Unexecuted instantiation: cairo-gstate.c:cairo_list_is_singular
Unexecuted instantiation: cairo-image-source.c:cairo_list_is_singular
Unexecuted instantiation: cairo-mask-compositor.c:cairo_list_is_singular
Unexecuted instantiation: cairo-observer.c:cairo_list_is_singular
Unexecuted instantiation: cairo-path-fixed.c:cairo_list_is_singular
Unexecuted instantiation: cairo-spans-compositor.c:cairo_list_is_singular
Unexecuted instantiation: cairo-traps-compositor.c:cairo_list_is_singular
Unexecuted instantiation: cairo-tag-attributes.c:cairo_list_is_singular
Unexecuted instantiation: cairo-tag-stack.c:cairo_list_is_singular
Unexecuted instantiation: cairo-ft-font.c:cairo_list_is_singular
362
363
#endif /* CAIRO_LIST_INLINE_H */