[ROSAPPS][HOST-TOOLS]:

- Take the best of the two CAT rosapps and turn them into a host-tool. Will be used later on in the build process.
- Few comment cleaning in bin2c tool.

svn path=/trunk/; revision=66942
This commit is contained in:
Hermès Bélusca-Maïto 2015-03-29 00:13:25 +00:00
parent 3e27daa186
commit c1324010e5
10 changed files with 132 additions and 110 deletions

View file

@ -12,6 +12,5 @@ add_subdirectory(kill)
#add_subdirectory(rosddt)
#add_subdirectory(screenshot)
#add_subdirectory(systeminfo)
#add_subdirectory(tcat)
add_subdirectory(tlist)
add_subdirectory(utils)

View file

@ -1,52 +0,0 @@
/*
* FILE : cat.c
* NATIVE NAME: tcat "tappak's cat" :)
* AUTHOR : Semyon Novikov (tappak)
* PROJECT : ReactOS Operating System
* DESCRIPTION: file concatenation tool
* DATE : 2004-01-21
* LICENSE : GPL
*/
#include <stdio.h>
#include <string.h>
#define F_O_ERR "can not open file"
void help(void)
{
puts("File concatenation tool");
puts("Usage: cat [file]");
}
int main(int argc, char *argv[])
{
FILE *srcf;
char *keys[]={"--help","/help"};
int i=0,ret=0;
switch(argc)
{
case 1:puts("Usage: cat [file]");break;
case 2:
if ((!strcmp(argv[1],keys[0]))||(!strcmp(argv[1],keys[1])))
help();
else
{
if((srcf=fopen(argv[1],"r"))!=NULL)
{
while(i!=EOF)
{ i=fgetc(srcf);
putchar(i);
}
fclose(srcf);
}
else
{
printf("%s %s %s\n",argv[0],F_O_ERR,argv[1]);
ret=-1;
}
}
break;
}
return ret;
}

View file

@ -1,6 +0,0 @@
<module name="tcat" type="win32cui" installbase="system32" installname="tcat.exe">
<library>ntdll</library>
<library>user32</library>
<file>cat.c</file>
</module>

View file

@ -1,5 +1,4 @@
#add_subdirectory(binpatch)
add_subdirectory(cat)
#add_subdirectory(driver)
#add_subdirectory(infinst)
#add_subdirectory(nts2w32err)

View file

@ -1,5 +0,0 @@
add_executable(cat cat.c)
set_module_type(cat win32cui)
add_importlibs(cat ntdll user32 msvcrt kernel32)
add_cd_file(TARGET cat DESTINATION reactos/bin FOR all)

View file

@ -1,26 +0,0 @@
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int i;
FILE* in;
char ch;
for (i=1; i<argc; i++)
{
in = fopen(argv[i],"r");
if (in == NULL)
{
printf("Failed to open file %s\n", argv[i]);
return(0);
}
while ((ch = fgetc(in)) != EOF)
{
putchar(ch);
}
fclose(in);
}
return 0;
}