projects
/
h316.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
*** empty log message ***
[h316.git]
/
pc-tools
/
ldc
/
charcount.c
1
#include <stdio.h>
2
3
main
()
4
{
5
unsigned char
buf
;
6
int
stat
[
256
];
7
int
c
;
8
for
(
c
=
0
;
c
<
256
;
c
++)
9
stat
[
c
] =
0
;
10
int
ret
;
11
do
{
12
ret
=
read
(
0
, &
buf
,
1
);
13
stat
[
buf
]++;
14
}
15
while
(
ret
);
16
for
(
c
=
0
;
c
<
256
;
c
++)
17
printf
(
"%03i:%04i
\n
"
,
c
,
stat
[
c
]);
18
19
}