]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gperf/src/keyword-list.icc
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gperf / src / keyword-list.icc
1 /* Inline Functions for keyword-list.{h,cc}.
2
3    Copyright (C) 2002-2003 Free Software Foundation, Inc.
4    Written by Bruno Haible <bruno@clisp.org>.
5
6    This file is part of GNU GPERF.
7
8    GNU GPERF is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2, or (at your option)
11    any later version.
12
13    GNU GPERF is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; see the file COPYING.
20    If not, write to the Free Software Foundation, Inc.,
21    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
22
23 /* -------------------------- Keyword_List class --------------------------- */
24
25 /* Access to first element of list.  */
26 INLINE Keyword *
27 Keyword_List::first () const
28 {
29   return _car;
30 }
31
32 /* Access to next element of list.  */
33 INLINE Keyword_List *&
34 Keyword_List::rest ()
35 {
36   return _cdr;
37 }
38
39 /* ------------------------- KeywordExt_List class ------------------------- */
40
41 /* Access to first element of list.  */
42 INLINE KeywordExt *
43 KeywordExt_List::first () const
44 {
45   return static_cast<KeywordExt*>(_car);
46 }
47
48 /* Access to next element of list.  */
49 INLINE KeywordExt_List *&
50 KeywordExt_List::rest ()
51 {
52   return *reinterpret_cast<KeywordExt_List**>(&_cdr);
53 }