File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Ch1_Tutorial_Introduction Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22
33#define MAXLINE 1000 //maximum input line size
44
5- int getline ( char line [], int maxline );
5+ int get_line ( char line [], int maxline );
66void copy ( char to [], char from [] );
77
88//print longest input line
@@ -14,7 +14,7 @@ int main()
1414 char line [MAXLINE ]; //current input line
1515 char longest [MAXLINE ]; //longest input line we know about
1616
17- while ((len = getline (line , MAXLINE )) > 0 ){ //get the line
17+ while ((len = get_line (line , MAXLINE )) > 0 ){ //get the line
1818 if (len > max ){ //if the length is longer than the previous
1919 max = len ; //longest, copy it to `longest` and save the length
2020 copy (longest ,line );
@@ -27,7 +27,7 @@ int main()
2727}
2828
2929// read a line in to s, return the length
30- int getline (char s [], int lim ){
30+ int get_line (char s [], int lim ){
3131 int c ,i ;
3232
3333 for (i = 0 ;
You can’t perform that action at this time.
0 commit comments