summaryrefslogtreecommitdiff
path: root/src/fmt.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-01-28 04:57:45 +0000
committerJim Meyering <jim@meyering.net>1995-01-28 04:57:45 +0000
commit42a6a387123663022e12edd0f971353145afe232 (patch)
tree937cde8c8b394a438d5192f6142d30361cca2729 /src/fmt.c
parent45f162ad7af429616555057de02839c0dadc6ee4 (diff)
downloadcoreutils-42a6a387123663022e12edd0f971353145afe232.tar.xz
(isopen, isclose, isperiod): Use strchr, not index.
(flush_paragraph): Use memmove instead of bcopy.
Diffstat (limited to 'src/fmt.c')
-rw-r--r--src/fmt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fmt.c b/src/fmt.c
index 91e75b6ab..aa7fe6832 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -98,9 +98,9 @@ typedef long COST;
/* Extra ctype(3)-style macros. */
-#define isopen(c) (index ("([`'\"", c) != NULL)
-#define isclose(c) (index (")]'\"", c) != NULL)
-#define isperiod(c) (index (".?!", c) != NULL)
+#define isopen(c) (strchr ("([`'\"", c) != NULL)
+#define isclose(c) (strchr (")]'\"", c) != NULL)
+#define isperiod(c) (strchr (".?!", c) != NULL)
/* Size of a tab stop, for expansion on input and re-introduction on
output. */
@@ -756,10 +756,10 @@ flush_paragraph ()
}
put_paragraph (split_point);
- /* Copy text of words down to start of parabuf -- we use bcopy because
+ /* Copy text of words down to start of parabuf -- we use memmove because
the source and target may overlap. */
- bcopy (split_point->text, parabuf, (size_t) (wptr - split_point->text));
+ memmove (parabuf, split_point->text, (size_t) (wptr - split_point->text));
shift = split_point->text - parabuf;
wptr -= shift;
@@ -768,10 +768,10 @@ flush_paragraph ()
for (w = split_point; w <= word_limit; w++)
w->text -= shift;
- /* Copy words from split_point down to word -- we use bcopy because
+ /* Copy words from split_point down to word -- we use memmove because
the source and target may overlap. */
- bcopy ((char *) split_point, (char *) word,
+ memmove ((char *) word, (char *) split_point,
(word_limit - split_point + 1) * sizeof (WORD));
word_limit -= split_point - word;
}