projects
/
platform
/
upstream
/
bash.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
847fa2c206c379db9a57cb80ea10a9547e3deecd
[platform/upstream/bash.git]
/
support
/
recho.c
1
#include <stdio.h>
2
3
main(argc, argv)
4
int argc;
5
char **argv;
6
{
7
register int i;
8
9
for (i = 1; i < argc; i++) {
10
printf("argv[%d] = <", i);
11
strprint(argv[i]);
12
printf(">\n");
13
}
14
}
15
16
strprint(str)
17
char *str;
18
{
19
register char *s;
20
int c;
21
22
for (s = str; s && *s; s++) {
23
if (*s < ' ') {
24
putchar('^');
25
putchar(*s+64);
26
} else if (*s == 127) {
27
putchar('^');
28
putchar('?');
29
} else
30
putchar(*s);
31
}
32
return(0);
33
}