Imported from ../bash-1.14.7.tar.gz.
This commit is contained in:
commit
726f63884d
402 changed files with 150297 additions and 0 deletions
32
support/recho.c
Normal file
32
support/recho.c
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include <stdio.h>
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register int i;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
printf("argv[%d] = <", i);
|
||||
strprint(argv[i]);
|
||||
printf(">\n");
|
||||
}
|
||||
}
|
||||
|
||||
strprint(str)
|
||||
char *str;
|
||||
{
|
||||
register char *s;
|
||||
int c;
|
||||
|
||||
for (s = str; s && *s; s++) {
|
||||
if (*s < ' ') {
|
||||
putchar('^');
|
||||
putchar(*s+64);
|
||||
} else if (*s == 127) {
|
||||
putchar('^');
|
||||
putchar('?');
|
||||
} else
|
||||
putchar(*s);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue