From 1f7068ac3281c0651c876d99612432a36c298f90 Mon Sep 17 00:00:00 2001 From: zlg Date: Wed, 9 Jan 2013 01:10:15 -0600 Subject: Solve Exercise 1-22: wordwrap * Removed unnecessary get_line() function in 1-17 * Corrected grammar in README, added an acknowledgement --- 1-17_over-80.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to '1-17_over-80.c') diff --git a/1-17_over-80.c b/1-17_over-80.c index dcf7058..53f00ce 100644 --- a/1-17_over-80.c +++ b/1-17_over-80.c @@ -2,21 +2,6 @@ #define MINLENGTH 80 -/* Read as much as possible of a string and return its length. */ -int get_line(char s[]) { - int c, i; - - for (i = 0; i < MINLENGTH - 1 && (c = getchar()) != EOF; ++i) { - s[i] = c; - } - if (c == '\n') { - s[i] = c; - ++i; - } - s[i] = '\0'; - return i; -} - int main() { // longline is used as a boolean that tells us if it's a line worth printing int longline = 0; -- cgit v1.2.3-54-g00ecf