summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/=line.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-02-05 21:33:32 +0000
committerMiles Bader <miles@gnu.org>1996-02-05 21:33:32 +0000
commit24498fd0322c8b5852758930e1977eed7d7f6833 (patch)
tree90971ab2f7957ab9704d55b66e58394305fe1d50 /libshouldbeinlibc/=line.c
parentc63085b227a3178d7943c5c4e53cd889bd081e1f (diff)
(line_write, line_fill): Add `const' where appropriate.
Diffstat (limited to 'libshouldbeinlibc/=line.c')
-rw-r--r--libshouldbeinlibc/=line.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libshouldbeinlibc/=line.c b/libshouldbeinlibc/=line.c
index 30fefcb5..1c8eab8e 100644
--- a/libshouldbeinlibc/=line.c
+++ b/libshouldbeinlibc/=line.c
@@ -1,6 +1,6 @@
/* Simple output formatting functions
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -66,11 +66,11 @@ line_free (struct line *line)
wrap-points. Newlines in STR are honoured by adding a newline and
indenting to LMARGIN; any following whitespace is kept. */
void
-line_fill (struct line *line, char *str, unsigned lmargin)
+line_fill (struct line *line, const char *str, unsigned lmargin)
{
while (*str)
{
- char *word_end = str;
+ const char *word_end = str;
while (*word_end == ' ')
word_end++;
@@ -83,7 +83,7 @@ line_fill (struct line *line, char *str, unsigned lmargin)
}
else if (*word_end)
{
- char *word_start = word_end;
+ const char *word_start = word_end;
while (*word_end && !isspace (*word_end))
word_end++;
if (line_left (line, word_end - str) >= 0)
@@ -126,9 +126,9 @@ _line_cleanup_printf (struct line *line, unsigned added)
/* Add STR, of length LEN, to LINE. */
void
-line_write (struct line *line, char *str, unsigned len)
+line_write (struct line *line, const char *str, unsigned len)
{
- char *end = memchr (str, '\n', len) ?: str + len;
+ const char *end = memchr (str, '\n', len) ?: str + len;
unsigned line_len = end - str;
char *p = line->point, *max = line->max;
if (line_len > max - p)