projects
/
unix-history
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
BSD 3 development
[unix-history]
/
usr
/
src
/
cmd
/
learn
/
lcount.c
Commit
Line
Data
42d6e430
BJ
1
#include "stdio.h"
2
3
main() /* count lines in something */
4
{
5
register n, c;
6
7
n = 0;
8
while ((c = getchar()) != EOF)
9
if (c == '\n')
10
n++;
11
printf("%d\n", n);
12
}