home *** CD-ROM | disk | FTP | other *** search
- /*
- * Minimal echo program that is VERY inefficient but doesn't use stdio
- */
-
- strlen(register char *s)
- {
- register rval = 0;
- while (s && *s++) rval++;
- return rval;
- }
-
- main(int argc, char **argv)
- {
- int gotarg = argc > 1;
- while (--argc) {
- char *arg = *++argv;
- int l = strlen(arg);
- write(1, arg, l);
- write(1, " ", 1);
- }
- if (gotarg) write(1, "\n", 1);
- }
-