diff options
author | Jim Meyering <jim@meyering.net> | 1998-07-26 20:43:50 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-07-26 20:43:50 +0000 |
commit | b49807bfb21883e4789dd0f943137a2d3d019a01 (patch) | |
tree | ddac39a94d35ff56df3ed74c8deb2c6a7cbaaf9d /src | |
parent | d71367f33e4099e3b8ce7649f131f8df69722286 (diff) | |
download | coreutils-b49807bfb21883e4789dd0f943137a2d3d019a01.tar.xz |
Convert some char* dcls to `unsigned char*' and remove a cast --
to placate irix4's cc.
Diffstat (limited to 'src')
-rw-r--r-- | src/join.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/join.c b/src/join.c index 82c42206d..d85e725e4 100644 --- a/src/join.c +++ b/src/join.c @@ -61,15 +61,15 @@ struct outlist /* A field of a line. */ struct field { - const char *beg; /* First character in field. */ + const unsigned char *beg; /* First character in field. */ size_t len; /* The length of the field. */ }; /* A line read from an input file. Newlines are not stored. */ struct line { - char *beg; /* First character in line. */ - char *lim; /* Character after last character in line. */ + unsigned char *beg; /* First character in line. */ + unsigned char *lim; /* Character after last character in line. */ int nfields; /* Number of elements in `fields'. */ int nfields_allocated; /* Number of elements in `fields'. */ struct field *fields; @@ -171,7 +171,7 @@ separated by CHAR.\n\ } static void -ADD_FIELD (struct line *line, const char *field, size_t len) +ADD_FIELD (struct line *line, const unsigned char *field, size_t len) { if (line->nfields >= line->nfields_allocated) { @@ -191,7 +191,8 @@ static void xfields (struct line *line) { int i; - unsigned char *ptr, *lim; + unsigned char *ptr; + unsigned char *lim; ptr = line->beg; lim = line->lim; @@ -229,8 +230,7 @@ xfields (struct line *line) } } - if ((char *) ptr > line->beg - && ((tab && ISSPACE (ptr[-1])) || ptr[-1] == tab)) + if (ptr > line->beg && ((tab && ISSPACE (ptr[-1])) || ptr[-1] == tab)) { /* Add one more (empty) field because the last character of the line was a delimiter. */ @@ -246,7 +246,7 @@ get_line (FILE *fp, struct line *line) { static int linesize = 80; int c, i; - char *ptr; + unsigned char *ptr; if (feof (fp)) return 0; @@ -330,7 +330,9 @@ delseq (struct seq *seq) static int keycmp (struct line *line1, struct line *line2) { - const char *beg1, *beg2; /* Start of field to compare in each file. */ + /* Start of field to compare in each file. */ + const unsigned char *beg1, *beg2; + int len1, len2; /* Length of fields to compare. */ int diff; |