Mercurial > emacs
annotate oldXMenu/insque.c @ 68530:52ef8d8ecd83
(which-func-mode): Shush compiler on Emacs 21 too.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Wed, 01 Feb 2006 23:37:26 +0000 |
parents | 3861ff8f4bf1 |
children | e8a3fb527b77 2d92f5c9d6ae |
rev | line source |
---|---|
65000
3861ff8f4bf1
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
52401
diff
changeset
|
1 /* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. */ |
3861ff8f4bf1
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
52401
diff
changeset
|
2 |
25858 | 3 /* This file implements the emacs_insque and emacs_remque functions, |
4 copies of the insque and remque functions of BSD. They and all | |
5 their callers have been renamed to emacs_mumble to allow us to | |
6 include this file in the menu library on all systems. */ | |
7 | |
8 | |
9 struct qelem { | |
10 struct qelem *q_forw; | |
11 struct qelem *q_back; | |
12 char q_data[1]; | |
13 }; | |
14 | |
15 /* Insert ELEM into a doubly-linked list, after PREV. */ | |
16 | |
17 void | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
18 emacs_insque (elem, prev) |
25858 | 19 struct qelem *elem, *prev; |
20 { | |
21 struct qelem *next = prev->q_forw; | |
22 prev->q_forw = elem; | |
23 if (next) | |
24 next->q_back = elem; | |
25 elem->q_forw = next; | |
26 elem->q_back = prev; | |
27 } | |
28 | |
29 /* Unlink ELEM from the doubly-linked list that it is in. */ | |
30 | |
31 emacs_remque (elem) | |
32 struct qelem *elem; | |
33 { | |
34 struct qelem *next = elem->q_forw; | |
35 struct qelem *prev = elem->q_back; | |
36 if (next) | |
37 next->q_back = prev; | |
38 if (prev) | |
39 prev->q_forw = next; | |
40 } | |
52401 | 41 |
42 /* arch-tag: a8719d1a-5c3f-4bce-b36b-173106d36165 | |
43 (do not change this comment) */ |