Mercurial > emacs
annotate oldXMenu/insque.c @ 93375:0d954ec4d752
(number): Move declaration where needed.
(diary-mail-entries, list-sexp-diary-entries): Doc fixes.
(diary-make-date): New function.
(diary-date, diary-block, diary-anniversary, diary-cyclic): Doc fix.
Use diary-make-date.
(diary-date-display-form, diary-insert-entry-1): New functions.
(insert-monthly-diary-entry, insert-yearly-diary-entry):
Use diary-insert-entry-1.
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry): Use diary-date-display-form.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 29 Mar 2008 02:44:24 +0000 |
parents | 43c5da03890c |
children | 606f2d163a64 3765d76f7fa8 |
rev | line source |
---|---|
75059 | 1 /* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, |
79743 | 2 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
75059 | 3 |
4 This program is free software; you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
78334
3fd27403d9b9
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
6 the Free Software Foundation; either version 3, or (at your option) |
75059 | 7 any later version. |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
15 along with this program; see the file COPYING. If not, write to | |
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
17 Boston, MA 02110-1301, USA. */ | |
65000
3861ff8f4bf1
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
52401
diff
changeset
|
18 |
25858 | 19 /* This file implements the emacs_insque and emacs_remque functions, |
75059 | 20 clones of the insque and remque functions of BSD. They and all |
25858 | 21 their callers have been renamed to emacs_mumble to allow us to |
22 include this file in the menu library on all systems. */ | |
23 | |
24 | |
25 struct qelem { | |
26 struct qelem *q_forw; | |
27 struct qelem *q_back; | |
28 char q_data[1]; | |
29 }; | |
30 | |
31 /* Insert ELEM into a doubly-linked list, after PREV. */ | |
32 | |
33 void | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25858
diff
changeset
|
34 emacs_insque (elem, prev) |
25858 | 35 struct qelem *elem, *prev; |
36 { | |
37 struct qelem *next = prev->q_forw; | |
38 prev->q_forw = elem; | |
39 if (next) | |
40 next->q_back = elem; | |
41 elem->q_forw = next; | |
42 elem->q_back = prev; | |
43 } | |
44 | |
45 /* Unlink ELEM from the doubly-linked list that it is in. */ | |
46 | |
47 emacs_remque (elem) | |
48 struct qelem *elem; | |
49 { | |
50 struct qelem *next = elem->q_forw; | |
51 struct qelem *prev = elem->q_back; | |
52 if (next) | |
53 next->q_back = prev; | |
54 if (prev) | |
55 prev->q_forw = next; | |
56 } | |
52401 | 57 |
58 /* arch-tag: a8719d1a-5c3f-4bce-b36b-173106d36165 | |
59 (do not change this comment) */ |