Add gperf 3.0.1.
[dragonfly.git] / contrib / gperf-3.0.1 / src / keyword-list.icc
blob5c17a1937db3cfea5f60442ad30c760ba7711f21
1 /* Inline Functions for keyword-list.{h,cc}.
3    Copyright (C) 2002-2003 Free Software Foundation, Inc.
4    Written by Bruno Haible <bruno@clisp.org>.
6    This file is part of GNU GPERF.
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.
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.
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    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
23 /* -------------------------- Keyword_List class --------------------------- */
25 /* Access to first element of list.  */
26 INLINE Keyword *
27 Keyword_List::first () const
29   return _car;
32 /* Access to next element of list.  */
33 INLINE Keyword_List *&
34 Keyword_List::rest ()
36   return _cdr;
39 /* ------------------------- KeywordExt_List class ------------------------- */
41 /* Access to first element of list.  */
42 INLINE KeywordExt *
43 KeywordExt_List::first () const
45   return static_cast<KeywordExt*>(_car);
48 /* Access to next element of list.  */
49 INLINE KeywordExt_List *&
50 KeywordExt_List::rest ()
52   return *reinterpret_cast<KeywordExt_List**>(&_cdr);