remove whitespace from end of lines

svn path=/trunk/; revision=15112
This commit is contained in:
Steven Edwards 2005-05-08 04:22:15 +00:00
parent 27479fb866
commit f60871a43b
62 changed files with 274 additions and 274 deletions

View file

@ -6,7 +6,7 @@ int main(int argc, char* argv[])
int i; int i;
FILE* in; FILE* in;
char ch; char ch;
for (i=1; i<argc; i++) for (i=1; i<argc; i++)
{ {
in = fopen(argv[i],"r"); in = fopen(argv[i],"r");
@ -15,7 +15,7 @@ int main(int argc, char* argv[])
printf("Failed to open file %s\n", argv[i]); printf("Failed to open file %s\n", argv[i]);
return(0); return(0);
} }
while ((ch = fgetc(in)) != EOF) while ((ch = fgetc(in)) != EOF)
{ {
putchar(ch); putchar(ch);

View file

@ -1,6 +1,6 @@
/* /*
* Load a device driver * Load a device driver
*/ */
#include <windows.h> #include <windows.h>
#include <ntos/zw.h> #include <ntos/zw.h>

View file

@ -1,6 +1,6 @@
/* /*
* Unload a device driver * Unload a device driver
*/ */
#include <windows.h> #include <windows.h>
#include <ntos/zw.h> #include <ntos/zw.h>

View file

@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Diagnostic Trace // Diagnostic Trace
// //
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>

View file

@ -161,10 +161,10 @@ userlist(int argc, char **argv)
fprintf(stderr, "Warning: Can't do local finger\n"); fprintf(stderr, "Warning: Can't do local finger\n");
} }
/* Start winsock */ /* Start winsock */
wVersionRequested = MAKEWORD( 1, 1 ); wVersionRequested = MAKEWORD( 1, 1 );
iErr = WSAStartup( wVersionRequested, &wsaData ); iErr = WSAStartup( wVersionRequested, &wsaData );
if ( iErr != 0 ) if ( iErr != 0 )
{ {
/* Tell the user that we couldn't find a usable */ /* Tell the user that we couldn't find a usable */
/* WinSock DLL. */ /* WinSock DLL. */

View file

@ -115,7 +115,7 @@ netfinger(char *name)
* Otherwise, all high bits are stripped; if it isn't printable and * Otherwise, all high bits are stripped; if it isn't printable and
* it isn't a space, we can simply set the 7th bit. Every ASCII * it isn't a space, we can simply set the 7th bit. Every ASCII
* character with bit 7 set is printable. * character with bit 7 set is printable.
*/ */
lastc = 0; lastc = 0;
while (recv(s, &c, 1, 0) == 1) { while (recv(s, &c, 1, 0) == 1) {
c &= 0x7f; c &= 0x7f;

View file

@ -142,7 +142,7 @@ int fputcSocket(int s, char putChar)
buffer[1] = '\0'; buffer[1] = '\0';
if(SOCKET_ERROR==send(s, buffer, 1, 0)) { if(SOCKET_ERROR==send(s, buffer, 1, 0)) {
int iret=WSAGetLastError (); int iret=WSAGetLastError ();
fprintf(stdout,"fputcSocket: %d\n",iret); fprintf(stdout,"fputcSocket: %d\n",iret);
return 0; return 0;
} }
@ -154,9 +154,9 @@ int fputSocket(int s, char *buffer, int len)
{ {
int iret; int iret;
while(len) { while(len) {
if(SOCKET_ERROR==(iret=send(s, buffer, len, 0))) if(SOCKET_ERROR==(iret=send(s, buffer, len, 0)))
{ {
iret=WSAGetLastError (); iret=WSAGetLastError ();
fprintf(stdout,"fputcSocket: %d\n",iret); fprintf(stdout,"fputcSocket: %d\n",iret);
return 0; return 0;
} }
@ -187,7 +187,7 @@ char *fgetsSocket(int s, char *string)
if (count == 1) if (count == 1)
{ {
string[i] = buffer[0]; string[i] = buffer[0];
if (i == MAX_ASCII - 3) if (i == MAX_ASCII - 3)
{ {
count = 0; count = 0;

View file

@ -126,7 +126,7 @@ next:
case LOGIN: case LOGIN:
if (token()) if (token())
if (*aname == 0) { if (*aname == 0) {
*aname = malloc((unsigned) strlen(tokval) + 1); *aname = malloc((unsigned) strlen(tokval) + 1);
(void) strcpy(*aname, tokval); (void) strcpy(*aname, tokval);
} else { } else {
@ -237,7 +237,7 @@ static int token(void)
char *cp; char *cp;
int c; int c;
struct toktab *t; struct toktab *t;
if (feof(cfile)) if (feof(cfile))
return (0); return (0);
while ((c = getc(cfile)) != EOF && while ((c = getc(cfile)) != EOF &&

View file

@ -132,13 +132,13 @@ static void ShowNetworkInterfaces()
} }
/* /*
typedef struct _IP_ADAPTER_INDEX_MAP { typedef struct _IP_ADAPTER_INDEX_MAP {
ULONG Index; // adapter index ULONG Index; // adapter index
WCHAR Name[MAX_ADAPTER_NAME]; // name of the adapter WCHAR Name[MAX_ADAPTER_NAME]; // name of the adapter
} IP_ADAPTER_INDEX_MAP, * PIP_ADAPTER_INDEX_MAP; } IP_ADAPTER_INDEX_MAP, * PIP_ADAPTER_INDEX_MAP;
typedef struct _IP_INTERFACE_INFO { typedef struct _IP_INTERFACE_INFO {
LONG NumAdapters; // number of adapters in array LONG NumAdapters; // number of adapters in array
IP_ADAPTER_INDEX_MAP Adapter[1]; // adapter indices and names IP_ADAPTER_INDEX_MAP Adapter[1]; // adapter indices and names
} IP_INTERFACE_INFO,*PIP_INTERFACE_INFO; } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO;
*/ */
result = GetInterfaceInfo(pIfTable, &dwOutBufLen); result = GetInterfaceInfo(pIfTable, &dwOutBufLen);
@ -194,7 +194,7 @@ typedef struct _IP_ADAPTER_INFO {
IP_ADDR_STRING PrimaryWinsServer; IP_ADDR_STRING PrimaryWinsServer;
IP_ADDR_STRING SecondaryWinsServer; IP_ADDR_STRING SecondaryWinsServer;
a time_t LeaseObtained; a time_t LeaseObtained;
b time_t LeaseExpires; b time_t LeaseExpires;
} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
*/ */
/* /*

View file

@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Diagnostic Trace // Diagnostic Trace
// //
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>

View file

@ -52,7 +52,7 @@ static char TcpState[][32] = {
VOID PrintError(DWORD ErrorCode) VOID PrintError(DWORD ErrorCode)
{ {
LPVOID lpMsgBuf; LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, ErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), NULL, ErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&lpMsgBuf, 0, NULL); (LPTSTR)&lpMsgBuf, 0, NULL);
@ -66,21 +66,21 @@ static void ShowTcpStatistics()
GetTcpStatistics(&TcpStatsMIB); GetTcpStatistics(&TcpStatsMIB);
_tprintf(_T("TCP/IP Statistics\t\n")); _tprintf(_T("TCP/IP Statistics\t\n"));
_tprintf(_T(" time-out algorithm:\t\t%d\n"), TcpStatsMIB.dwRtoAlgorithm); _tprintf(_T(" time-out algorithm:\t\t%d\n"), TcpStatsMIB.dwRtoAlgorithm);
_tprintf(_T(" minimum time-out:\t\t%d\n"), TcpStatsMIB.dwRtoMin); _tprintf(_T(" minimum time-out:\t\t%d\n"), TcpStatsMIB.dwRtoMin);
_tprintf(_T(" maximum time-out:\t\t%d\n"), TcpStatsMIB.dwRtoMax); _tprintf(_T(" maximum time-out:\t\t%d\n"), TcpStatsMIB.dwRtoMax);
_tprintf(_T(" maximum connections:\t\t%d\n"), TcpStatsMIB.dwMaxConn); _tprintf(_T(" maximum connections:\t\t%d\n"), TcpStatsMIB.dwMaxConn);
_tprintf(_T(" active opens:\t\t\t%d\n"), TcpStatsMIB.dwActiveOpens); _tprintf(_T(" active opens:\t\t\t%d\n"), TcpStatsMIB.dwActiveOpens);
_tprintf(_T(" passive opens:\t\t\t%d\n"), TcpStatsMIB.dwPassiveOpens); _tprintf(_T(" passive opens:\t\t\t%d\n"), TcpStatsMIB.dwPassiveOpens);
_tprintf(_T(" failed attempts:\t\t%d\n"), TcpStatsMIB.dwAttemptFails); _tprintf(_T(" failed attempts:\t\t%d\n"), TcpStatsMIB.dwAttemptFails);
_tprintf(_T(" established connections reset:\t%d\n"), TcpStatsMIB.dwEstabResets); _tprintf(_T(" established connections reset:\t%d\n"), TcpStatsMIB.dwEstabResets);
_tprintf(_T(" established connections:\t%d\n"), TcpStatsMIB.dwCurrEstab); _tprintf(_T(" established connections:\t%d\n"), TcpStatsMIB.dwCurrEstab);
_tprintf(_T(" segments received:\t\t%d\n"), TcpStatsMIB.dwInSegs); _tprintf(_T(" segments received:\t\t%d\n"), TcpStatsMIB.dwInSegs);
_tprintf(_T(" segment sent:\t\t\t%d\n"), TcpStatsMIB.dwOutSegs); _tprintf(_T(" segment sent:\t\t\t%d\n"), TcpStatsMIB.dwOutSegs);
_tprintf(_T(" segments retransmitted:\t\t%d\n"), TcpStatsMIB.dwRetransSegs); _tprintf(_T(" segments retransmitted:\t\t%d\n"), TcpStatsMIB.dwRetransSegs);
_tprintf(_T(" incoming errors:\t\t%d\n"), TcpStatsMIB.dwInErrs); _tprintf(_T(" incoming errors:\t\t%d\n"), TcpStatsMIB.dwInErrs);
_tprintf(_T(" outgoing resets:\t\t%d\n"), TcpStatsMIB.dwOutRsts); _tprintf(_T(" outgoing resets:\t\t%d\n"), TcpStatsMIB.dwOutRsts);
_tprintf(_T(" cumulative connections:\t\t%d\n"), TcpStatsMIB.dwNumConns); _tprintf(_T(" cumulative connections:\t\t%d\n"), TcpStatsMIB.dwNumConns);
} }
static void ShowUdpStatistics() static void ShowUdpStatistics()
@ -90,7 +90,7 @@ static void ShowUdpStatistics()
_tprintf(_T("UDP Statistics\t\n")); _tprintf(_T("UDP Statistics\t\n"));
_tprintf(_T(" received datagrams:\t\t\t%d\n"), UDPStatsMIB.dwInDatagrams); _tprintf(_T(" received datagrams:\t\t\t%d\n"), UDPStatsMIB.dwInDatagrams);
_tprintf(_T(" datagrams for which no port exists:\t%d\n"), UDPStatsMIB.dwNoPorts); _tprintf(_T(" datagrams for which no port exists:\t%d\n"), UDPStatsMIB.dwNoPorts);
_tprintf(_T(" errors on received datagrams:\t\t%d\n"), UDPStatsMIB.dwInErrors); _tprintf(_T(" errors on received datagrams:\t\t%d\n"), UDPStatsMIB.dwInErrors);
_tprintf(_T(" sent datagrams:\t\t\t\t%d\n"), UDPStatsMIB.dwOutDatagrams); _tprintf(_T(" sent datagrams:\t\t\t\t%d\n"), UDPStatsMIB.dwOutDatagrams);
_tprintf(_T(" number of entries in listener table:\t%d\n"), UDPStatsMIB.dwNumAddrs); _tprintf(_T(" number of entries in listener table:\t%d\n"), UDPStatsMIB.dwNumAddrs);
@ -102,27 +102,27 @@ static void ShowIpStatistics()
GetIpStatistics(&IPStatsMIB); GetIpStatistics(&IPStatsMIB);
_tprintf(_T("IP Statistics\t\n")); _tprintf(_T("IP Statistics\t\n"));
_tprintf(_T(" IP forwarding enabled or disabled:\t%d\n"), IPStatsMIB.dwForwarding); _tprintf(_T(" IP forwarding enabled or disabled:\t%d\n"), IPStatsMIB.dwForwarding);
_tprintf(_T(" default time-to-live:\t\t\t%d\n"), IPStatsMIB.dwDefaultTTL); _tprintf(_T(" default time-to-live:\t\t\t%d\n"), IPStatsMIB.dwDefaultTTL);
_tprintf(_T(" datagrams received:\t\t\t%d\n"), IPStatsMIB.dwInReceives); _tprintf(_T(" datagrams received:\t\t\t%d\n"), IPStatsMIB.dwInReceives);
_tprintf(_T(" received header errors:\t\t\t%d\n"), IPStatsMIB.dwInHdrErrors); _tprintf(_T(" received header errors:\t\t\t%d\n"), IPStatsMIB.dwInHdrErrors);
_tprintf(_T(" received address errors:\t\t%d\n"), IPStatsMIB.dwInAddrErrors); _tprintf(_T(" received address errors:\t\t%d\n"), IPStatsMIB.dwInAddrErrors);
_tprintf(_T(" datagrams forwarded:\t\t\t%d\n"), IPStatsMIB.dwForwDatagrams); _tprintf(_T(" datagrams forwarded:\t\t\t%d\n"), IPStatsMIB.dwForwDatagrams);
_tprintf(_T(" datagrams with unknown protocol:\t%d\n"), IPStatsMIB.dwInUnknownProtos); _tprintf(_T(" datagrams with unknown protocol:\t%d\n"), IPStatsMIB.dwInUnknownProtos);
_tprintf(_T(" received datagrams discarded:\t\t%d\n"), IPStatsMIB.dwInDiscards); _tprintf(_T(" received datagrams discarded:\t\t%d\n"), IPStatsMIB.dwInDiscards);
_tprintf(_T(" received datagrams delivered:\t\t%d\n"), IPStatsMIB.dwInDelivers); _tprintf(_T(" received datagrams delivered:\t\t%d\n"), IPStatsMIB.dwInDelivers);
_tprintf(_T(" sent datagrams discarded:\t\t%d\n"), IPStatsMIB.dwOutDiscards); _tprintf(_T(" sent datagrams discarded:\t\t%d\n"), IPStatsMIB.dwOutDiscards);
_tprintf(_T(" datagrams for which no route exists:\t%d\n"), IPStatsMIB.dwOutNoRoutes); _tprintf(_T(" datagrams for which no route exists:\t%d\n"), IPStatsMIB.dwOutNoRoutes);
_tprintf(_T(" datagrams for which frags didn't arrive:%d\n"), IPStatsMIB.dwReasmTimeout); _tprintf(_T(" datagrams for which frags didn't arrive:%d\n"), IPStatsMIB.dwReasmTimeout);
_tprintf(_T(" datagrams requiring reassembly:\t\t%d\n"), IPStatsMIB.dwReasmReqds); _tprintf(_T(" datagrams requiring reassembly:\t\t%d\n"), IPStatsMIB.dwReasmReqds);
_tprintf(_T(" successful reassemblies:\t\t%d\n"), IPStatsMIB.dwReasmOks); _tprintf(_T(" successful reassemblies:\t\t%d\n"), IPStatsMIB.dwReasmOks);
_tprintf(_T(" failed reassemblies:\t\t\t%d\n"), IPStatsMIB.dwReasmFails); _tprintf(_T(" failed reassemblies:\t\t\t%d\n"), IPStatsMIB.dwReasmFails);
_tprintf(_T(" successful fragmentations:\t\t%d\n"), IPStatsMIB.dwFragOks); _tprintf(_T(" successful fragmentations:\t\t%d\n"), IPStatsMIB.dwFragOks);
_tprintf(_T(" failed fragmentations:\t\t\t%d\n"), IPStatsMIB.dwFragFails); _tprintf(_T(" failed fragmentations:\t\t\t%d\n"), IPStatsMIB.dwFragFails);
_tprintf(_T(" datagrams fragmented:\t\t\t%d\n"), IPStatsMIB.dwFragCreates); _tprintf(_T(" datagrams fragmented:\t\t\t%d\n"), IPStatsMIB.dwFragCreates);
_tprintf(_T(" number of interfaces on computer:\t%d\n"), IPStatsMIB.dwNumIf); _tprintf(_T(" number of interfaces on computer:\t%d\n"), IPStatsMIB.dwNumIf);
_tprintf(_T(" number of IP address on computer:\t%d\n"), IPStatsMIB.dwNumAddr); _tprintf(_T(" number of IP address on computer:\t%d\n"), IPStatsMIB.dwNumAddr);
_tprintf(_T(" number of routes in routing table:\t%d\n"), IPStatsMIB.dwNumRoutes); _tprintf(_T(" number of routes in routing table:\t%d\n"), IPStatsMIB.dwNumRoutes);
} }
static void ShowNetworkParams() static void ShowNetworkParams()
@ -262,20 +262,20 @@ typedef struct {
// Translate port numbers into their text equivalent if there is one // Translate port numbers into their text equivalent if there is one
// //
PCHAR PCHAR
GetPortName(DWORD Flags, UINT port, PCHAR proto, PCHAR name, int namelen) GetPortName(DWORD Flags, UINT port, PCHAR proto, PCHAR name, int namelen)
{ {
struct servent *psrvent; struct servent *psrvent;
if (Flags & FLAG_SHOW_NUMBERS) { if (Flags & FLAG_SHOW_NUMBERS) {
sprintf(name, "%d", htons((WORD)port)); sprintf(name, "%d", htons((WORD)port));
return name; return name;
} }
// Try to translate to a name // Try to translate to a name
if (psrvent = getservbyport(port, proto)) { if (psrvent = getservbyport(port, proto)) {
strcpy(name, psrvent->s_name ); strcpy(name, psrvent->s_name );
} else { } else {
sprintf(name, "%d", htons((WORD)port)); sprintf(name, "%d", htons((WORD)port));
} }
return name; return name;
} }
@ -286,7 +286,7 @@ GetPortName(DWORD Flags, UINT port, PCHAR proto, PCHAR name, int namelen)
// Translate IP addresses into their name-resolved form if possible. // Translate IP addresses into their name-resolved form if possible.
// //
PCHAR PCHAR
GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen) GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen)
{ {
// struct hostent *phostent; // struct hostent *phostent;
UINT nipaddr; UINT nipaddr;
@ -294,7 +294,7 @@ GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen)
// Does the user want raw numbers? // Does the user want raw numbers?
nipaddr = htonl(ipaddr); nipaddr = htonl(ipaddr);
if (Flags & FLAG_SHOW_NUMBERS ) { if (Flags & FLAG_SHOW_NUMBERS ) {
sprintf(name, "%d.%d.%d.%d", sprintf(name, "%d.%d.%d.%d",
(nipaddr >> 24) & 0xFF, (nipaddr >> 24) & 0xFF,
(nipaddr >> 16) & 0xFF, (nipaddr >> 16) & 0xFF,
(nipaddr >> 8) & 0xFF, (nipaddr >> 8) & 0xFF,
@ -307,7 +307,7 @@ GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen)
// Try to translate to a name // Try to translate to a name
if (!ipaddr) { if (!ipaddr) {
if (!local) { if (!local) {
sprintf(name, "%d.%d.%d.%d", sprintf(name, "%d.%d.%d.%d",
(nipaddr >> 24) & 0xFF, (nipaddr >> 24) & 0xFF,
(nipaddr >> 16) & 0xFF, (nipaddr >> 16) & 0xFF,
(nipaddr >> 8) & 0xFF, (nipaddr >> 8) & 0xFF,
@ -339,7 +339,7 @@ GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen)
sprintf(name, "%d.%d.%d.%d", i1,i2,i3,i4); sprintf(name, "%d.%d.%d.%d", i1,i2,i3,i4);
#else #else
sprintf(name, "%d.%d.%d.%d", sprintf(name, "%d.%d.%d.%d",
((nipaddr >> 24) & 0x000000FF), ((nipaddr >> 24) & 0x000000FF),
((nipaddr >> 16) & 0x000000FF), ((nipaddr >> 16) & 0x000000FF),
((nipaddr >> 8) & 0x000000FF), ((nipaddr >> 8) & 0x000000FF),
@ -360,10 +360,10 @@ BOOLEAN usage(void)
// //
// GetOptions // GetOptions
// //
// Parses the command line arguments. // Parses the command line arguments.
// //
BOOLEAN BOOLEAN
GetOptions(int argc, char *argv[], PDWORD pFlags) GetOptions(int argc, char *argv[], PDWORD pFlags)
{ {
int i, j; int i, j;
@ -466,12 +466,12 @@ int main(int argc, char *argv[])
for (i = 0; i < tcpTable->dwNumEntries; i++) { for (i = 0; i < tcpTable->dwNumEntries; i++) {
if (flags & FLAG_SHOW_ALL_ENDPOINTS || if (flags & FLAG_SHOW_ALL_ENDPOINTS ||
tcpTable->table[i].dwState == MIB_TCP_STATE_ESTAB) { tcpTable->table[i].dwState == MIB_TCP_STATE_ESTAB) {
sprintf(localaddr, "%s:%s", sprintf(localaddr, "%s:%s",
GetIpHostName(flags, TRUE, tcpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN), GetIpHostName(flags, TRUE, tcpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN),
GetPortName(flags, tcpTable->table[i].dwLocalPort, "tcp", localport, PORTNAMELEN)); GetPortName(flags, tcpTable->table[i].dwLocalPort, "tcp", localport, PORTNAMELEN));
sprintf(remoteaddr, "%s:%s", sprintf(remoteaddr, "%s:%s",
GetIpHostName(flags, FALSE, tcpTable->table[i].dwRemoteAddr, remotename, HOSTNAMELEN), GetIpHostName(flags, FALSE, tcpTable->table[i].dwRemoteAddr, remotename, HOSTNAMELEN),
tcpTable->table[i].dwRemoteAddr ? tcpTable->table[i].dwRemoteAddr ?
GetPortName(flags, tcpTable->table[i].dwRemotePort, "tcp", remoteport, PORTNAMELEN): GetPortName(flags, tcpTable->table[i].dwRemotePort, "tcp", remoteport, PORTNAMELEN):
"0"); "0");
printf("%4s\tState: %s\n", "[TCP]", TcpState[tcpTable->table[i].dwState]); printf("%4s\tState: %s\n", "[TCP]", TcpState[tcpTable->table[i].dwState]);
@ -481,14 +481,14 @@ int main(int argc, char *argv[])
// Dump the UDP table // Dump the UDP table
if (flags & FLAG_SHOW_ALL_ENDPOINTS) { if (flags & FLAG_SHOW_ALL_ENDPOINTS) {
for (i = 0; i < udpTable->dwNumEntries; i++) { for (i = 0; i < udpTable->dwNumEntries; i++) {
sprintf(localaddr, "%s:%s", sprintf(localaddr, "%s:%s",
GetIpHostName(flags, TRUE, udpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN), GetIpHostName(flags, TRUE, udpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN),
GetPortName(flags, udpTable->table[i].dwLocalPort, "tcp", localport, PORTNAMELEN)); GetPortName(flags, udpTable->table[i].dwLocalPort, "tcp", localport, PORTNAMELEN));
printf("%4s", "[UDP]"); printf("%4s", "[UDP]");
printf(" Local: %s\n Remote: %s\n", localaddr, "*.*.*.*:*"); printf(" Local: %s\n Remote: %s\n", localaddr, "*.*.*.*:*");
} }
} }
} }
printf("\n"); printf("\n");
return 0; return 0;
} }

View file

@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Diagnostic Trace // Diagnostic Trace
// //
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>

View file

@ -306,10 +306,10 @@ BOOL Setup(VOID)
PHOSTENT phe; PHOSTENT phe;
wVersionRequested = MAKEWORD(2, 2); wVersionRequested = MAKEWORD(2, 2);
Status = WSAStartup(wVersionRequested, &WsaData); Status = WSAStartup(wVersionRequested, &WsaData);
if (Status != 0) { if (Status != 0) {
printf("Could not initialize winsock dll.\n"); printf("Could not initialize winsock dll.\n");
return FALSE; return FALSE;
} }
@ -327,9 +327,9 @@ BOOL Setup(VOID)
if (phe == NULL) { if (phe == NULL) {
printf("Unknown host %s.\n", TargetName); printf("Unknown host %s.\n", TargetName);
return FALSE; return FALSE;
} }
} }
if (phe != NULL) { if (phe != NULL) {
CopyMemory(&Target.sin_addr, phe->h_addr, phe->h_length); CopyMemory(&Target.sin_addr, phe->h_addr, phe->h_length);
} else { } else {
@ -341,7 +341,7 @@ BOOL Setup(VOID)
} else { } else {
Target.sin_family = AF_INET; Target.sin_family = AF_INET;
} }
TargetIP = inet_ntoa(Target.sin_addr); TargetIP = inet_ntoa(Target.sin_addr);
CurrentSeqNum = 0; CurrentSeqNum = 0;
SentCount = 0; SentCount = 0;
@ -391,7 +391,7 @@ VOID TimeToMsString(LPSTR String, LARGE_INTEGER Time)
LARGE_INTEGER LargeTime; LARGE_INTEGER LargeTime;
LargeTime.QuadPart = Time.QuadPart / TicksPerMs.QuadPart; LargeTime.QuadPart = Time.QuadPart / TicksPerMs.QuadPart;
_i64toa(LargeTime.QuadPart, Convstr, 10); _i64toa(LargeTime.QuadPart, Convstr, 10);
strcpy(String, Convstr); strcpy(String, Convstr);
strcat(String, "ms"); strcat(String, "ms");
@ -449,7 +449,7 @@ BOOL DecodeResponse(PCHAR buffer, UINT size, PSOCKADDR_IN from)
} }
printf("Reply from %s: bytes=%d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr), printf("Reply from %s: bytes=%d time%s%s TTL=%d\n", inet_ntoa(from->sin_addr),
size - IphLength - sizeof(ICMP_ECHO_PACKET), Sign, Time, IpHeader->TTL); size - IphLength - sizeof(ICMP_ECHO_PACKET), Sign, Time, IpHeader->TTL);
if (RelativeTime.QuadPart < MinRTT.QuadPart) { if (RelativeTime.QuadPart < MinRTT.QuadPart) {
MinRTT.QuadPart = RelativeTime.QuadPart; MinRTT.QuadPart = RelativeTime.QuadPart;
@ -586,7 +586,7 @@ int main(int argc, char* argv[])
printf("\nPinging %s [%s] with %d bytes of data:\n\n", printf("\nPinging %s [%s] with %d bytes of data:\n\n",
TargetName, TargetIP, DataSize); TargetName, TargetIP, DataSize);
Count = 0; Count = 0;
while ((NeverStop) || (Count < PingCount)) { while ((NeverStop) || (Count < PingCount)) {
Ping(); Ping();

View file

@ -25,7 +25,7 @@ public:
CListNode *GetPrev(); CListNode *GetPrev();
private: private:
PVOID Element; PVOID Element;
CListNode *Next; CListNode *Next;
CListNode *Prev; CListNode *Prev;
static HANDLE hHeap; static HANDLE hHeap;
static INT nRef; static INT nRef;
@ -37,7 +37,7 @@ public:
CList(); CList();
~CList(); ~CList();
CList& operator=(CList&); CList& operator=(CList&);
CIterator<Item> *CreateIterator() const; CIterator<Item> *CreateIterator() const;
LONG Count() const; LONG Count() const;
Item& Get(const LONG index) const; Item& Get(const LONG index) const;
@ -82,7 +82,7 @@ CList<Item>::CList()
// Default destructor // Default destructor
template <class Item> template <class Item>
CList<Item>::~CList() CList<Item>::~CList()
{ {
RemoveAll(); RemoveAll();
delete Trailer; delete Trailer;
delete Header; delete Header;
@ -157,7 +157,7 @@ VOID CList<Item>::RemoveAll()
tmp = node->GetNext(); tmp = node->GetNext();
delete node; delete node;
node = tmp; node = tmp;
} }
Header->SetNext(Trailer); Header->SetNext(Trailer);
Trailer->SetPrev(Header); Trailer->SetPrev(Header);
NodeCount = 0; NodeCount = 0;

View file

@ -20,7 +20,7 @@
#define IN_ADDR_OF(x) *((struct in_addr *)&(x)) #define IN_ADDR_OF(x) *((struct in_addr *)&(x))
int usage() { int usage() {
fprintf( stderr, fprintf( stderr,
"route usage:\n" "route usage:\n"
"route print\n" "route print\n"
" prints the route table\n" " prints the route table\n"
@ -35,7 +35,7 @@ int print_routes() {
PMIB_IPFORWARDTABLE IpForwardTable; PMIB_IPFORWARDTABLE IpForwardTable;
DWORD Error; DWORD Error;
ULONG Size = 0; ULONG Size = 0;
char Destination[IPBUF], Gateway[IPBUF], Netmask[IPBUF], char Destination[IPBUF], Gateway[IPBUF], Netmask[IPBUF],
Index[IPBUF], Metric[IPBUF]; Index[IPBUF], Metric[IPBUF];
int i; int i;
@ -46,7 +46,7 @@ int print_routes() {
} }
if( Error == ERROR_SUCCESS ) { if( Error == ERROR_SUCCESS ) {
printf( "%-16s%-16s%-16s%-10s%-10s\n", printf( "%-16s%-16s%-16s%-10s%-10s\n",
"Destination", "Destination",
"Netmask", "Netmask",
"Gateway", "Gateway",
@ -63,7 +63,7 @@ int print_routes() {
inet_ntoa( IN_ADDR_OF(IpForwardTable->table[i]. inet_ntoa( IN_ADDR_OF(IpForwardTable->table[i].
dwForwardNextHop) ) ); dwForwardNextHop) ) );
printf( "%-16s%-16s%-16s%-10d%-10d\n", printf( "%-16s%-16s%-16s%-10d%-10d\n",
Destination, Destination,
Netmask, Netmask,
Gateway, Gateway,
@ -80,7 +80,7 @@ int print_routes() {
} }
} }
int convert_add_cmd_line( PMIB_IPFORWARDROW RowToAdd, int convert_add_cmd_line( PMIB_IPFORWARDROW RowToAdd,
int argc, char **argv ) { int argc, char **argv ) {
int i; int i;
@ -106,7 +106,7 @@ int add_route( int argc, char **argv ) {
DWORD Error; DWORD Error;
if( argc < 2 || !convert_add_cmd_line( &RowToAdd, argc, argv ) ) { if( argc < 2 || !convert_add_cmd_line( &RowToAdd, argc, argv ) ) {
fprintf( stderr, fprintf( stderr,
"route add usage:\n" "route add usage:\n"
"route add <target> [mask <mask>] <gw> [metric <m>]\n" "route add <target> [mask <mask>] <gw> [metric <m>]\n"
" Adds a route to the IP route table.\n" " Adds a route to the IP route table.\n"
@ -116,10 +116,10 @@ int add_route( int argc, char **argv ) {
" <m> is the metric to use (lower is preferred)\n" ); " <m> is the metric to use (lower is preferred)\n" );
return 1; return 1;
} }
if( (Error = CreateIpForwardEntry( &RowToAdd )) == ERROR_SUCCESS ) if( (Error = CreateIpForwardEntry( &RowToAdd )) == ERROR_SUCCESS )
return 0; return 0;
fprintf( stderr, "Route addition failed\n" ); fprintf( stderr, "Route addition failed\n" );
return Error; return Error;
} }
@ -129,7 +129,7 @@ int del_route( int argc, char **argv ) {
DWORD Error; DWORD Error;
if( argc < 2 || !convert_add_cmd_line( &RowToDel, argc, argv ) ) { if( argc < 2 || !convert_add_cmd_line( &RowToDel, argc, argv ) ) {
fprintf( stderr, fprintf( stderr,
"route delete usage:\n" "route delete usage:\n"
"route delete <target> <gw>\n" "route delete <target> <gw>\n"
" Removes a route from the IP route table.\n" " Removes a route from the IP route table.\n"
@ -137,21 +137,21 @@ int del_route( int argc, char **argv ) {
" <gw> is the gateway to remove the route from.\n" ); " <gw> is the gateway to remove the route from.\n" );
return 1; return 1;
} }
if( (Error = DeleteIpForwardEntry( &RowToDel )) == ERROR_SUCCESS ) if( (Error = DeleteIpForwardEntry( &RowToDel )) == ERROR_SUCCESS )
return 0; return 0;
fprintf( stderr, "Route addition failed\n" ); fprintf( stderr, "Route addition failed\n" );
return Error; return Error;
} }
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
if( argc < 2 ) return usage(); if( argc < 2 ) return usage();
else if( !strcasecmp( argv[1], "print" ) ) else if( !strcasecmp( argv[1], "print" ) )
return print_routes(); return print_routes();
else if( !strcasecmp( argv[1], "add" ) ) else if( !strcasecmp( argv[1], "add" ) )
return add_route( argc-2, argv+2 ); return add_route( argc-2, argv+2 );
else if( !strcasecmp( argv[1], "delete" ) ) else if( !strcasecmp( argv[1], "delete" ) )
return del_route( argc-2, argv+2 ); return del_route( argc-2, argv+2 );
else return usage(); else return usage();
} }

View file

@ -97,7 +97,7 @@
#define MSG_WSANO_DATA 0x2AFC #define MSG_WSANO_DATA 0x2AFC
// Next default values for new objects // Next default values for new objects
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_RESOURCE_VALUE 101

View file

@ -49,7 +49,7 @@ private:
void SaveCurY(int iY); void SaveCurY(int iY);
void resetTabStops(); void resetTabStops();
int iSavedCurX; int iSavedCurX;
int iSavedCurY; int iSavedCurY;
unsigned char iSavedAttributes; unsigned char iSavedAttributes;
@ -77,7 +77,7 @@ public:
TANSIParser(TConsole &Console, KeyTranslator &RefKeyTrans, TANSIParser(TConsole &Console, KeyTranslator &RefKeyTrans,
TScroller &RefScroller, TNetwork &NetHandler, TCharmap &RefCharmap); TScroller &RefScroller, TNetwork &NetHandler, TCharmap &RefCharmap);
~TANSIParser(); ~TANSIParser();
char* ParseBuffer(char* pszBuffer, char* pszBufferEnd); char* ParseBuffer(char* pszBuffer, char* pszBufferEnd);
static int StripBuffer(char* pszBuffer, char* pszBufferEnd, int width); static int StripBuffer(char* pszBuffer, char* pszBufferEnd, int width);
}; };

View file

@ -93,5 +93,5 @@ private:
int currentKeyMap, mainKeyMap; // AVS int currentKeyMap, mainKeyMap; // AVS
}; };
#endif // __KEYTRANS_H #endif // __KEYTRANS_H

View file

@ -29,36 +29,36 @@ public:
growable(delta), growable(delta),
lowerbound(lower) lowerbound(lower)
{ vector<T>::reserve(upper-lower + 1);} { vector<T>::reserve(upper-lower + 1);}
~TArrayAsVector( ) ~TArrayAsVector( )
{ // This call is unnecessary? (Paul Brannan 5/7/98) { // This call is unnecessary? (Paul Brannan 5/7/98)
// vector<T>::~vector( ); // vector<T>::~vector( );
} }
int Add(const T& item) int Add(const T& item)
{ if(!growable && vector<T>::size( ) == vector<T>::capacity( )) { if(!growable && vector<T>::size( ) == vector<T>::capacity( ))
return 0; return 0;
else else
insert(vector<T>::end( ), item); insert(vector<T>::end( ), item);
return 1; } return 1; }
int AddAt(const T& item, size_type index) int AddAt(const T& item, size_type index)
{ if(!growable && { if(!growable &&
((vector<T>::size( ) == vector<T>::capacity( )) || ((vector<T>::size( ) == vector<T>::capacity( )) ||
(ZeroBase(index > vector<T>::capacity( )) ))) (ZeroBase(index > vector<T>::capacity( )) )))
return 0; return 0;
if(ZeroBase(index) > vector<T>::capacity( )) // out of bounds if(ZeroBase(index) > vector<T>::capacity( )) // out of bounds
{ insert(vector<T>::end( ), { insert(vector<T>::end( ),
ZeroBase(index) - vector<T>::size( ), T( )); ZeroBase(index) - vector<T>::size( ), T( ));
insert(vector<T>::end( ), item); } insert(vector<T>::end( ), item); }
else else
{ insert(vector<T>::begin( ) + ZeroBase(index), item); } { insert(vector<T>::begin( ) + ZeroBase(index), item); }
return 1; return 1;
} }
size_type ArraySize( ) size_type ArraySize( )
{ return vector<T>::capacity( ); } { return vector<T>::capacity( ); }
size_type BoundBase(size_type location) const size_type BoundBase(size_type location) const
{ if(location == UINT_MAX) { if(location == UINT_MAX)
return INT_MAX; return INT_MAX;
@ -66,44 +66,44 @@ public:
return location + lowerbound; } return location + lowerbound; }
void Detach(size_type index) void Detach(size_type index)
{ erase(vector<T>::begin( ) + ZeroBase(index)); } { erase(vector<T>::begin( ) + ZeroBase(index)); }
void Detach(const T& item) void Detach(const T& item)
{ Destroy(Find(item)); } { Destroy(Find(item)); }
void Destroy(size_type index) void Destroy(size_type index)
{ erase(vector<T>::begin( ) + ZeroBase(index)); } { erase(vector<T>::begin( ) + ZeroBase(index)); }
void Destroy(const T& item) void Destroy(const T& item)
{ Destroy(Find(item)); } { Destroy(Find(item)); }
size_type Find(const T& item) const size_type Find(const T& item) const
{ const_iterator location = find(vector<T>::begin( ), { const_iterator location = find(vector<T>::begin( ),
vector<T>::end( ), item); vector<T>::end( ), item);
if(location != vector<T>::end( )) if(location != vector<T>::end( ))
return BoundBase(size_type(location - return BoundBase(size_type(location -
vector<T>::begin( ))); vector<T>::begin( )));
else else
return INT_MAX; } return INT_MAX; }
size_type GetItemsInContainer( ) size_type GetItemsInContainer( )
{ return vector<T>::size( ); } { return vector<T>::size( ); }
void Grow(size_type index) void Grow(size_type index)
{ if( index < lowerbound ) { if( index < lowerbound )
Reallocate(ArraySize( ) + (index - Reallocate(ArraySize( ) + (index -
lowerbound)); lowerbound));
else if( index >= BoundBase(vector<T>::size( ))) else if( index >= BoundBase(vector<T>::size( )))
Reallocate(ZeroBase(index) ); } Reallocate(ZeroBase(index) ); }
int HasMember(const T& item) int HasMember(const T& item)
{ if(Find(item) != INT_MAX) { if(Find(item) != INT_MAX)
return 1; return 1;
else else
return 0; } return 0; }
int IsEmpty( ) int IsEmpty( )
{ return vector<T>::empty( ); } { return vector<T>::empty( ); }
int IsFull( ) int IsFull( )
{ if(growable) { if(growable)
return 0; return 0;
@ -111,42 +111,42 @@ public:
return 1; return 1;
else else
return 0; } return 0; }
size_type LowerBound( ) size_type LowerBound( )
{ return lowerbound; } { return lowerbound; }
T& operator[] (size_type index) T& operator[] (size_type index)
{ return vector<T>:: { return vector<T>::
operator[](ZeroBase(index)); } operator[](ZeroBase(index)); }
const T& operator[] (size_type index) const const T& operator[] (size_type index) const
{ return vector<T>:: { return vector<T>::
operator[](ZeroBase(index)); } operator[](ZeroBase(index)); }
void Flush( ) void Flush( )
{ {
vector<T>::clear(); vector<T>::clear();
} }
void Reallocate(size_type sz, void Reallocate(size_type sz,
size_type offset = 0) size_type offset = 0)
{ if(offset) { if(offset)
insert(vector<T>::begin( ), offset, T( )); insert(vector<T>::begin( ), offset, T( ));
vector<T>::reserve(sz); vector<T>::reserve(sz);
erase(vector<T>::end( ) - offset, vector<T>::end( )); } erase(vector<T>::end( ) - offset, vector<T>::end( )); }
void RemoveEntry(size_type index) void RemoveEntry(size_type index)
{ Detach(index); } { Detach(index); }
void SetData(size_type index, const T& item) void SetData(size_type index, const T& item)
{ (*this)[index] = item; } { (*this)[index] = item; }
size_type UpperBound( ) size_type UpperBound( )
{ return BoundBase(vector<T>::capacity( )) - 1; } { return BoundBase(vector<T>::capacity( )) - 1; }
size_type ZeroBase(size_type index) const size_type ZeroBase(size_type index) const
{ return index - lowerbound; } { return index - lowerbound; }
// The assignment operator is not inherited (Paul Brannan 5/25/98) // The assignment operator is not inherited (Paul Brannan 5/25/98)
TArrayAsVector& operator=(const TArrayAsVector& v) { TArrayAsVector& operator=(const TArrayAsVector& v) {
vector<T>::operator=(v); vector<T>::operator=(v);

View file

@ -25,9 +25,9 @@
* | . | | | * | . | | |
* | . | <-- OR --> | | * | . | <-- OR --> | |
* | . | | | * | . | | |
* CON_LEFT | . | CON_RIGHT | * CON_LEFT | . | CON_RIGHT |
* (=0) | . | (=CON_ | CON_LINES * (=0) | . | (=CON_ | CON_LINES
* |..............* | WIDTH) | * |..............* | WIDTH) |
* | (CON_CUR_X, | | | * | (CON_CUR_X, | | |
* | CON_CUR_Y) | | | * | CON_CUR_Y) | | |
* | | | | * | | | |
@ -77,15 +77,15 @@ public:
void SetCursorPosition(int x, int y); void SetCursorPosition(int x, int y);
void SetCursorSize(int pct); void SetCursorSize(int pct);
void MoveCursorPosition(int x, int y); void MoveCursorPosition(int x, int y);
// Screen mode/size routines // Screen mode/size routines
int GetWidth() {return CON_COLS;} int GetWidth() {return CON_COLS;}
int GetHeight() {return CON_LINES;} int GetHeight() {return CON_LINES;}
void SetExtendedMode(int iFunction, BOOL bEnable); void SetExtendedMode(int iFunction, BOOL bEnable);
void SetWindowSize(int width, int height); // Set the size of the window, void SetWindowSize(int width, int height); // Set the size of the window,
// but not the buffer // but not the buffer
// Color/attribute routines // Color/attribute routines
void SetAttrib(unsigned char wAttr) {wAttributes = wAttr;} void SetAttrib(unsigned char wAttr) {wAttributes = wAttr;}
unsigned char GetAttrib() {return wAttributes;} unsigned char GetAttrib() {return wAttributes;}
void Normal(); // Reset all attributes void Normal(); // Reset all attributes
@ -130,13 +130,13 @@ public:
void index(); void index();
void reverse_index(); void reverse_index();
void setLineWrap(bool bEnabled){ void setLineWrap(bool bEnabled){
if(!ini.get_lock_linewrap()) if(!ini.get_lock_linewrap())
ini.set_value("Wrap_Line", bEnabled ? "true" : "false"); ini.set_value("Wrap_Line", bEnabled ? "true" : "false");
} }
bool getLineWrap() {return ini.get_wrapline();} bool getLineWrap() {return ini.get_wrapline();}
// Insert/delete characters/lines // Insert/delete characters/lines
void InsertLine(int numlines); // Added by Titus von Boxberg 30/3/97 void InsertLine(int numlines); // Added by Titus von Boxberg 30/3/97
void InsertCharacter(int numchar); // " void InsertCharacter(int numchar); // "
void DeleteCharacter(int numchar); // " void DeleteCharacter(int numchar); // "
void InsertMode(int i) {insert_mode = i;} void InsertMode(int i) {insert_mode = i;}
@ -148,7 +148,7 @@ protected:
HANDLE hConsole; HANDLE hConsole;
CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo; CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo;
unsigned char wAttributes; unsigned char wAttributes;
unsigned char fg, bg; unsigned char fg, bg;
unsigned char defaultfg, defaultbg; unsigned char defaultfg, defaultbg;
@ -157,7 +157,7 @@ protected:
bool blink; bool blink;
bool underline; bool underline;
bool reverse; bool reverse;
int iScrollStart; int iScrollStart;
int iScrollEnd; int iScrollEnd;
int insert_mode; int insert_mode;

View file

@ -39,20 +39,20 @@ private:
KeyDefType uKeyDef; KeyDefType uKeyDef;
DWORD vk_code; DWORD vk_code;
DWORD dwState; DWORD dwState;
public: public:
TKeyDef(); TKeyDef();
TKeyDef(char *def, DWORD state, DWORD code); TKeyDef(char *def, DWORD state, DWORD code);
TKeyDef(optype op, DWORD state, DWORD code); TKeyDef(optype op, DWORD state, DWORD code);
TKeyDef(const TKeyDef &t); TKeyDef(const TKeyDef &t);
char *operator=(char *def); char *operator=(char *def);
DWORD operator=(DWORD code); DWORD operator=(DWORD code);
TKeyDef& operator=(const TKeyDef &t); TKeyDef& operator=(const TKeyDef &t);
const optype& operator=(optype op); const optype& operator=(optype op);
~TKeyDef(); ~TKeyDef();
#ifdef __BORLANDC__ #ifdef __BORLANDC__
int operator==(TKeyDef &t); int operator==(TKeyDef &t);
#else #else
@ -61,7 +61,7 @@ public:
friend bool operator==(const TKeyDef &t1, const TKeyDef &t2); friend bool operator==(const TKeyDef &t1, const TKeyDef &t2);
friend bool operator<(const TKeyDef &t1, const TKeyDef &t2); friend bool operator<(const TKeyDef &t1, const TKeyDef &t2);
#endif #endif
const char *GetszKey() { return uKeyDef.szKeyDef; } const char *GetszKey() { return uKeyDef.szKeyDef; }
const KeyDefType GetKeyDef() { return uKeyDef; } const KeyDefType GetKeyDef() { return uKeyDef; }
DWORD GetCodeKey() { return vk_code; } DWORD GetCodeKey() { return vk_code; }

View file

@ -26,7 +26,7 @@ public:
int Open(const char *szHost, const char *strPort = "23"); int Open(const char *szHost, const char *strPort = "23");
int Close(); // close current connection int Close(); // close current connection
int Resume(); // resume current session int Resume(); // resume current session
// changes to the keymap profile in the file // changes to the keymap profile in the file
int LoadKeyMap( const char * file, const char * name); int LoadKeyMap( const char * file, const char * name);
void DisplayKeyMap(); // display available keymaps void DisplayKeyMap(); // display available keymaps
@ -35,7 +35,7 @@ private:
SOCKET Connect(); SOCKET Connect();
void telSetConsoleTitle(const char * szHost); void telSetConsoleTitle(const char * szHost);
void DoInit(); void DoInit();
SOCKET Socket; SOCKET Socket;
char strPort[32]; // int iPort; char strPort[32]; // int iPort;
char szHost[127]; char szHost[127];

View file

@ -2,7 +2,7 @@
#define __TNMISC_H #define __TNMISC_H
// Process-related functions // Process-related functions
BOOL CreateHiddenConsoleProcess(LPCTSTR szChildName, PROCESS_INFORMATION* ppi, BOOL CreateHiddenConsoleProcess(LPCTSTR szChildName, PROCESS_INFORMATION* ppi,
LPHANDLE phInWrite, LPHANDLE phOutRead, LPHANDLE phInWrite, LPHANDLE phOutRead,
LPHANDLE phErrRead); LPHANDLE phErrRead);
BOOL SpawnProcess(char *cmd_line, PROCESS_INFORMATION *pi); BOOL SpawnProcess(char *cmd_line, PROCESS_INFORMATION *pi);

View file

@ -97,7 +97,7 @@
#define MSG_WSANO_DATA 0x2AFC #define MSG_WSANO_DATA 0x2AFC
// Next default values for new objects // Next default values for new objects
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_RESOURCE_VALUE 101

View file

@ -222,7 +222,7 @@ static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) 6/6/93";
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <winsock2.h> #include <winsock2.h>
@ -508,7 +508,7 @@ main(argc, argv)
status = WSAStartup(MAKEWORD(2, 2), &wsadata); status = WSAStartup(MAKEWORD(2, 2), &wsadata);
if (status != 0) { if (status != 0) {
printf("Could not initialize winsock dll.\n"); printf("Could not initialize winsock dll.\n");
return FALSE; return FALSE;
} }

View file

@ -92,10 +92,10 @@ int main(int argc, char **argv)
if (!argc) if (!argc)
usage(); usage();
/* Start winsock */ /* Start winsock */
wVersionRequested = MAKEWORD( 1, 1 ); wVersionRequested = MAKEWORD( 1, 1 );
err = WSAStartup( wVersionRequested, &wsaData ); err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 ) if ( err != 0 )
{ {
/* Tell the user that we couldn't find a usable */ /* Tell the user that we couldn't find a usable */
/* WinSock DLL. */ /* WinSock DLL. */

View file

@ -1,16 +1,16 @@
/* $Id$ /* $Id$
* *
* Convert NTSTATUS codes to Win32 error codes: run it * Convert NTSTATUS codes to Win32 error codes: run it
* on a NT box AND on a ROS box, then diff the results. * on a NT box AND on a ROS box, then diff the results.
* *
* This utility should help keeping correct how Ros * This utility should help keeping correct how Ros
* translates executive's errors codes into Win32 error * translates executive's errors codes into Win32 error
* codes. * codes.
* *
* Usage: nts2w32err [MaxStatusCode] > log.txt * Usage: nts2w32err [MaxStatusCode] > log.txt
* *
* 2004-01-10 Emanuele Aliberti * 2004-01-10 Emanuele Aliberti
* *
*/ */
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
#include <windows.h> #include <windows.h>

View file

@ -35,7 +35,7 @@ RawUszAsz (
) )
{ {
register PCHAR a = szA; register PCHAR a = szA;
while (*szU) {*szA++ = (CHAR) (0x00ff & * szU++);} while (*szU) {*szA++ = (CHAR) (0x00ff & * szU++);}
*szA = '\0'; *szA = '\0';
return a; return a;
@ -51,7 +51,7 @@ RawAszUsz (
) )
{ {
register PWCHAR w = szW; register PWCHAR w = szW;
while (*szA) {*szW++ = (WCHAR) *szA++;} while (*szA) {*szW++ = (WCHAR) *szA++;}
*szW = L'\0'; *szW = L'\0';
return w; return w;
@ -64,7 +64,7 @@ STDCALL
StatusToName (NTSTATUS Status) StatusToName (NTSTATUS Status)
{ {
static char RawValue [16]; static char RawValue [16];
switch (Status) switch (Status)
{ {
case STATUS_BUFFER_TOO_SMALL: case STATUS_BUFFER_TOO_SMALL:
@ -112,7 +112,7 @@ ExpandSymbolicLink (
Path.Buffer = PathBuffer; Path.Buffer = PathBuffer;
Path.Length = 0; Path.Length = 0;
Path.MaximumLength = sizeof PathBuffer; Path.MaximumLength = sizeof PathBuffer;
RtlCopyUnicodeString (& Path, DirectoryName); RtlCopyUnicodeString (& Path, DirectoryName);
if (L'\\' != Path.Buffer [(Path.Length / sizeof Path.Buffer[0]) - 1]) if (L'\\' != Path.Buffer [(Path.Length / sizeof Path.Buffer[0]) - 1])
{ {
@ -183,7 +183,7 @@ ListDirectory (
ULONG Context = 0; ULONG Context = 0;
ULONG ReturnLength = 0; ULONG ReturnLength = 0;
ULONG EntryCount = 0; ULONG EntryCount = 0;
/* For expanding symbolic links */ /* For expanding symbolic links */
WCHAR TargetName [2 * MAX_PATH]; WCHAR TargetName [2 * MAX_PATH];
UNICODE_STRING TargetObjectName = { UNICODE_STRING TargetObjectName = {
@ -222,7 +222,7 @@ ListDirectory (
return (FALSE); return (FALSE);
} }
printf ("\n Directory of %s\n\n", DirectoryNameA); printf ("\n Directory of %s\n\n", DirectoryNameA);
for(;;) for(;;)
{ {
/* /*
@ -355,7 +355,7 @@ int main(int argc, char* argv[])
return EXIT_FAILURE; return EXIT_FAILURE;
} }
RawAszUsz (argv[2], DirectoryNameW); RawAszUsz (argv[2], DirectoryNameW);
Recurse = TRUE; Recurse = TRUE;
break; break;
default: default:
fprintf ( fprintf (

View file

@ -59,7 +59,7 @@ main(int argc, char *argv[])
if (NULL == Buffer) if (NULL == Buffer)
{ {
perror("Can't allocate buffer"); perror("Can't allocate buffer");
fclose(File); fclose(File);
exit(1); exit(1);
} }
rewind(File); rewind(File);
@ -67,7 +67,7 @@ main(int argc, char *argv[])
{ {
perror("Error reading from original file"); perror("Error reading from original file");
free(Buffer); free(Buffer);
fclose(File); fclose(File);
exit(1); exit(1);
} }
fclose(File); fclose(File);
@ -97,7 +97,7 @@ main(int argc, char *argv[])
if (Size != fwrite(Buffer, 1, Size, File)) if (Size != fwrite(Buffer, 1, Size, File))
{ {
perror("Error writing to output file"); perror("Error writing to output file");
fclose(File); fclose(File);
remove(TempName); remove(TempName);
free(Buffer); free(Buffer);
exit(1); exit(1);

View file

@ -60,7 +60,7 @@ int main(int argc, char **argv)
if (!((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].VirtualAddress) if (!((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].VirtualAddress)
break; break;
#if 1 #if 1
printf("%-8.8s %08x %08x %08x ", printf("%-8.8s %08x %08x %08x ",
((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].Name, ((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].Name,
((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].VirtualAddress, ((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].VirtualAddress,
((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].SizeOfRawData, ((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].SizeOfRawData,

View file

@ -7,7 +7,7 @@ Module Name:
termínal.h termínal.h
Abstract: Abstract:
HEADER for terminal.c HEADER for terminal.c
Environment: Environment:
@ -21,7 +21,7 @@ Author:
Revision History: Revision History:
23-Jan-2001: created 23-Jan-2001: created
Copyright notice: Copyright notice:
This file may be distributed under the terms of the GNU Public License. This file may be distributed under the terms of the GNU Public License.

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2000-2001 Goran Devic Copyright (c) 2000-2001 Goran Devic
Modified (c) 2001 Klaus P. Gerlicher Modified (c) 2001 Klaus P. Gerlicher
Module Name: Module Name:
@ -16,15 +16,15 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Goran Devic Goran Devic
Revision History: Revision History:
17-Mar-2000: Original (Goran Devic) 17-Mar-2000: Original (Goran Devic)
26-Apr-2000: Major rewrite, added coprocessor instructions (Goran Devic) 26-Apr-2000: Major rewrite, added coprocessor instructions (Goran Devic)
04-Nov-2000: Modified for LinIce (Goran Devic) 04-Nov-2000: Modified for LinIce (Goran Devic)
05-Jan-2001: Modified for pICE (Klaus P. Gerlicher) 05-Jan-2001: Modified for pICE (Klaus P. Gerlicher)
@ -110,7 +110,7 @@ static UCHAR GetNextUCHAR(USHORT sel, UCHAR *offset, UCHAR *pCode)
pCode[0] = GetUCHAR((ULONG) offset + 0) & 0xFF; pCode[0] = GetUCHAR((ULONG) offset + 0) & 0xFF;
return( pCode[0] ); return( pCode[0] );
} }
static USHORT GetNextUSHORT(USHORT sel, UCHAR *offset, UCHAR *pCode) static USHORT GetNextUSHORT(USHORT sel, UCHAR *offset, UCHAR *pCode)
{ {
@ -118,7 +118,7 @@ static USHORT GetNextUSHORT(USHORT sel, UCHAR *offset, UCHAR *pCode)
pCode[1] = GetUCHAR((ULONG) offset + 1) & 0xFF; pCode[1] = GetUCHAR((ULONG) offset + 1) & 0xFF;
return( *(USHORT *) pCode ); return( *(USHORT *) pCode );
} }
static ULONG GetNextULONG(USHORT sel, UCHAR *offset, UCHAR *pCode) static ULONG GetNextULONG(USHORT sel, UCHAR *offset, UCHAR *pCode)
{ {
@ -128,7 +128,7 @@ static ULONG GetNextULONG(USHORT sel, UCHAR *offset, UCHAR *pCode)
pCode[3] = GetUCHAR((ULONG) offset + 3) & 0xFF; pCode[3] = GetUCHAR((ULONG) offset + 3) & 0xFF;
return( *(ULONG *) pCode ); return( *(ULONG *) pCode );
} }
#define NEXTUCHAR GetNextUCHAR( pDis->wSel, bpTarget, bpCode); bpCode += 1; bpTarget += 1; bInstrLen += 1 #define NEXTUCHAR GetNextUCHAR( pDis->wSel, bpTarget, bpCode); bpCode += 1; bpTarget += 1; bInstrLen += 1
@ -705,7 +705,7 @@ DisEnd:
BOOLEAN Disasm(PULONG pOffset,PUCHAR pchDst) BOOLEAN Disasm(PULONG pOffset,PUCHAR pchDst)
{ {
TDisassembler dis; TDisassembler dis;
dis.dwFlags = DIS_DATA32 | DIS_ADDRESS32; dis.dwFlags = DIS_DATA32 | DIS_ADDRESS32;
dis.bpTarget = (UCHAR*)*pOffset; dis.bpTarget = (UCHAR*)*pOffset;
dis.szDisasm = pchDst; dis.szDisasm = pchDst;

View file

@ -5,7 +5,7 @@
#define OP_BPTR 0x400 /* BYTE Pointer */ #define OP_BPTR 0x400 /* BYTE Pointer */
#define OP_WPTR 0x500 /* WORD Pointer */ #define OP_WPTR 0x500 /* WORD Pointer */
#define OP_DPTR 0x600 /* DWORD Pointer */ #define OP_DPTR 0x600 /* DWORD Pointer */
#define OP_UNK 0x900 #define OP_UNK 0x900
//#define INS_INVALID 0x00 /* Not a valid instruction */ //#define INS_INVALID 0x00 /* Not a valid instruction */
/* Branch Instruction types */ /* Branch Instruction types */
#define INS_BRANCH 0x01 /* Unconditional branch */ #define INS_BRANCH 0x01 /* Unconditional branch */
@ -94,7 +94,7 @@ enum argtype {
ARG_REG_IY_IND,ARG_REG_C_IND,ARG_REG_I,ARG_REG_R,ARG_IMM16_A,ARG_MODRM16,ARG_SIMM8, ARG_REG_IY_IND,ARG_REG_C_IND,ARG_REG_I,ARG_REG_R,ARG_IMM16_A,ARG_MODRM16,ARG_SIMM8,
ARG_IMM32,ARG_STRING,ARG_MODRM_BCD,ARG_PSTRING,ARG_DOSSTRING,ARG_CUNICODESTRING, ARG_IMM32,ARG_STRING,ARG_MODRM_BCD,ARG_PSTRING,ARG_DOSSTRING,ARG_CUNICODESTRING,
ARG_PUNICODESTRING,ARG_NONEBYTE,ARG_XREG,ARG_XMMMODRM}; ARG_PUNICODESTRING,ARG_NONEBYTE,ARG_XREG,ARG_XMMMODRM};
typedef struct x86_inst { typedef struct x86_inst {
int flags; int flags;
int destType, srcType, auxType; int destType, srcType, auxType;
@ -122,7 +122,7 @@ typedef struct x86_inst {
#define DISP8 0x1000 #define DISP8 0x1000
#define DISP32 0x2000 #define DISP32 0x2000
#define HAS_SIB 0x4000 #define HAS_SIB 0x4000
#define HAS_MODRM 0x8000 #define HAS_MODRM 0x8000
struct OPERAND { //arg1, arg2, arg3 struct OPERAND { //arg1, arg2, arg3
char * str; //temporary buffer for building arg text char * str; //temporary buffer for building arg text
@ -138,7 +138,7 @@ struct EA { //effective address [SIB/disp]
char sib[32]; char sib[32];
}; };
struct modRM_byte { struct modRM_byte {
unsigned int mod : 2; unsigned int mod : 2;
unsigned int reg : 3; unsigned int reg : 3;
unsigned int rm : 3; unsigned int rm : 3;

View file

@ -1,6 +1,6 @@
/*++ /*++
Copyright (c) 2000-2001 Goran Devic Copyright (c) 2000-2001 Goran Devic
Modified (c) 2001 Klaus P. Gerlicher Modified (c) 2001 Klaus P. Gerlicher
Module Name: Module Name:
@ -16,13 +16,13 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Goran Devic Goran Devic
Revision History: Revision History:
17-Mar-2000: Original (Goran Devic) 17-Mar-2000: Original (Goran Devic)
05-Jan-2001: Modified for pICE (Klaus P. Gerlicher) 05-Jan-2001: Modified for pICE (Klaus P. Gerlicher)
Copyright notice: Copyright notice:

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher
@ -28,7 +28,7 @@ Copyright notice:
This file may be distributed under the terms of the GNU Public License. This file may be distributed under the terms of the GNU Public License.
--*/ --*/
void DeinstallHooks(void); void DeinstallHooks(void);
//ULONG HookInt(ULONG dwInt,ULONG NewIntHandler); //ULONG HookInt(ULONG dwInt,ULONG NewIntHandler);
//void UnhookInt(ULONG dwInt); //void UnhookInt(ULONG dwInt);
void MaskIrqs(void); void MaskIrqs(void);

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher
@ -29,7 +29,7 @@ Copyright notice:
--*/ --*/
BOOLEAN InitPICE(void); BOOLEAN InitPICE(void);
void CleanUpPICE(void); void CleanUpPICE(void);
extern char szBootParams[1024]; extern char szBootParams[1024];

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher
@ -33,4 +33,4 @@ Copyright notice:
#define PICE_MINOR_VERSION (99) #define PICE_MINOR_VERSION (99)
// reset this on major or minor version change // reset this on major or minor version change
// increment this on every release build // increment this on every release build
#define PICE_BUILD (0007) #define PICE_BUILD (0007)

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher
@ -32,5 +32,5 @@ void SendString(LPSTR s);
void SetupSerial(ULONG port,ULONG baudrate); void SetupSerial(ULONG port,ULONG baudrate);
BOOLEAN ConsoleInitSerial(void); BOOLEAN ConsoleInitSerial(void);
void ConsoleShutdownSerial(void); void ConsoleShutdownSerial(void);

View file

@ -17,7 +17,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -2035,7 +2035,7 @@ PICE_SYMBOLFILE_HEADER* LoadSymbols(LPSTR filename)
if(pSymbols->magic == PICE_MAGIC) if(pSymbols->magic == PICE_MAGIC)
{ {
DPRINT((0,"magic = %X\n",pSymbols->magic)); DPRINT((0,"magic = %X\n",pSymbols->magic));
DPRINT((0,"name = %S\n",pSymbols->name));; DPRINT((0,"name = %S\n",pSymbols->name));
DPRINT((0,"ulOffsetToHeaders,ulSizeOfHeader = %X,%X\n",pSymbols->ulOffsetToHeaders,pSymbols->ulSizeOfHeader)); DPRINT((0,"ulOffsetToHeaders,ulSizeOfHeader = %X,%X\n",pSymbols->ulOffsetToHeaders,pSymbols->ulSizeOfHeader));
DPRINT((0,"ulOffsetToGlobals,ulSizeOfGlobals = %X,%X\n",pSymbols->ulOffsetToGlobals,pSymbols->ulSizeOfGlobals)); DPRINT((0,"ulOffsetToGlobals,ulSizeOfGlobals = %X,%X\n",pSymbols->ulOffsetToGlobals,pSymbols->ulSizeOfGlobals));
DPRINT((0,"ulOffsetToGlobalsStrings,ulSizeOfGlobalsStrings = %X,%X\n",pSymbols->ulOffsetToGlobalsStrings,pSymbols->ulSizeOfGlobalsStrings)); DPRINT((0,"ulOffsetToGlobalsStrings,ulSizeOfGlobalsStrings = %X,%X\n",pSymbols->ulOffsetToGlobalsStrings,pSymbols->ulSizeOfGlobalsStrings));

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -15,7 +15,7 @@ Environment:
LINUX 2.2.X LINUX 2.2.X
Kernel mode only Kernel mode only
Author: Author:
Klaus P. Gerlicher Klaus P. Gerlicher

View file

@ -36,7 +36,7 @@ static char* title2 = "w PID Hwnd WndStile TID WndName\n";
struct status { struct status {
DWORD state; DWORD state;
char desc[10]; char desc[10];
} thread_stat[8 + 1] = { } thread_stat[8 + 1] = {
{0, "Init "}, {0, "Init "},
{1, "Ready "}, {1, "Ready "},
{2, "Running "}, {2, "Running "},
@ -51,7 +51,7 @@ struct status {
struct waitres { struct waitres {
DWORD state; DWORD state;
char desc[11]; char desc[11];
} waitreason[28 + 1] = { } waitreason[28 + 1] = {
{0, "Executive "}, {0, "Executive "},
{1, "FreePage "}, {1, "FreePage "},
{2, "PageIn "}, {2, "PageIn "},
@ -90,9 +90,9 @@ EnumThreadProc(HWND hwnd, LPARAM lp)
LONG style; LONG style;
HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE); HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE);
char buf[256]; char buf[256];
GetWindowText(hwnd, (LPTSTR)lp, 30); GetWindowText(hwnd, (LPTSTR)lp, 30);
if(hwnd != 0) if(hwnd != 0)
{ {
style = GetWindowLong(hwnd, GWL_STYLE); style = GetWindowLong(hwnd, GWL_STYLE);
@ -116,7 +116,7 @@ int main()
NTSTATUS Status; NTSTATUS Status;
char buf[256]; char buf[256];
char buf1[256]; char buf1[256];
WriteFile(stdout, title, lstrlen(title), &r, NULL); WriteFile(stdout, title, lstrlen(title), &r, NULL);
WriteFile(stdout, title1, lstrlen(title1), &r, NULL); WriteFile(stdout, title1, lstrlen(title1), &r, NULL);
WriteFile(stdout, title2, lstrlen(title2), &r, NULL); WriteFile(stdout, title2, lstrlen(title2), &r, NULL);
@ -153,7 +153,7 @@ int main()
hour = (ptime.QuadPart / (10000000LL * 3600LL)); hour = (ptime.QuadPart / (10000000LL * 3600LL));
minute = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; minute = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
seconds = (ptime.QuadPart / 10000000LL) % 60LL; seconds = (ptime.QuadPart / 10000000LL) % 60LL;
ptime.QuadPart = CurrentProcess->UserTime.QuadPart; ptime.QuadPart = CurrentProcess->UserTime.QuadPart;
hour1 = (ptime.QuadPart / (10000000LL * 3600LL)); hour1 = (ptime.QuadPart / (10000000LL * 3600LL));
minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
@ -166,7 +166,7 @@ int main()
hour, minute, seconds, hour1, minute1, seconds1, hour, minute, seconds, hour1, minute1, seconds1,
astring.Buffer); astring.Buffer);
WriteFile(stdout, buf, lstrlen(buf), &r, NULL); WriteFile(stdout, buf, lstrlen(buf), &r, NULL);
RtlFreeAnsiString(&astring); RtlFreeAnsiString(&astring);
for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++) for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++)
@ -193,7 +193,7 @@ int main()
while (waitt->state != CurrentProcess->TH[ti].WaitReason && waitt->state >= 0) while (waitt->state != CurrentProcess->TH[ti].WaitReason && waitt->state >= 0)
waitt++; waitt++;
wsprintf (buf1, wsprintf (buf1,
"t% %8d %3d:%02d:%02d %3d:%02d:%02d %s %s\n", "t% %8d %3d:%02d:%02d %3d:%02d:%02d %s %s\n",
CurrentProcess->TH[ti].ClientId.UniqueThread, CurrentProcess->TH[ti].ClientId.UniqueThread,
thour, tmin, tsec, thour1, tmin1, tsec1, thour, tmin, tsec, thour1, tmin1, tsec1,
@ -206,6 +206,6 @@ int main()
} }
CurrentProcess = (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess + CurrentProcess = (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess +
CurrentProcess->NextEntryOffset); CurrentProcess->NextEntryOffset);
} }
return (0); return (0);
} }

View file

@ -22,13 +22,13 @@
* *
* All Rights Reserved * All Rights Reserved
* *
* Permission to use, copy, modify, and distribute this software and its * Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, * documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that * provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in * both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be * supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the * used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission. * software without specific, written prior permission.
* *
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@ -88,7 +88,7 @@ ClearWindow(PPERF_INFO PerfInfo)
UpdateWindow(PerfInfo->Wnd); UpdateWindow(PerfInfo->Wnd);
} }
static unsigned static unsigned
CalibrateTest(PTEST Test, PPERF_INFO PerfInfo) CalibrateTest(PTEST Test, PPERF_INFO PerfInfo)
{ {
#define GOAL 2500 /* Try to get up to 2.5 seconds */ #define GOAL 2500 /* Try to get up to 2.5 seconds */
@ -127,7 +127,7 @@ CalibrateTest(PTEST Test, PPERF_INFO PerfInfo)
if (DidReps != Reps) if (DidReps != Reps)
{ {
/* The test can't do the number of reps as we asked for. /* The test can't do the number of reps as we asked for.
Give up */ Give up */
return DidReps; return DidReps;
} }
@ -165,7 +165,7 @@ CalibrateTest(PTEST Test, PPERF_INFO PerfInfo)
return Reps; return Reps;
} }
static void static void
DisplayStatus(HWND Label, LPCWSTR Message, LPCWSTR Test, int Try) DisplayStatus(HWND Label, LPCWSTR Message, LPCWSTR Test, int Try)
{ {
WCHAR Status[128]; WCHAR Status[128];
@ -176,7 +176,7 @@ DisplayStatus(HWND Label, LPCWSTR Message, LPCWSTR Test, int Try)
UpdateWindow(Label); UpdateWindow(Label);
} }
static double static double
RoundTo3Digits(double d) RoundTo3Digits(double d)
{ {
/* It's kind of silly to print out things like ``193658.4/sec'' so just /* It's kind of silly to print out things like ``193658.4/sec'' so just
@ -222,7 +222,7 @@ RoundTo3Digits(double d)
return d * sign; return d * sign;
} }
static void static void
ReportTimes(DWORD Time, int Reps, LPCWSTR Label, BOOL Average) ReportTimes(DWORD Time, int Reps, LPCWSTR Label, BOOL Average)
{ {
double MSecsPerObj, ObjsPerSec; double MSecsPerObj, ObjsPerSec;
@ -236,7 +236,7 @@ ReportTimes(DWORD Time, int Reps, LPCWSTR Label, BOOL Average)
allow averaging results from several repetitions. */ allow averaging results from several repetitions. */
ObjsPerSec = RoundTo3Digits(ObjsPerSec); ObjsPerSec = RoundTo3Digits(ObjsPerSec);
wprintf(L"%7d %s @ %8.4f msec (%8.1f/sec): %s\n", wprintf(L"%7d %s @ %8.4f msec (%8.1f/sec): %s\n",
Reps, Average ? L"trep" : L"reps", MSecsPerObj, ObjsPerSec, Label); Reps, Average ? L"trep" : L"reps", MSecsPerObj, ObjsPerSec, Label);
} }
else else
@ -281,7 +281,7 @@ ProcessTest(PTEST Test, PPERF_INFO PerfInfo)
ReportTimes(Time, Reps, Test->Label, FALSE); ReportTimes(Time, Reps, Test->Label, FALSE);
(*Test->PassCleanup)(Context, PerfInfo); (*Test->PassCleanup)(Context, PerfInfo);
ProcessMessages(); ProcessMessages();
} }
(*Test->Cleanup)(Context, PerfInfo); (*Test->Cleanup)(Context, PerfInfo);
ReportTimes(TotalTime, Repeat * Reps, Test->Label, TRUE); ReportTimes(TotalTime, Repeat * Reps, Test->Label, TRUE);
ProcessMessages(); ProcessMessages();
@ -367,9 +367,9 @@ PrintOSVersion(void)
wprintf(L"Professional "); wprintf(L"Professional ");
} }
} }
/* Test for the server type. */ /* Test for the server type. */
else if (VER_NT_SERVER == VersionInfo.wProductType || else if (VER_NT_SERVER == VersionInfo.wProductType ||
VER_NT_DOMAIN_CONTROLLER == VersionInfo.wProductType) VER_NT_DOMAIN_CONTROLLER == VersionInfo.wProductType)
{ {
if (5 == VersionInfo.dwMajorVersion && 2 == VersionInfo.dwMinorVersion) if (5 == VersionInfo.dwMajorVersion && 2 == VersionInfo.dwMinorVersion)
@ -460,7 +460,7 @@ PrintOSVersion(void)
/* Display service pack (if any) and build number. */ /* Display service pack (if any) and build number. */
if (4 == VersionInfo.dwMajorVersion && if (4 == VersionInfo.dwMajorVersion &&
0 == lstrcmpiW(VersionInfo.szCSDVersion, L"Service Pack 6")) 0 == lstrcmpiW(VersionInfo.szCSDVersion, L"Service Pack 6"))
{ {
/* Test for SP6 versus SP6a. */ /* Test for SP6 versus SP6a. */
@ -500,7 +500,7 @@ PrintOSVersion(void)
{ {
wprintf(L"OSR2"); wprintf(L"OSR2");
} }
} }
else if (4 == VersionInfo.dwMajorVersion && 10 == VersionInfo.dwMinorVersion) else if (4 == VersionInfo.dwMajorVersion && 10 == VersionInfo.dwMinorVersion)
{ {
@ -514,7 +514,7 @@ PrintOSVersion(void)
else if (4 == VersionInfo.dwMajorVersion && 90 == VersionInfo.dwMinorVersion) else if (4 == VersionInfo.dwMajorVersion && 90 == VersionInfo.dwMinorVersion)
{ {
wprintf(L"Running on Microsoft Windows Millennium Edition"); wprintf(L"Running on Microsoft Windows Millennium Edition");
} }
wprintf(L"\n"); wprintf(L"\n");
break; break;
@ -575,7 +575,7 @@ MainWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
EndPaint (Wnd, &Ps); EndPaint (Wnd, &Ps);
Result = 0; Result = 0;
break; break;
default: default:
Result = DefWindowProcW(Wnd, Msg, wParam, lParam); Result = DefWindowProcW(Wnd, Msg, wParam, lParam);
break; break;
@ -623,7 +623,7 @@ LabelWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
EndPaint (Wnd, &Ps); EndPaint (Wnd, &Ps);
Result = 0; Result = 0;
break; break;
default: default:
Result = DefWindowProcW(Wnd, Msg, wParam, lParam); Result = DefWindowProcW(Wnd, Msg, wParam, lParam);
break; break;
@ -857,7 +857,7 @@ ProcessCommandLine(PPERF_INFO PerfInfo, unsigned *TestCount, PTEST *Tests)
return TRUE; return TRUE;
} }
int WINAPI int WINAPI
WinMain(HINSTANCE hInstance, WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, LPSTR lpszCmdLine,

View file

@ -92,7 +92,7 @@ int sc_command(SC_HANDLE hSCManager, SC_CMDS sc_cmd, char* argv[])
return sc_control(hSCManager, argv[0], SERVICE_CONTROL_CONTINUE); return sc_control(hSCManager, argv[0], SERVICE_CONTROL_CONTINUE);
case SC_CMD_STOP: case SC_CMD_STOP:
return sc_control(hSCManager, argv[0], SERVICE_CONTROL_STOP); return sc_control(hSCManager, argv[0], SERVICE_CONTROL_STOP);
// case SC_CMD_CONFIG: // case SC_CMD_CONFIG:
// case SC_CMD_DESCRIPTION: // case SC_CMD_DESCRIPTION:
// case SC_CMD_CONTROL: // case SC_CMD_CONTROL:

View file

@ -1,5 +1,5 @@
/* /*
* ReactOS test program - * ReactOS test program -
* *
* main.h * main.h
* *

View file

@ -7,7 +7,7 @@
#ifndef _MFC_VER #ifndef _MFC_VER
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
#else//_WIN32_WCE #else//_WIN32_WCE
#include <assert.h> #include <assert.h>
#endif//_WIN32_WCE #endif//_WIN32_WCE

View file

@ -249,7 +249,7 @@ PsaFreeCapture
IN PVOID Capture IN PVOID Capture
); );
/* The user must define these functions. They are called by PSAPI to allocate /* The user must define these functions. They are called by PSAPI to allocate
memory. This allows PSAPI to be called from any environment */ memory. This allows PSAPI to be called from any environment */
void *PsaiMalloc(SIZE_T size); void *PsaiMalloc(SIZE_T size);
void *PsaiRealloc(void *ptr, SIZE_T size); void *PsaiRealloc(void *ptr, SIZE_T size);

View file

@ -9,7 +9,7 @@
*/ */
#include <windows.h> #include <windows.h>
#include <tchar.h> #include <tchar.h>
#include <stdio.h> #include <stdio.h>
typedef struct _EXTENSION_INFO typedef struct _EXTENSION_INFO
{ {
@ -80,14 +80,14 @@ AddExtension(LPTSTR ExtName,
ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO)); ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO));
if (!ExtInfo) if (!ExtInfo)
return NULL; return NULL;
for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1); for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1);
ln = (DWORD)t - (DWORD)ExtName; ln = (DWORD)t - (DWORD)ExtName;
ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO)); ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO));
memcpy (ExtInfo->ExtName, ExtName, ln); memcpy (ExtInfo->ExtName, ExtName, ln);
_tcscpy (ExtInfo->Description, Description); _tcscpy (ExtInfo->Description, Description);
for(t = ExtInfo->ExtName; *t != _T('\0'); t += _tcslen(t) + 1) for(t = ExtInfo->ExtName; *t != _T('\0'); t += _tcslen(t) + 1)
{ {
if(ExtInfo->nExtensions++ != 0) if(ExtInfo->nExtensions++ != 0)
@ -95,7 +95,7 @@ AddExtension(LPTSTR ExtName,
_tcscat (ExtInfo->ExpandedExtName, _T("*.")); _tcscat (ExtInfo->ExpandedExtName, _T("*."));
_tcscat (ExtInfo->ExpandedExtName, t); _tcscat (ExtInfo->ExpandedExtName, t);
} }
if (ExtInfoList) if (ExtInfoList)
{ {
Info = ExtInfoList; Info = ExtInfoList;
@ -201,7 +201,7 @@ ReadLines(PFILE_INFO StatInfo)
static char FileBuffer[1024]; static char FileBuffer[1024];
char LastChar = '\0'; char LastChar = '\0';
char *Current; char *Current;
LineLen = 0; LineLen = 0;
while(ReadFile (FileHandle, FileBuffer, sizeof(FileBuffer), &ReadBytes, NULL) && ReadBytes >= sizeof(char)) while(ReadFile (FileHandle, FileBuffer, sizeof(FileBuffer), &ReadBytes, NULL) && ReadBytes >= sizeof(char))
{ {
@ -226,7 +226,7 @@ ReadLines(PFILE_INFO StatInfo)
LineLen++; LineLen++;
} }
} }
StatInfo->LineCount += (LineLen > 0); StatInfo->LineCount += (LineLen > 0);
StatInfo->EmptyLines += ((LastChar != '\0') && (LineLen == 0)); StatInfo->EmptyLines += ((LastChar != '\0') && (LineLen == 0));
} }
@ -245,16 +245,16 @@ PrintStatistics(VOID)
TotalLineCount = 0; TotalLineCount = 0;
TotalEmptyLines = 0; TotalEmptyLines = 0;
Info = ExtInfoList; Info = ExtInfoList;
for (Info = ExtInfoList; Info != NULL; Info = Info->Next) for (Info = ExtInfoList; Info != NULL; Info = Info->Next)
{ {
TotalFileCount += Info->FileCount; TotalFileCount += Info->FileCount;
TotalLineCount += Info->LineCount; TotalLineCount += Info->LineCount;
TotalEmptyLines += Info->EmptyLines; TotalEmptyLines += Info->EmptyLines;
} }
TotalAvgLF = (TotalFileCount ? TotalLineCount / TotalFileCount : 0); TotalAvgLF = (TotalFileCount ? TotalLineCount / TotalFileCount : 0);
for (Info = ExtInfoList; Info != NULL; Info = Info->Next) for (Info = ExtInfoList; Info != NULL; Info = Info->Next)
{ {
DWORD AvgLF; DWORD AvgLF;
@ -325,16 +325,16 @@ ProcessFiles(LPTSTR Path)
if (LoadFile (FileName)) if (LoadFile (FileName))
{ {
PFILE_INFO StatInfo; PFILE_INFO StatInfo;
StatInfo = AddFile (FindFile.cFileName, Info); StatInfo = AddFile (FindFile.cFileName, Info);
if (!StatInfo) if (!StatInfo)
{ {
_tprintf (_T("Not enough free memory.\n")); _tprintf (_T("Not enough free memory.\n"));
return FALSE; return FALSE;
} }
ReadLines (StatInfo); ReadLines (StatInfo);
Info->FileCount++; Info->FileCount++;
Info->LineCount += StatInfo->LineCount; Info->LineCount += StatInfo->LineCount;
Info->EmptyLines += StatInfo->EmptyLines; Info->EmptyLines += StatInfo->EmptyLines;
@ -434,7 +434,7 @@ IsOptionSet(TCHAR *Option)
{ {
if(!Options[i]) if(!Options[i])
continue; continue;
if(!_tcscmp(Options[i], Option)) if(!_tcscmp(Options[i], Option))
return TRUE; return TRUE;
} }
@ -465,7 +465,7 @@ main (int argc, char * argv [])
AddExtension (_T("c\0\0"), _T("Ansi C Source files")); AddExtension (_T("c\0\0"), _T("Ansi C Source files"));
AddExtension (_T("cpp\0cxx\0\0"), _T("C++ Source files")); AddExtension (_T("cpp\0cxx\0\0"), _T("C++ Source files"));
AddExtension (_T("h\0\0"), _T("Header files")); AddExtension (_T("h\0\0"), _T("Header files"));
for(a = 1; a < argc - 1; a++) for(a = 1; a < argc - 1; a++)
{ {
#if UNICODE #if UNICODE
@ -479,10 +479,10 @@ main (int argc, char * argv [])
Options[a - 1] = argv[a]; Options[a - 1] = argv[a];
#endif #endif
} }
SkipEmptyLines = IsOptionSet(_T("-e")); SkipEmptyLines = IsOptionSet(_T("-e"));
BeSilent = IsOptionSet(_T("-s")); BeSilent = IsOptionSet(_T("-s"));
#if UNICODE #if UNICODE
ZeroMemory(Path, sizeof(Path)); ZeroMemory(Path, sizeof(Path));
if(MultiByteToWideChar(CP_ACP, 0, argv[argc - 1], -1, Path, MAX_PATH) > 0) if(MultiByteToWideChar(CP_ACP, 0, argv[argc - 1], -1, Path, MAX_PATH) > 0)

View file

@ -30,7 +30,7 @@ uint64_ ticks_per_slice[] =
{ {
TICKS_YEAR, TICKS_YEAR,
TICKS_MONTH, TICKS_MONTH,
TICKS_WEEK, TICKS_WEEK,
TICKS_DAY, TICKS_DAY,
TICKS_HOUR, TICKS_HOUR,
TICKS_MINUTE, TICKS_MINUTE,
@ -103,7 +103,7 @@ void print_uptime
_T("and"), _T("and"),
(unsigned)tick_cur, (unsigned)tick_cur,
(tick_cur == 1 ? slice_names_singular : slice_names_plural)[curslice] (tick_cur == 1 ? slice_names_singular : slice_names_plural)[curslice]
); );
} }
} }
else if(tick_cur != 0) else if(tick_cur != 0)
@ -139,9 +139,9 @@ void print_uptime
int parse_print(const _TCHAR * str) int parse_print(const _TCHAR * str)
{ {
int64_ tickcount; int64_ tickcount;
tickcount = _ttoi64(str); tickcount = _ttoi64(str);
if(tickcount < 0) if(tickcount < 0)
tickcount = - tickcount; tickcount = - tickcount;
else if(tickcount == 0) else if(tickcount == 0)

View file

@ -138,7 +138,7 @@ guiStep (va_list ap)
{ {
const int pgID = IDC_ST0 + progressGroup * 2; const int pgID = IDC_ST0 + progressGroup * 2;
char *str = vstrmake (NULL, ap); char *str = vstrmake (NULL, ap);
progressCurr++; progressCurr++;
SetDlgItemText (dialog, pgID, str); SetDlgItemText (dialog, pgID, str);
SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS, SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS,
@ -462,7 +462,7 @@ report (enum report_type t, ...)
} }
} }
} }
va_start (ap, t); va_start (ap, t);
if (t < sizeof text_funcs / sizeof text_funcs[0] && if (t < sizeof text_funcs / sizeof text_funcs[0] &&
t < sizeof GUI_funcs / sizeof GUI_funcs[0] && t < sizeof GUI_funcs / sizeof GUI_funcs[0] &&

View file

@ -175,7 +175,7 @@ const char* get_test_source_file(const char* test, const char* subtest)
const char* get_file_rev(const char* file) const char* get_file_rev(const char* file)
{ {
const struct rev_info* rev; const struct rev_info* rev;
for(rev = rev_infos; rev->file; rev++) { for(rev = rev_infos; rev->file; rev++) {
if (strcmp(rev->file, file) == 0) return rev->rev; if (strcmp(rev->file, file) == 0) return rev->rev;
} }
@ -198,7 +198,7 @@ void extract_rev_infos ()
len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo)); len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo));
if (len == 0) break; /* end of revision info */ if (len == 0) break; /* end of revision info */
if (len >= sizeof(revinfo) - 1) if (len >= sizeof(revinfo) - 1)
report (R_FATAL, "Revision info too long."); report (R_FATAL, "Revision info too long.");
if(!(p = strrchr(revinfo, ':'))) if(!(p = strrchr(revinfo, ':')))
report (R_FATAL, "Revision info malformed (i=%d)", i); report (R_FATAL, "Revision info malformed (i=%d)", i);
@ -213,7 +213,7 @@ void* extract_rcdata (int id, int type, DWORD* size)
HRSRC rsrc; HRSRC rsrc;
HGLOBAL hdl; HGLOBAL hdl;
LPVOID addr; LPVOID addr;
if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) || if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) ||
!(*size = SizeofResource (0, rsrc)) || !(*size = SizeofResource (0, rsrc)) ||
!(hdl = LoadResource (0, rsrc)) || !(hdl = LoadResource (0, rsrc)) ||
@ -601,7 +601,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
} }
if (!submit) { if (!submit) {
if (reset_env && (putenv ("WINETEST_PLATFORM=windows") || if (reset_env && (putenv ("WINETEST_PLATFORM=windows") ||
putenv ("WINETEST_DEBUG=1") || putenv ("WINETEST_DEBUG=1") ||
putenv ("WINETEST_INTERACTIVE=0") || putenv ("WINETEST_INTERACTIVE=0") ||
putenv ("WINETEST_REPORT_SUCCESS=0"))) putenv ("WINETEST_REPORT_SUCCESS=0")))
report (R_FATAL, "Could not reset environment: %d", errno); report (R_FATAL, "Could not reset environment: %d", errno);