Author: hbelusca
Date: Fri Jun 19 22:38:34 2015
New Revision: 68198
URL:
http://svn.reactos.org/svn/reactos?rev=68198&view=rev
Log:
[ROSAPPS]: Merge the two existing CATs into one and improve it (see r66942, r66989 and
r66990).
Added:
trunk/rosapps/applications/cmdutils/cat/
- copied from r68197, trunk/rosapps/applications/sysutils/utils/cat/
trunk/rosapps/applications/cmdutils/cat/cat.c (contents, props changed)
- copied, changed from r66988, trunk/reactos/tools/cat.c
Removed:
trunk/rosapps/applications/sysutils/tcat/
trunk/rosapps/applications/sysutils/utils/cat/
Modified:
trunk/rosapps/applications/cmdutils/CMakeLists.txt
trunk/rosapps/applications/cmdutils/cat/CMakeLists.txt
trunk/rosapps/applications/sysutils/CMakeLists.txt
trunk/rosapps/applications/sysutils/utils/CMakeLists.txt
Modified: trunk/rosapps/applications/cmdutils/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/CMak…
==============================================================================
--- trunk/rosapps/applications/cmdutils/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rosapps/applications/cmdutils/CMakeLists.txt [iso-8859-1] Fri Jun 19 22:38:34
2015
@@ -1,4 +1,5 @@
add_subdirectory(appwiz)
+add_subdirectory(cat)
add_subdirectory(tee)
add_subdirectory(touch)
add_subdirectory(uptime)
Modified: trunk/rosapps/applications/cmdutils/cat/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/cat/…
==============================================================================
--- trunk/rosapps/applications/cmdutils/cat/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rosapps/applications/cmdutils/cat/CMakeLists.txt [iso-8859-1] Fri Jun 19
22:38:34 2015
@@ -1,5 +1,5 @@
add_executable(cat cat.c)
set_module_type(cat win32cui)
-add_importlibs(cat ntdll user32 msvcrt kernel32)
+add_importlibs(cat msvcrt kernel32)
add_cd_file(TARGET cat DESTINATION reactos/bin FOR all)
Copied: trunk/rosapps/applications/cmdutils/cat/cat.c (from r66988,
trunk/reactos/tools/cat.c)
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/cat/…
==============================================================================
--- trunk/reactos/tools/cat.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/cmdutils/cat/cat.c [iso-8859-1] Fri Jun 19 22:38:34 2015
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS conCATenation tool
- * FILE: tools/cat.c
+ * FILE: cmdutils/cat/cat.c
* PURPOSE: Concatenates STDIN or an arbitrary number of files to STDOUT
* PROGRAMMERS: David Welch
* Semyon Novikov (tappak)
@@ -11,12 +11,15 @@
#include <stdio.h>
#ifdef _WIN32
-#include <fcntl.h>
+#include <string.h> // Required for _stricmp()
+#include <fcntl.h> // Required for _setmode flags
+#include <io.h> // Required for _setmode()
#else
+#include <strings.h> // Required for strcasecmp()
#define O_TEXT 0x4000
#define O_BINARY 0x8000
-#define setmode(fd, mode) // This function is useless in *nix world.
-#define stricmp strcasecmp
+#define _setmode(fd, mode) // This function is useless in *nix world
+#define _stricmp strcasecmp
#endif
#define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
@@ -40,10 +43,10 @@
if (argc >= 2)
{
- if (stricmp(argv[1], "-h" ) == 0 ||
- stricmp(argv[1], "--help") == 0 ||
- stricmp(argv[1], "/?" ) == 0 ||
- stricmp(argv[1], "/help" ) == 0)
+ if (_stricmp(argv[1], "-h" ) == 0 ||
+ _stricmp(argv[1], "--help") == 0 ||
+ _stricmp(argv[1], "/?" ) == 0 ||
+ _stricmp(argv[1], "/help" ) == 0)
{
help();
return 0;
@@ -51,7 +54,7 @@
}
/* Set STDOUT to binary */
- setmode(fileno(stdout), O_BINARY);
+ _setmode(_fileno(stdout), O_BINARY);
/* Special case where we run 'cat' without any argument: we use STDIN */
if (argc <= 1)
@@ -59,7 +62,7 @@
unsigned int ch;
/* Set STDIN to binary */
- setmode(fileno(stdin), O_BINARY);
+ _setmode(_fileno(stdin), O_BINARY);
#if 0 // Version using feof()
ch = fgetc(stdin);
Propchange: trunk/rosapps/applications/cmdutils/cat/cat.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/rosapps/applications/cmdutils/cat/cat.c
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Jun 19 22:38:34 2015
@@ -0,0 +1,22 @@
+/branches/GSoC_2011/GSoC_Network/tools/cat.c:51548
+/branches/GSoC_2011/GSoC_TcpIpDriver/tools/cat.c:51550
+/branches/GSoC_2011/TcpIpDriver/tools/cat.c:51551-53074,53076-53119
+/branches/GSoC_Network/tools/cat.c:51545-51546
+/branches/cmake-bringup/tools/cat.c:50484,50693,50719,51544-52564
+/branches/condrv_restructure/tools/cat.c:63104-65657
+/branches/header-work/tools/cat.c:45691-47721
+/branches/kd++/tools/cat.c:58883-58973
+/branches/kernel-fun/reactos/tools/cat.c:62291,62294,62301-62302,62304,62321-62322,62353,62531-62532,62853,64152,64173-64174,65253
+/branches/ntvdm/tools/cat.c:59241-63176
+/branches/reactos-yarotows/tools/cat.c:45219-46371,46373-48025,48027-49273
+/branches/reactx/reactos/tools/cat.c:49994-49995
+/branches/ros-amd64-bringup/reactos/tools/cat.c:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41483-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882
+/branches/ros-amd64-bringup/tools/cat.c:36852
+/branches/ros-branch-0_3_15-lt2013/tools/cat.c:59059
+/branches/ros-csrss/tools/cat.c:57561-58762
+/branches/shell-experiments/tools/cat.c:61927-65494
+/branches/shell32_new-bringup/tools/cat.c:51893-53652,53661,53700
+/branches/tcp-rewrite-branch/tools/cat.c:48720,48840-48841,49424-49426,49454
+/branches/usb-bringup/tools/cat.c:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
+/branches/usb-bringup-trunk/tools/cat.c:55019-55543,55548-55554,55556-55567
+/branches/wlan-bringup/tools/cat.c:54809-54998
Modified: trunk/rosapps/applications/sysutils/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/CMak…
==============================================================================
--- trunk/rosapps/applications/sysutils/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/CMakeLists.txt [iso-8859-1] Fri Jun 19 22:38:34
2015
@@ -11,6 +11,5 @@
add_subdirectory(rosddt)
add_subdirectory(screenshot)
add_subdirectory(systeminfo)
-add_subdirectory(tcat)
add_subdirectory(tlist)
add_subdirectory(utils)
Modified: trunk/rosapps/applications/sysutils/utils/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/util…
==============================================================================
--- trunk/rosapps/applications/sysutils/utils/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/utils/CMakeLists.txt [iso-8859-1] Fri Jun 19
22:38:34 2015
@@ -1,5 +1,4 @@
add_subdirectory(binpatch)
-add_subdirectory(cat)
add_subdirectory(driver)
add_subdirectory(infinst)
add_subdirectory(nts2w32err)