This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
- This program is free software; you can redistribute it and/or modify
+ This program 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 Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program 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.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* This package emulates glibc `line_wrap_stream' semantics for systems that
don't have that. */
int i;
p = buf + (r + 1 - fs->point_col);
- while (p >= buf && !isblank (*p))
+ while (p >= buf && !isblank ((unsigned char) *p))
--p;
nextline = p + 1; /* This will begin the next line. */
if (p >= buf)
do
--p;
- while (p >= buf && isblank (*p));
+ while (p >= buf && isblank ((unsigned char) *p));
nl = p + 1; /* The newline will replace the first blank. */
}
else
if (p < nl)
do
++p;
- while (p < nl && !isblank (*p));
+ while (p < nl && !isblank ((unsigned char) *p));
if (p == nl)
{
/* It already ends a line. No fussing required. */
/* Swallow separating blanks. */
do
++p;
- while (isblank (*p));
+ while (isblank ((unsigned char) *p));
/* The next line will start here. */
nextline = p;
}