initial commit

This commit is contained in:
Connor Lane Smith
2011-05-23 02:36:34 +01:00
commit 8e26716a5a
23 changed files with 632 additions and 0 deletions

23
echo.c Normal file
View File

@@ -0,0 +1,23 @@
/* See LICENSE file for copyright and license details. */
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
bool nflag = false;
int i;
if(argc > 1 && !strcmp(argv[1], "-n"))
nflag = true;
for(i = nflag ? 2 : 1; i < argc; i++) {
fputs(argv[i], stdout);
if(i+1 < argc)
fputc(' ', stdout);
}
if(!nflag)
fputc('\n', stdout);
return EXIT_SUCCESS;
}