From 0b2586efed25c579d9430432da6d4d2deef54e45 Mon Sep 17 00:00:00 2001 From: kevind Date: Tue, 18 Jan 2000 09:54:20 +0000 Subject: [PATCH] * locate/frcode.c, locate/code.c, locate/bigram.c: change return from main to int. Replace getstr with getline, where possible. --- locate/bigram.c | 6 +++--- locate/code.c | 6 +++--- locate/frcode.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/locate/bigram.c b/locate/bigram.c index ed04a81..9d594a2 100644 --- a/locate/bigram.c +++ b/locate/bigram.c @@ -61,7 +61,7 @@ prefix_length (s1, s2) return s1 - start; } -void +int main (argc, argv) int argc; char **argv; @@ -73,7 +73,7 @@ main (argc, argv) program_name = argv[0]; - pathsize = oldpathsize = 1026; /* Increased as necessary by getstr. */ + pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ path = xmalloc (pathsize); oldpath = xmalloc (oldpathsize); @@ -81,7 +81,7 @@ main (argc, argv) prefix count to 0. */ strcpy (oldpath, " "); - while ((line_len = getstr (&path, &pathsize, stdin, '\n', 0)) > 0) + while ((line_len = getline (&path, &pathsize, stdin)) > 0) { register int count; /* The prefix length. */ register int j; /* Index into input line. */ diff --git a/locate/code.c b/locate/code.c index d79e72c..93e7959 100644 --- a/locate/code.c +++ b/locate/code.c @@ -102,7 +102,7 @@ prefix_length (s1, s2) return s1 - start; } -void +int main (argc, argv) int argc; char **argv; @@ -135,7 +135,7 @@ main (argc, argv) exit (1); } - pathsize = oldpathsize = 1026; /* Increased as necessary by getstr. */ + pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ path = xmalloc (pathsize); oldpath = xmalloc (oldpathsize); @@ -150,7 +150,7 @@ main (argc, argv) fwrite (bigrams, 1, 256, stdout); fclose (fp); - while ((line_len = getstr (&path, &pathsize, stdin, '\n', 0)) > 0) + while ((line_len = getline (&path, &pathsize, stdin)) > 0) { char *pp; diff --git a/locate/frcode.c b/locate/frcode.c index ac250c3..40339af 100644 --- a/locate/frcode.c +++ b/locate/frcode.c @@ -106,7 +106,7 @@ prefix_length (s1, s2) return s1 - start; } -void +int main (argc, argv) int argc; char **argv; @@ -119,7 +119,7 @@ main (argc, argv) program_name = argv[0]; - pathsize = oldpathsize = 1026; /* Increased as necessary by getstr. */ + pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ path = xmalloc (pathsize); oldpath = xmalloc (oldpathsize); @@ -132,7 +132,7 @@ main (argc, argv) /* FIXME temporary: change the \n to \0 when we figure out how to sort null-terminated strings. */ - while ((line_len = getstr (&path, &pathsize, stdin, '\n', 0)) > 0) + while ((line_len = getline (&path, &pathsize, stdin)) > 0) { path[line_len - 1] = '\0'; /* FIXME temporary: nuke the newline. */ -- 2.11.4.GIT