X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=readline%2Fexamples%2Fmanexamp.c;h=9c6cf2c76c6133df1b7755f2066fafb5a9f841b4;hb=84041b4c47edb0461f3b82afb77ca2d81819ebfa;hp=3496efa00e7612bb24d31f66697cef176f4c15a5;hpb=f9267e152c9c4e2b150366c590674180e66d45df;p=deliverable%2Fbinutils-gdb.git diff --git a/readline/examples/manexamp.c b/readline/examples/manexamp.c index 3496efa00e..9c6cf2c76c 100644 --- a/readline/examples/manexamp.c +++ b/readline/examples/manexamp.c @@ -1,12 +1,31 @@ /* manexamp.c -- The examples which appear in the documentation are here. */ +/* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #include #include - /* **************************************************************** */ /* */ -* How to Emulate gets () */ +/* How to Emulate gets () */ /* */ /* **************************************************************** */ @@ -82,13 +101,12 @@ invert_case_line (count, key) for (; start != end; start += direction) { - if (uppercase_p (rl_line_buffer[start])) - rl_line_buffer[start] = to_lower (rl_line_buffer[start]); - else if (lowercase_p (rl_line_buffer[start])) - rl_line_buffer[start] = to_upper (rl_line_buffer[start]); + if (_rl_uppercase_p (rl_line_buffer[start])) + rl_line_buffer[start] = _rl_to_lower (rl_line_buffer[start]); + else if (_rl_lowercase_p (rl_line_buffer[start])) + rl_line_buffer[start] = _rl_to_upper (rl_line_buffer[start]); } /* Move point to on top of the last character changed. */ rl_point = end - direction; } -