1 ;;; riece-inlines.el --- inline functions
2 ;; Copyright (C) 1998-2003 Daiki Ueno
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Keywords: IRC, riece
8 ;; This file is part of Riece.
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 (defsubst string-equal-ignore-case (s1 s2)
28 (string-equal (upcase s1) (upcase s2)))
30 (defsubst string-list-member-ignore-case (thing list)
33 (if (and (stringp (car list))
34 (string-equal-ignore-case (car list) thing))
36 (setq list (cdr list))))))
38 (defsubst string-list-delete-ignore-case (thing list)
39 (let ((pointer (string-list-member-ignore-case thing list)))
41 (delq (car pointer) list)
44 (defsubst string-list-delete (thing list)
45 (let ((pointer (member thing list)))
47 (delq (car pointer) list)
50 (defsubst string-list-modify-ignore-case (modifiers list)
52 (let ((pointer (string-list-member-ignore-case
53 (car (car modifiers)) list)))
55 (setcar pointer (cdr (car modifiers))))
56 (setq modifiers (cdr modifiers)))))
58 (defsubst string-assoc-ignore-case (key list)
61 (if (and (car-safe (car list))
62 (string-equal-ignore-case key (car (car list))))
63 (throw 'found (car list))
64 (setq list (cdr list))))))
66 (provide 'riece-inlines)
68 ;;; riece-inlines.el ends here