l4re-base-25.08.0

This commit is contained in:
2025-09-12 15:55:45 +02:00
commit d959eaab98
37938 changed files with 9382688 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
PKGDIR ?= ..
L4DIR ?= $(PKGDIR)/../../..
TARGET = cat
SRC_C = cat.c
include $(L4DIR)/mk/prog.mk

View File

@@ -0,0 +1,43 @@
/**
* \file
* \brief A cat.
*
* \date
* \author Adam Lackorzynski <adam@os.inf.tu-dresden.de>
*
*/
/*
* (c) 2009 Author(s)
* economic rights: Technische Universität Dresden (Germany)
*
* This file is part of TUD:OS and distributed under the terms of the
* GNU General Public License 2.
* Please see the COPYING-GPL-2 file for details.
*/
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
FILE *fp;
char buf[1024];
size_t r;
for (i = 1; i < argc; ++i)
{
fp = fopen(argv[i], "r");
if (!fp)
{
perror(argv[i]);
continue;
}
while ((r = fread(buf, 1, sizeof(buf), fp)))
fwrite(buf, 1, r, stdout);
fclose(fp);
}
return 0;
}