#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <malloc.h>
Go to the source code of this file.
◆ TEE_BUFFER_SIZE
Definition at line 20 of file tee.c.
◆ ConErrPrintf()
Definition at line 36 of file tee.c.
37{
41
45
47}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
◆ ConErrPuts()
Definition at line 59 of file tee.c.
60{
62}
#define ConErrPrintf(szStr,...)
◆ ConOutPuts()
Definition at line 27 of file tee.c.
28{
30
33}
#define STD_OUTPUT_HANDLE
◆ error_sfile_not_found()
◆ main()
Definition at line 65 of file tee.c.
66{
67
69
70
71 HANDLE hConsoleIn,hConsoleOut;
72
73
74 DWORD dwRead,dwWritten;
75
76
78
79
80
83
84
85
89
90
92
94
95
97 return 1;
98
100 {
101 ConOutPuts (
_T(
"Copy standard input to both standard output and a file.\n"
102 "\n"
103 "TEE [/A] file...\n"
104 "\n"
105 " file One or more files that will receive output.\n"
106 " /A Append output to files.\n"));
107 return 0;
108 }
109
112
115
116
118 {
119
121
123 {
125 continue;
126 }
127
128
129 if (
p[
i][0] ==
_T(
'"'))
130 {
132 if (tmp != 0)
133 {
136 }
137 }
138
139
140
141
142
143
144
145
146
147
148 files[iFileCounter++]=
p[
i]+
add;
149 }
150
151
152 for(
i=0;
i<iFileCounter;
i++)
153 {
154
159
161 {
163
164 for(
i=0;
i<iFileCounter;
i++)
166
169
170 return 1;
171 }
172
173
174 if (bAppend)
175 {
177 {
179 if (
dw == 0xFFFFFFFF)
180 {
182
183 for(
i=0;
i<iFileCounter;
i++)
185
188
189 return 1;
190 }
191
193 }
194 }
195 }
196
197
198 do
199 {
201
202 if (dwRead>0 && bRet)
203 {
204 for(
i=0;
i<iFileCounter;
i++)
206
208 }
209 } while(dwRead>0 && bRet);
210
211 for(
i=0;
i<iFileCounter;
i++)
213
216
217 return 0;
218}
#define ConOutPuts(szStr)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
DWORD WINAPI GetFileType(HANDLE hFile)
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
REFIID LPVOID DWORD_PTR dw
__forceinline bool __cdecl add(big_integer &x, uint32_t const value)
VOID error_sfile_not_found(LPTSTR f)