#include <stdio.h>
#include <strings.h>
Go to the source code of this file.
◆ _setmode
Definition at line 21 of file cat.c.
◆ _stricmp
Definition at line 22 of file cat.c.
◆ ARRAYSIZE
Definition at line 25 of file cat.c.
◆ O_BINARY
Definition at line 20 of file cat.c.
◆ O_TEXT
Definition at line 19 of file cat.c.
◆ help()
Definition at line 27 of file cat.c.
28{
30 "\n"
31 "ReactOS File Concatenation Tool\n"
32 "\n"
33 "Usage: cat [options] [file [...]]\n"
34 "options - Currently ignored\n");
35}
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
Referenced by main().
◆ main()
Definition at line 37 of file cat.c.
38{
41 unsigned char buff[512];
42 size_t cnt, readcnt;
43
45 {
50 {
52 return 0;
53 }
54 }
55
56
58
59
61 {
62 unsigned int ch;
63
64
66
67#if 0
70 {
73 }
74#else
76 {
78 }
79#endif
80
81 return 0;
82 }
83
84
86 {
87
90 {
92 return -1;
93 }
94
95
96 cnt = 0; readcnt = 0;
97 while (readcnt == cnt)
98 {
99
102 if (readcnt != cnt)
103 {
104
105
106
107
108
110 {
113 return -1;
114 }
115 }
116
117
118 if (readcnt == 0) break;
119
120
122 }
123
124
126 }
127
128 return 0;
129}
#define _setmode(fd, mode)
static unsigned char buff[32768]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fgetc(_Inout_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl feof(_In_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)