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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
75059
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
1 /* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003,
79743
43c5da03890c Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78334
diff changeset
2 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
75059
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
3
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
4 This program is free software; you can redistribute it and/or modify
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
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
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
7 any later version.
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
8
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
9 This program is distributed in the hope that it will be useful,
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
12 GNU General Public License for more details.
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
13
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
14 You should have received a copy of the GNU General Public License
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
15 along with this program; see the file COPYING. If not, write to
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
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
Dave Love <fx@gnu.org>
parents:
diff changeset
19 /* This file implements the emacs_insque and emacs_remque functions,
75059
8003d205a12f Add license notice.
Richard M. Stallman <rms@gnu.org>
parents: 74548
diff changeset
20 clones of the insque and remque functions of BSD. They and all
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
21 their callers have been renamed to emacs_mumble to allow us to
Dave Love <fx@gnu.org>
parents:
diff changeset
22 include this file in the menu library on all systems. */
Dave Love <fx@gnu.org>
parents:
diff changeset
23
Dave Love <fx@gnu.org>
parents:
diff changeset
24
Dave Love <fx@gnu.org>
parents:
diff changeset
25 struct qelem {
Dave Love <fx@gnu.org>
parents:
diff changeset
26 struct qelem *q_forw;
Dave Love <fx@gnu.org>
parents:
diff changeset
27 struct qelem *q_back;
Dave Love <fx@gnu.org>
parents:
diff changeset
28 char q_data[1];
Dave Love <fx@gnu.org>
parents:
diff changeset
29 };
Dave Love <fx@gnu.org>
parents:
diff changeset
30
Dave Love <fx@gnu.org>
parents:
diff changeset
31 /* Insert ELEM into a doubly-linked list, after PREV. */
Dave Love <fx@gnu.org>
parents:
diff changeset
32
Dave Love <fx@gnu.org>
parents:
diff changeset
33 void
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 25858
diff changeset
34 emacs_insque (elem, prev)
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
35 struct qelem *elem, *prev;
Dave Love <fx@gnu.org>
parents:
diff changeset
36 {
Dave Love <fx@gnu.org>
parents:
diff changeset
37 struct qelem *next = prev->q_forw;
Dave Love <fx@gnu.org>
parents:
diff changeset
38 prev->q_forw = elem;
Dave Love <fx@gnu.org>
parents:
diff changeset
39 if (next)
Dave Love <fx@gnu.org>
parents:
diff changeset
40 next->q_back = elem;
Dave Love <fx@gnu.org>
parents:
diff changeset
41 elem->q_forw = next;
Dave Love <fx@gnu.org>
parents:
diff changeset
42 elem->q_back = prev;
Dave Love <fx@gnu.org>
parents:
diff changeset
43 }
Dave Love <fx@gnu.org>
parents:
diff changeset
44
Dave Love <fx@gnu.org>
parents:
diff changeset
45 /* Unlink ELEM from the doubly-linked list that it is in. */
Dave Love <fx@gnu.org>
parents:
diff changeset
46
Dave Love <fx@gnu.org>
parents:
diff changeset
47 emacs_remque (elem)
Dave Love <fx@gnu.org>
parents:
diff changeset
48 struct qelem *elem;
Dave Love <fx@gnu.org>
parents:
diff changeset
49 {
Dave Love <fx@gnu.org>
parents:
diff changeset
50 struct qelem *next = elem->q_forw;
Dave Love <fx@gnu.org>
parents:
diff changeset
51 struct qelem *prev = elem->q_back;
Dave Love <fx@gnu.org>
parents:
diff changeset
52 if (next)
Dave Love <fx@gnu.org>
parents:
diff changeset
53 next->q_back = prev;
Dave Love <fx@gnu.org>
parents:
diff changeset
54 if (prev)
Dave Love <fx@gnu.org>
parents:
diff changeset
55 prev->q_forw = next;
Dave Love <fx@gnu.org>
parents:
diff changeset
56 }
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
57
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
58 /* arch-tag: a8719d1a-5c3f-4bce-b36b-173106d36165
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
59 (do not change this comment) */