From f60871a43b15de5d569f7fb73192999b64ba38d3 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Sun, 8 May 2005 04:22:15 +0000 Subject: [PATCH] remove whitespace from end of lines svn path=/trunk/; revision=15112 --- reactos/apps/utils/cat/cat.c | 4 +- reactos/apps/utils/driver/load/load.c | 2 +- reactos/apps/utils/driver/unload/unload.c | 2 +- reactos/apps/utils/net/arp/trace.c | 2 +- reactos/apps/utils/net/finger/finger.c | 4 +- reactos/apps/utils/net/finger/net.c | 2 +- reactos/apps/utils/net/ftp/fake.c | 8 +- reactos/apps/utils/net/ftp/ruserpass.c | 4 +- reactos/apps/utils/net/ipconfig/ipconfig.c | 10 +- reactos/apps/utils/net/ipconfig/trace.c | 2 +- reactos/apps/utils/net/netstat/netstat.c | 108 +++++++++--------- reactos/apps/utils/net/netstat/trace.c | 2 +- reactos/apps/utils/net/ping/ping.c | 16 +-- .../apps/utils/net/roshttpd/include/list.h | 8 +- reactos/apps/utils/net/route/route.c | 32 +++--- .../apps/utils/net/telnet/resource/tnmsg.h | 2 +- reactos/apps/utils/net/telnet/src/ansiprsr.h | 4 +- reactos/apps/utils/net/telnet/src/keytrans.h | 2 +- reactos/apps/utils/net/telnet/src/stl_bids.h | 58 +++++----- reactos/apps/utils/net/telnet/src/tconsole.h | 18 +-- reactos/apps/utils/net/telnet/src/tkeydef.h | 10 +- reactos/apps/utils/net/telnet/src/tnclass.h | 4 +- reactos/apps/utils/net/telnet/src/tnmisc.h | 2 +- reactos/apps/utils/net/telnet/src/tnmsg.h | 2 +- reactos/apps/utils/net/tracert/tracert.c | 4 +- reactos/apps/utils/net/whois/whois.c | 4 +- reactos/apps/utils/nts2w32err/nts2w32err.c | 8 +- reactos/apps/utils/objdir/objdir.c | 14 +-- reactos/apps/utils/patchnv4/patchnv4.c | 6 +- reactos/apps/utils/pesum/pesum.c | 2 +- reactos/apps/utils/pice/loader/terminal.h | 4 +- reactos/apps/utils/pice/module/dblflt.h | 2 +- reactos/apps/utils/pice/module/disassembler.c | 18 +-- reactos/apps/utils/pice/module/disassembler.h | 8 +- .../apps/utils/pice/module/disassemblerdata.h | 8 +- reactos/apps/utils/pice/module/gpfault.h | 2 +- reactos/apps/utils/pice/module/hercules.h | 2 +- reactos/apps/utils/pice/module/hooks.h | 4 +- reactos/apps/utils/pice/module/init.h | 6 +- reactos/apps/utils/pice/module/pci_ids.h | 2 +- reactos/apps/utils/pice/module/pgflt.h | 2 +- reactos/apps/utils/pice/module/pice_ver.h | 4 +- reactos/apps/utils/pice/module/regs.h | 2 +- reactos/apps/utils/pice/module/remods.h | 2 +- reactos/apps/utils/pice/module/scancodes.h | 2 +- reactos/apps/utils/pice/module/serial.h | 4 +- reactos/apps/utils/pice/module/serial_port.h | 2 +- reactos/apps/utils/pice/module/stab_gnu.h | 2 +- reactos/apps/utils/pice/module/symbols.c | 2 +- reactos/apps/utils/pice/module/syscall.h | 2 +- reactos/apps/utils/pice/module/trace.h | 2 +- reactos/apps/utils/pice/module/vga.h | 2 +- reactos/apps/utils/ps/ps.c | 18 +-- reactos/apps/utils/rosperf/rosperf.c | 38 +++--- reactos/apps/utils/sc/command.c | 2 +- reactos/apps/utils/sc/main.h | 2 +- reactos/apps/utils/sdkparse/assert.h | 2 +- reactos/apps/utils/sdkparse/test.h | 2 +- reactos/apps/utils/stats/stats.c | 34 +++--- reactos/apps/utils/tickcount/tickcount.c | 8 +- reactos/apps/utils/winetest/gui.c | 4 +- reactos/apps/utils/winetest/main.c | 8 +- 62 files changed, 274 insertions(+), 274 deletions(-) diff --git a/reactos/apps/utils/cat/cat.c b/reactos/apps/utils/cat/cat.c index ff1b63069ca..97fbf38387b 100644 --- a/reactos/apps/utils/cat/cat.c +++ b/reactos/apps/utils/cat/cat.c @@ -6,7 +6,7 @@ int main(int argc, char* argv[]) int i; FILE* in; char ch; - + for (i=1; i #include diff --git a/reactos/apps/utils/driver/unload/unload.c b/reactos/apps/utils/driver/unload/unload.c index 3e843d4e078..6afa80e62ec 100644 --- a/reactos/apps/utils/driver/unload/unload.c +++ b/reactos/apps/utils/driver/unload/unload.c @@ -1,6 +1,6 @@ /* * Unload a device driver - */ + */ #include #include diff --git a/reactos/apps/utils/net/arp/trace.c b/reactos/apps/utils/net/arp/trace.c index d225a22984a..948b5202638 100644 --- a/reactos/apps/utils/net/arp/trace.c +++ b/reactos/apps/utils/net/arp/trace.c @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // Diagnostic Trace // -#include +#include #include #define WIN32_LEAN_AND_MEAN #include diff --git a/reactos/apps/utils/net/finger/finger.c b/reactos/apps/utils/net/finger/finger.c index 125f8786391..2aebce5fcb7 100644 --- a/reactos/apps/utils/net/finger/finger.c +++ b/reactos/apps/utils/net/finger/finger.c @@ -161,10 +161,10 @@ userlist(int argc, char **argv) fprintf(stderr, "Warning: Can't do local finger\n"); } - /* Start winsock */ + /* Start winsock */ wVersionRequested = MAKEWORD( 1, 1 ); iErr = WSAStartup( wVersionRequested, &wsaData ); - if ( iErr != 0 ) + if ( iErr != 0 ) { /* Tell the user that we couldn't find a usable */ /* WinSock DLL. */ diff --git a/reactos/apps/utils/net/finger/net.c b/reactos/apps/utils/net/finger/net.c index ada9244631f..f79894b8475 100644 --- a/reactos/apps/utils/net/finger/net.c +++ b/reactos/apps/utils/net/finger/net.c @@ -115,7 +115,7 @@ netfinger(char *name) * 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 * character with bit 7 set is printable. - */ + */ lastc = 0; while (recv(s, &c, 1, 0) == 1) { c &= 0x7f; diff --git a/reactos/apps/utils/net/ftp/fake.c b/reactos/apps/utils/net/ftp/fake.c index baedf7fa8dd..165e51c7567 100644 --- a/reactos/apps/utils/net/ftp/fake.c +++ b/reactos/apps/utils/net/ftp/fake.c @@ -142,7 +142,7 @@ int fputcSocket(int s, char putChar) buffer[1] = '\0'; if(SOCKET_ERROR==send(s, buffer, 1, 0)) { - int iret=WSAGetLastError (); + int iret=WSAGetLastError (); fprintf(stdout,"fputcSocket: %d\n",iret); return 0; } @@ -154,9 +154,9 @@ int fputSocket(int s, char *buffer, int len) { int iret; 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); return 0; } @@ -187,7 +187,7 @@ char *fgetsSocket(int s, char *string) if (count == 1) { string[i] = buffer[0]; - + if (i == MAX_ASCII - 3) { count = 0; diff --git a/reactos/apps/utils/net/ftp/ruserpass.c b/reactos/apps/utils/net/ftp/ruserpass.c index ea6751bae0e..3c7f17779c8 100644 --- a/reactos/apps/utils/net/ftp/ruserpass.c +++ b/reactos/apps/utils/net/ftp/ruserpass.c @@ -126,7 +126,7 @@ next: case LOGIN: if (token()) - if (*aname == 0) { + if (*aname == 0) { *aname = malloc((unsigned) strlen(tokval) + 1); (void) strcpy(*aname, tokval); } else { @@ -237,7 +237,7 @@ static int token(void) char *cp; int c; struct toktab *t; - + if (feof(cfile)) return (0); while ((c = getc(cfile)) != EOF && diff --git a/reactos/apps/utils/net/ipconfig/ipconfig.c b/reactos/apps/utils/net/ipconfig/ipconfig.c index c2a6563a0be..acefedcb498 100644 --- a/reactos/apps/utils/net/ipconfig/ipconfig.c +++ b/reactos/apps/utils/net/ipconfig/ipconfig.c @@ -132,13 +132,13 @@ static void ShowNetworkInterfaces() } /* typedef struct _IP_ADAPTER_INDEX_MAP { - ULONG Index; // adapter index - WCHAR Name[MAX_ADAPTER_NAME]; // name of the adapter + ULONG Index; // adapter index + WCHAR Name[MAX_ADAPTER_NAME]; // name of the adapter } IP_ADAPTER_INDEX_MAP, * PIP_ADAPTER_INDEX_MAP; typedef struct _IP_INTERFACE_INFO { - LONG NumAdapters; // number of adapters in array - IP_ADAPTER_INDEX_MAP Adapter[1]; // adapter indices and names + LONG NumAdapters; // number of adapters in array + IP_ADAPTER_INDEX_MAP Adapter[1]; // adapter indices and names } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO; */ result = GetInterfaceInfo(pIfTable, &dwOutBufLen); @@ -194,7 +194,7 @@ typedef struct _IP_ADAPTER_INFO { IP_ADDR_STRING PrimaryWinsServer; IP_ADDR_STRING SecondaryWinsServer; a time_t LeaseObtained; -b time_t LeaseExpires; +b time_t LeaseExpires; } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; */ /* diff --git a/reactos/apps/utils/net/ipconfig/trace.c b/reactos/apps/utils/net/ipconfig/trace.c index d225a22984a..948b5202638 100644 --- a/reactos/apps/utils/net/ipconfig/trace.c +++ b/reactos/apps/utils/net/ipconfig/trace.c @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // Diagnostic Trace // -#include +#include #include #define WIN32_LEAN_AND_MEAN #include diff --git a/reactos/apps/utils/net/netstat/netstat.c b/reactos/apps/utils/net/netstat/netstat.c index 666c94c6015..80d51854c4b 100644 --- a/reactos/apps/utils/net/netstat/netstat.c +++ b/reactos/apps/utils/net/netstat/netstat.c @@ -52,7 +52,7 @@ static char TcpState[][32] = { VOID PrintError(DWORD ErrorCode) { LPVOID lpMsgBuf; - + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, ErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf, 0, NULL); @@ -66,21 +66,21 @@ static void ShowTcpStatistics() GetTcpStatistics(&TcpStatsMIB); _tprintf(_T("TCP/IP Statistics\t\n")); - _tprintf(_T(" time-out algorithm:\t\t%d\n"), TcpStatsMIB.dwRtoAlgorithm); - _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 connections:\t\t%d\n"), TcpStatsMIB.dwMaxConn); - _tprintf(_T(" active opens:\t\t\t%d\n"), TcpStatsMIB.dwActiveOpens); - _tprintf(_T(" passive opens:\t\t\t%d\n"), TcpStatsMIB.dwPassiveOpens); - _tprintf(_T(" failed attempts:\t\t%d\n"), TcpStatsMIB.dwAttemptFails); - _tprintf(_T(" established connections reset:\t%d\n"), TcpStatsMIB.dwEstabResets); - _tprintf(_T(" established connections:\t%d\n"), TcpStatsMIB.dwCurrEstab); - _tprintf(_T(" segments received:\t\t%d\n"), TcpStatsMIB.dwInSegs); - _tprintf(_T(" segment sent:\t\t\t%d\n"), TcpStatsMIB.dwOutSegs); - _tprintf(_T(" segments retransmitted:\t\t%d\n"), TcpStatsMIB.dwRetransSegs); - _tprintf(_T(" incoming errors:\t\t%d\n"), TcpStatsMIB.dwInErrs); - _tprintf(_T(" outgoing resets:\t\t%d\n"), TcpStatsMIB.dwOutRsts); - _tprintf(_T(" cumulative connections:\t\t%d\n"), TcpStatsMIB.dwNumConns); + _tprintf(_T(" time-out algorithm:\t\t%d\n"), TcpStatsMIB.dwRtoAlgorithm); + _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 connections:\t\t%d\n"), TcpStatsMIB.dwMaxConn); + _tprintf(_T(" active opens:\t\t\t%d\n"), TcpStatsMIB.dwActiveOpens); + _tprintf(_T(" passive opens:\t\t\t%d\n"), TcpStatsMIB.dwPassiveOpens); + _tprintf(_T(" failed attempts:\t\t%d\n"), TcpStatsMIB.dwAttemptFails); + _tprintf(_T(" established connections reset:\t%d\n"), TcpStatsMIB.dwEstabResets); + _tprintf(_T(" established connections:\t%d\n"), TcpStatsMIB.dwCurrEstab); + _tprintf(_T(" segments received:\t\t%d\n"), TcpStatsMIB.dwInSegs); + _tprintf(_T(" segment sent:\t\t\t%d\n"), TcpStatsMIB.dwOutSegs); + _tprintf(_T(" segments retransmitted:\t\t%d\n"), TcpStatsMIB.dwRetransSegs); + _tprintf(_T(" incoming errors:\t\t%d\n"), TcpStatsMIB.dwInErrs); + _tprintf(_T(" outgoing resets:\t\t%d\n"), TcpStatsMIB.dwOutRsts); + _tprintf(_T(" cumulative connections:\t\t%d\n"), TcpStatsMIB.dwNumConns); } static void ShowUdpStatistics() @@ -90,7 +90,7 @@ static void ShowUdpStatistics() _tprintf(_T("UDP Statistics\t\n")); _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(" sent datagrams:\t\t\t\t%d\n"), UDPStatsMIB.dwOutDatagrams); _tprintf(_T(" number of entries in listener table:\t%d\n"), UDPStatsMIB.dwNumAddrs); @@ -102,27 +102,27 @@ static void ShowIpStatistics() GetIpStatistics(&IPStatsMIB); _tprintf(_T("IP Statistics\t\n")); - _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(" datagrams received:\t\t\t%d\n"), IPStatsMIB.dwInReceives); - _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(" datagrams forwarded:\t\t\t%d\n"), IPStatsMIB.dwForwDatagrams); - _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 delivered:\t\t%d\n"), IPStatsMIB.dwInDelivers); - _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 frags didn't arrive:%d\n"), IPStatsMIB.dwReasmTimeout); - _tprintf(_T(" datagrams requiring reassembly:\t\t%d\n"), IPStatsMIB.dwReasmReqds); - _tprintf(_T(" successful reassemblies:\t\t%d\n"), IPStatsMIB.dwReasmOks); - _tprintf(_T(" failed reassemblies:\t\t\t%d\n"), IPStatsMIB.dwReasmFails); - _tprintf(_T(" successful fragmentations:\t\t%d\n"), IPStatsMIB.dwFragOks); - _tprintf(_T(" failed fragmentations:\t\t\t%d\n"), IPStatsMIB.dwFragFails); - _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 IP address on computer:\t%d\n"), IPStatsMIB.dwNumAddr); - _tprintf(_T(" number of routes in routing table:\t%d\n"), IPStatsMIB.dwNumRoutes); + _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(" datagrams received:\t\t\t%d\n"), IPStatsMIB.dwInReceives); + _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(" datagrams forwarded:\t\t\t%d\n"), IPStatsMIB.dwForwDatagrams); + _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 delivered:\t\t%d\n"), IPStatsMIB.dwInDelivers); + _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 frags didn't arrive:%d\n"), IPStatsMIB.dwReasmTimeout); + _tprintf(_T(" datagrams requiring reassembly:\t\t%d\n"), IPStatsMIB.dwReasmReqds); + _tprintf(_T(" successful reassemblies:\t\t%d\n"), IPStatsMIB.dwReasmOks); + _tprintf(_T(" failed reassemblies:\t\t\t%d\n"), IPStatsMIB.dwReasmFails); + _tprintf(_T(" successful fragmentations:\t\t%d\n"), IPStatsMIB.dwFragOks); + _tprintf(_T(" failed fragmentations:\t\t\t%d\n"), IPStatsMIB.dwFragFails); + _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 IP address on computer:\t%d\n"), IPStatsMIB.dwNumAddr); + _tprintf(_T(" number of routes in routing table:\t%d\n"), IPStatsMIB.dwNumRoutes); } static void ShowNetworkParams() @@ -262,20 +262,20 @@ typedef struct { // Translate port numbers into their text equivalent if there is one // 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; if (Flags & FLAG_SHOW_NUMBERS) { sprintf(name, "%d", htons((WORD)port)); return name; - } + } // Try to translate to a name if (psrvent = getservbyport(port, proto)) { strcpy(name, psrvent->s_name ); } else { sprintf(name, "%d", htons((WORD)port)); - } + } 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. // 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; UINT nipaddr; @@ -294,7 +294,7 @@ GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen) // Does the user want raw numbers? nipaddr = htonl(ipaddr); if (Flags & FLAG_SHOW_NUMBERS ) { - sprintf(name, "%d.%d.%d.%d", + sprintf(name, "%d.%d.%d.%d", (nipaddr >> 24) & 0xFF, (nipaddr >> 16) & 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 if (!ipaddr) { if (!local) { - sprintf(name, "%d.%d.%d.%d", + sprintf(name, "%d.%d.%d.%d", (nipaddr >> 24) & 0xFF, (nipaddr >> 16) & 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); #else - sprintf(name, "%d.%d.%d.%d", + sprintf(name, "%d.%d.%d.%d", ((nipaddr >> 24) & 0x000000FF), ((nipaddr >> 16) & 0x000000FF), ((nipaddr >> 8) & 0x000000FF), @@ -360,10 +360,10 @@ BOOLEAN usage(void) // // GetOptions -// +// // Parses the command line arguments. // -BOOLEAN +BOOLEAN GetOptions(int argc, char *argv[], PDWORD pFlags) { int i, j; @@ -466,12 +466,12 @@ int main(int argc, char *argv[]) for (i = 0; i < tcpTable->dwNumEntries; i++) { if (flags & FLAG_SHOW_ALL_ENDPOINTS || tcpTable->table[i].dwState == MIB_TCP_STATE_ESTAB) { - sprintf(localaddr, "%s:%s", - GetIpHostName(flags, TRUE, tcpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN), + sprintf(localaddr, "%s:%s", + GetIpHostName(flags, TRUE, tcpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN), GetPortName(flags, tcpTable->table[i].dwLocalPort, "tcp", localport, PORTNAMELEN)); sprintf(remoteaddr, "%s:%s", - GetIpHostName(flags, FALSE, tcpTable->table[i].dwRemoteAddr, remotename, HOSTNAMELEN), - tcpTable->table[i].dwRemoteAddr ? + GetIpHostName(flags, FALSE, tcpTable->table[i].dwRemoteAddr, remotename, HOSTNAMELEN), + tcpTable->table[i].dwRemoteAddr ? GetPortName(flags, tcpTable->table[i].dwRemotePort, "tcp", remoteport, PORTNAMELEN): "0"); 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 if (flags & FLAG_SHOW_ALL_ENDPOINTS) { for (i = 0; i < udpTable->dwNumEntries; i++) { - sprintf(localaddr, "%s:%s", - GetIpHostName(flags, TRUE, udpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN), + sprintf(localaddr, "%s:%s", + GetIpHostName(flags, TRUE, udpTable->table[i].dwLocalAddr, localname, HOSTNAMELEN), GetPortName(flags, udpTable->table[i].dwLocalPort, "tcp", localport, PORTNAMELEN)); printf("%4s", "[UDP]"); printf(" Local: %s\n Remote: %s\n", localaddr, "*.*.*.*:*"); } } - } + } printf("\n"); return 0; } diff --git a/reactos/apps/utils/net/netstat/trace.c b/reactos/apps/utils/net/netstat/trace.c index d225a22984a..948b5202638 100644 --- a/reactos/apps/utils/net/netstat/trace.c +++ b/reactos/apps/utils/net/netstat/trace.c @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // Diagnostic Trace // -#include +#include #include #define WIN32_LEAN_AND_MEAN #include diff --git a/reactos/apps/utils/net/ping/ping.c b/reactos/apps/utils/net/ping/ping.c index 5cab24632b7..ff2c7ca5c66 100644 --- a/reactos/apps/utils/net/ping/ping.c +++ b/reactos/apps/utils/net/ping/ping.c @@ -306,10 +306,10 @@ BOOL Setup(VOID) PHOSTENT phe; wVersionRequested = MAKEWORD(2, 2); - + Status = WSAStartup(wVersionRequested, &WsaData); if (Status != 0) { - printf("Could not initialize winsock dll.\n"); + printf("Could not initialize winsock dll.\n"); return FALSE; } @@ -327,9 +327,9 @@ BOOL Setup(VOID) if (phe == NULL) { printf("Unknown host %s.\n", TargetName); return FALSE; - } + } } - + if (phe != NULL) { CopyMemory(&Target.sin_addr, phe->h_addr, phe->h_length); } else { @@ -341,7 +341,7 @@ BOOL Setup(VOID) } else { Target.sin_family = AF_INET; } - + TargetIP = inet_ntoa(Target.sin_addr); CurrentSeqNum = 0; SentCount = 0; @@ -391,7 +391,7 @@ VOID TimeToMsString(LPSTR String, LARGE_INTEGER Time) LARGE_INTEGER LargeTime; LargeTime.QuadPart = Time.QuadPart / TicksPerMs.QuadPart; - + _i64toa(LargeTime.QuadPart, Convstr, 10); strcpy(String, Convstr); 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); if (RelativeTime.QuadPart < MinRTT.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", TargetName, TargetIP, DataSize); - + Count = 0; while ((NeverStop) || (Count < PingCount)) { Ping(); diff --git a/reactos/apps/utils/net/roshttpd/include/list.h b/reactos/apps/utils/net/roshttpd/include/list.h index 4e1c4bf59e7..914d06ea2cc 100644 --- a/reactos/apps/utils/net/roshttpd/include/list.h +++ b/reactos/apps/utils/net/roshttpd/include/list.h @@ -25,7 +25,7 @@ public: CListNode *GetPrev(); private: PVOID Element; - CListNode *Next; + CListNode *Next; CListNode *Prev; static HANDLE hHeap; static INT nRef; @@ -37,7 +37,7 @@ public: CList(); ~CList(); CList& operator=(CList&); - + CIterator *CreateIterator() const; LONG Count() const; Item& Get(const LONG index) const; @@ -82,7 +82,7 @@ CList::CList() // Default destructor template CList::~CList() -{ +{ RemoveAll(); delete Trailer; delete Header; @@ -157,7 +157,7 @@ VOID CList::RemoveAll() tmp = node->GetNext(); delete node; node = tmp; - } + } Header->SetNext(Trailer); Trailer->SetPrev(Header); NodeCount = 0; diff --git a/reactos/apps/utils/net/route/route.c b/reactos/apps/utils/net/route/route.c index ded88019259..048db9f4b06 100644 --- a/reactos/apps/utils/net/route/route.c +++ b/reactos/apps/utils/net/route/route.c @@ -20,7 +20,7 @@ #define IN_ADDR_OF(x) *((struct in_addr *)&(x)) int usage() { - fprintf( stderr, + fprintf( stderr, "route usage:\n" "route print\n" " prints the route table\n" @@ -35,7 +35,7 @@ int print_routes() { PMIB_IPFORWARDTABLE IpForwardTable; DWORD Error; ULONG Size = 0; - char Destination[IPBUF], Gateway[IPBUF], Netmask[IPBUF], + char Destination[IPBUF], Gateway[IPBUF], Netmask[IPBUF], Index[IPBUF], Metric[IPBUF]; int i; @@ -46,7 +46,7 @@ int print_routes() { } if( Error == ERROR_SUCCESS ) { - printf( "%-16s%-16s%-16s%-10s%-10s\n", + printf( "%-16s%-16s%-16s%-10s%-10s\n", "Destination", "Netmask", "Gateway", @@ -63,7 +63,7 @@ int print_routes() { inet_ntoa( IN_ADDR_OF(IpForwardTable->table[i]. dwForwardNextHop) ) ); - printf( "%-16s%-16s%-16s%-10d%-10d\n", + printf( "%-16s%-16s%-16s%-10d%-10d\n", Destination, Netmask, 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 i; @@ -106,7 +106,7 @@ int add_route( int argc, char **argv ) { DWORD Error; if( argc < 2 || !convert_add_cmd_line( &RowToAdd, argc, argv ) ) { - fprintf( stderr, + fprintf( stderr, "route add usage:\n" "route add [mask ] [metric ]\n" " Adds a route to the IP route table.\n" @@ -116,10 +116,10 @@ int add_route( int argc, char **argv ) { " is the metric to use (lower is preferred)\n" ); return 1; } - - if( (Error = CreateIpForwardEntry( &RowToAdd )) == ERROR_SUCCESS ) + + if( (Error = CreateIpForwardEntry( &RowToAdd )) == ERROR_SUCCESS ) return 0; - + fprintf( stderr, "Route addition failed\n" ); return Error; } @@ -129,7 +129,7 @@ int del_route( int argc, char **argv ) { DWORD Error; if( argc < 2 || !convert_add_cmd_line( &RowToDel, argc, argv ) ) { - fprintf( stderr, + fprintf( stderr, "route delete usage:\n" "route delete \n" " Removes a route from the IP route table.\n" @@ -137,21 +137,21 @@ int del_route( int argc, char **argv ) { " is the gateway to remove the route from.\n" ); return 1; } - - if( (Error = DeleteIpForwardEntry( &RowToDel )) == ERROR_SUCCESS ) + + if( (Error = DeleteIpForwardEntry( &RowToDel )) == ERROR_SUCCESS ) return 0; - + fprintf( stderr, "Route addition failed\n" ); return Error; } int main( int argc, char **argv ) { if( argc < 2 ) return usage(); - else if( !strcasecmp( argv[1], "print" ) ) + else if( !strcasecmp( argv[1], "print" ) ) return print_routes(); - else if( !strcasecmp( argv[1], "add" ) ) + else if( !strcasecmp( argv[1], "add" ) ) 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 ); else return usage(); } diff --git a/reactos/apps/utils/net/telnet/resource/tnmsg.h b/reactos/apps/utils/net/telnet/resource/tnmsg.h index b46f8cba7ee..b93d02bcb9b 100644 --- a/reactos/apps/utils/net/telnet/resource/tnmsg.h +++ b/reactos/apps/utils/net/telnet/resource/tnmsg.h @@ -97,7 +97,7 @@ #define MSG_WSANO_DATA 0x2AFC // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 diff --git a/reactos/apps/utils/net/telnet/src/ansiprsr.h b/reactos/apps/utils/net/telnet/src/ansiprsr.h index aef43c6a079..0ce02d906d3 100644 --- a/reactos/apps/utils/net/telnet/src/ansiprsr.h +++ b/reactos/apps/utils/net/telnet/src/ansiprsr.h @@ -49,7 +49,7 @@ private: void SaveCurY(int iY); void resetTabStops(); - + int iSavedCurX; int iSavedCurY; unsigned char iSavedAttributes; @@ -77,7 +77,7 @@ public: TANSIParser(TConsole &Console, KeyTranslator &RefKeyTrans, TScroller &RefScroller, TNetwork &NetHandler, TCharmap &RefCharmap); ~TANSIParser(); - + char* ParseBuffer(char* pszBuffer, char* pszBufferEnd); static int StripBuffer(char* pszBuffer, char* pszBufferEnd, int width); }; diff --git a/reactos/apps/utils/net/telnet/src/keytrans.h b/reactos/apps/utils/net/telnet/src/keytrans.h index f760a7e7d77..21bb85afa0a 100644 --- a/reactos/apps/utils/net/telnet/src/keytrans.h +++ b/reactos/apps/utils/net/telnet/src/keytrans.h @@ -93,5 +93,5 @@ private: int currentKeyMap, mainKeyMap; // AVS }; - + #endif // __KEYTRANS_H diff --git a/reactos/apps/utils/net/telnet/src/stl_bids.h b/reactos/apps/utils/net/telnet/src/stl_bids.h index 0161d6ae973..7366fc1afa4 100644 --- a/reactos/apps/utils/net/telnet/src/stl_bids.h +++ b/reactos/apps/utils/net/telnet/src/stl_bids.h @@ -29,36 +29,36 @@ public: growable(delta), lowerbound(lower) { vector::reserve(upper-lower + 1);} - + ~TArrayAsVector( ) { // This call is unnecessary? (Paul Brannan 5/7/98) // vector::~vector( ); } - + int Add(const T& item) { if(!growable && vector::size( ) == vector::capacity( )) return 0; else insert(vector::end( ), item); return 1; } - + int AddAt(const T& item, size_type index) { if(!growable && ((vector::size( ) == vector::capacity( )) || (ZeroBase(index > vector::capacity( )) ))) return 0; if(ZeroBase(index) > vector::capacity( )) // out of bounds - { insert(vector::end( ), + { insert(vector::end( ), ZeroBase(index) - vector::size( ), T( )); insert(vector::end( ), item); } else { insert(vector::begin( ) + ZeroBase(index), item); } return 1; } - + size_type ArraySize( ) { return vector::capacity( ); } - + size_type BoundBase(size_type location) const { if(location == UINT_MAX) return INT_MAX; @@ -66,44 +66,44 @@ public: return location + lowerbound; } void Detach(size_type index) { erase(vector::begin( ) + ZeroBase(index)); } - + void Detach(const T& item) { Destroy(Find(item)); } - + void Destroy(size_type index) { erase(vector::begin( ) + ZeroBase(index)); } - + void Destroy(const T& item) { Destroy(Find(item)); } - + size_type Find(const T& item) const - { const_iterator location = find(vector::begin( ), + { const_iterator location = find(vector::begin( ), vector::end( ), item); if(location != vector::end( )) - return BoundBase(size_type(location - + return BoundBase(size_type(location - vector::begin( ))); else return INT_MAX; } - + size_type GetItemsInContainer( ) { return vector::size( ); } - + void Grow(size_type index) { if( index < lowerbound ) - Reallocate(ArraySize( ) + (index - + Reallocate(ArraySize( ) + (index - lowerbound)); else if( index >= BoundBase(vector::size( ))) Reallocate(ZeroBase(index) ); } - + int HasMember(const T& item) { if(Find(item) != INT_MAX) return 1; else return 0; } - + int IsEmpty( ) { return vector::empty( ); } - + int IsFull( ) { if(growable) return 0; @@ -111,42 +111,42 @@ public: return 1; else return 0; } - + size_type LowerBound( ) { return lowerbound; } - + T& operator[] (size_type index) { return vector:: operator[](ZeroBase(index)); } - + const T& operator[] (size_type index) const { return vector:: operator[](ZeroBase(index)); } - + void Flush( ) { vector::clear(); } - - void Reallocate(size_type sz, + + void Reallocate(size_type sz, size_type offset = 0) { if(offset) insert(vector::begin( ), offset, T( )); vector::reserve(sz); erase(vector::end( ) - offset, vector::end( )); } - + void RemoveEntry(size_type index) { Detach(index); } - + void SetData(size_type index, const T& item) { (*this)[index] = item; } - + size_type UpperBound( ) { return BoundBase(vector::capacity( )) - 1; } - + size_type ZeroBase(size_type index) const { return index - lowerbound; } - + // The assignment operator is not inherited (Paul Brannan 5/25/98) TArrayAsVector& operator=(const TArrayAsVector& v) { vector::operator=(v); diff --git a/reactos/apps/utils/net/telnet/src/tconsole.h b/reactos/apps/utils/net/telnet/src/tconsole.h index 599fd2b4795..81e59894b69 100644 --- a/reactos/apps/utils/net/telnet/src/tconsole.h +++ b/reactos/apps/utils/net/telnet/src/tconsole.h @@ -25,9 +25,9 @@ * | . | | | * | . | <-- OR --> | | * | . | | | - * CON_LEFT | . | CON_RIGHT | + * CON_LEFT | . | CON_RIGHT | * (=0) | . | (=CON_ | CON_LINES - * |..............* | WIDTH) | + * |..............* | WIDTH) | * | (CON_CUR_X, | | | * | CON_CUR_Y) | | | * | | | | @@ -77,15 +77,15 @@ public: void SetCursorPosition(int x, int y); void SetCursorSize(int pct); void MoveCursorPosition(int x, int y); - + // Screen mode/size routines int GetWidth() {return CON_COLS;} int GetHeight() {return CON_LINES;} void SetExtendedMode(int iFunction, BOOL bEnable); void SetWindowSize(int width, int height); // Set the size of the window, // but not the buffer - - // Color/attribute routines + + // Color/attribute routines void SetAttrib(unsigned char wAttr) {wAttributes = wAttr;} unsigned char GetAttrib() {return wAttributes;} void Normal(); // Reset all attributes @@ -130,13 +130,13 @@ public: void index(); void reverse_index(); void setLineWrap(bool bEnabled){ - if(!ini.get_lock_linewrap()) + if(!ini.get_lock_linewrap()) ini.set_value("Wrap_Line", bEnabled ? "true" : "false"); } bool getLineWrap() {return ini.get_wrapline();} // 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 DeleteCharacter(int numchar); // " void InsertMode(int i) {insert_mode = i;} @@ -148,7 +148,7 @@ protected: HANDLE hConsole; CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo; - + unsigned char wAttributes; unsigned char fg, bg; unsigned char defaultfg, defaultbg; @@ -157,7 +157,7 @@ protected: bool blink; bool underline; bool reverse; - + int iScrollStart; int iScrollEnd; int insert_mode; diff --git a/reactos/apps/utils/net/telnet/src/tkeydef.h b/reactos/apps/utils/net/telnet/src/tkeydef.h index c40ba33a47f..c44a5bca164 100644 --- a/reactos/apps/utils/net/telnet/src/tkeydef.h +++ b/reactos/apps/utils/net/telnet/src/tkeydef.h @@ -39,20 +39,20 @@ private: KeyDefType uKeyDef; DWORD vk_code; DWORD dwState; - + public: TKeyDef(); TKeyDef(char *def, DWORD state, DWORD code); TKeyDef(optype op, DWORD state, DWORD code); TKeyDef(const TKeyDef &t); - + char *operator=(char *def); DWORD operator=(DWORD code); TKeyDef& operator=(const TKeyDef &t); const optype& operator=(optype op); - + ~TKeyDef(); - + #ifdef __BORLANDC__ int operator==(TKeyDef &t); #else @@ -61,7 +61,7 @@ public: friend bool operator==(const TKeyDef &t1, const TKeyDef &t2); friend bool operator<(const TKeyDef &t1, const TKeyDef &t2); #endif - + const char *GetszKey() { return uKeyDef.szKeyDef; } const KeyDefType GetKeyDef() { return uKeyDef; } DWORD GetCodeKey() { return vk_code; } diff --git a/reactos/apps/utils/net/telnet/src/tnclass.h b/reactos/apps/utils/net/telnet/src/tnclass.h index faab2bf3762..f29dfa3e87f 100644 --- a/reactos/apps/utils/net/telnet/src/tnclass.h +++ b/reactos/apps/utils/net/telnet/src/tnclass.h @@ -26,7 +26,7 @@ public: int Open(const char *szHost, const char *strPort = "23"); int Close(); // close current connection int Resume(); // resume current session - + // changes to the keymap profile in the file int LoadKeyMap( const char * file, const char * name); void DisplayKeyMap(); // display available keymaps @@ -35,7 +35,7 @@ private: SOCKET Connect(); void telSetConsoleTitle(const char * szHost); void DoInit(); - + SOCKET Socket; char strPort[32]; // int iPort; char szHost[127]; diff --git a/reactos/apps/utils/net/telnet/src/tnmisc.h b/reactos/apps/utils/net/telnet/src/tnmisc.h index 1f5488ca376..2c23daa7569 100644 --- a/reactos/apps/utils/net/telnet/src/tnmisc.h +++ b/reactos/apps/utils/net/telnet/src/tnmisc.h @@ -2,7 +2,7 @@ #define __TNMISC_H // Process-related functions -BOOL CreateHiddenConsoleProcess(LPCTSTR szChildName, PROCESS_INFORMATION* ppi, +BOOL CreateHiddenConsoleProcess(LPCTSTR szChildName, PROCESS_INFORMATION* ppi, LPHANDLE phInWrite, LPHANDLE phOutRead, LPHANDLE phErrRead); BOOL SpawnProcess(char *cmd_line, PROCESS_INFORMATION *pi); diff --git a/reactos/apps/utils/net/telnet/src/tnmsg.h b/reactos/apps/utils/net/telnet/src/tnmsg.h index b46f8cba7ee..b93d02bcb9b 100644 --- a/reactos/apps/utils/net/telnet/src/tnmsg.h +++ b/reactos/apps/utils/net/telnet/src/tnmsg.h @@ -97,7 +97,7 @@ #define MSG_WSANO_DATA 0x2AFC // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 diff --git a/reactos/apps/utils/net/tracert/tracert.c b/reactos/apps/utils/net/tracert/tracert.c index fb5297b1de0..1094347b69c 100644 --- a/reactos/apps/utils/net/tracert/tracert.c +++ b/reactos/apps/utils/net/tracert/tracert.c @@ -222,7 +222,7 @@ static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) 6/6/93"; #include #include #include - + #include @@ -508,7 +508,7 @@ main(argc, argv) status = WSAStartup(MAKEWORD(2, 2), &wsadata); if (status != 0) { - printf("Could not initialize winsock dll.\n"); + printf("Could not initialize winsock dll.\n"); return FALSE; } diff --git a/reactos/apps/utils/net/whois/whois.c b/reactos/apps/utils/net/whois/whois.c index 989d0a2e754..30ca4b93fcd 100644 --- a/reactos/apps/utils/net/whois/whois.c +++ b/reactos/apps/utils/net/whois/whois.c @@ -92,10 +92,10 @@ int main(int argc, char **argv) if (!argc) usage(); - /* Start winsock */ + /* Start winsock */ wVersionRequested = MAKEWORD( 1, 1 ); err = WSAStartup( wVersionRequested, &wsaData ); - if ( err != 0 ) + if ( err != 0 ) { /* Tell the user that we couldn't find a usable */ /* WinSock DLL. */ diff --git a/reactos/apps/utils/nts2w32err/nts2w32err.c b/reactos/apps/utils/nts2w32err/nts2w32err.c index cf3303d6522..7dc410fb56f 100644 --- a/reactos/apps/utils/nts2w32err/nts2w32err.c +++ b/reactos/apps/utils/nts2w32err/nts2w32err.c @@ -1,16 +1,16 @@ /* $Id$ - * + * * Convert NTSTATUS codes to Win32 error codes: run it * on a NT box AND on a ROS box, then diff the results. * * This utility should help keeping correct how Ros * translates executive's errors codes into Win32 error * codes. - * + * * Usage: nts2w32err [MaxStatusCode] > log.txt - * + * * 2004-01-10 Emanuele Aliberti - * + * */ #include #include diff --git a/reactos/apps/utils/objdir/objdir.c b/reactos/apps/utils/objdir/objdir.c index 82516fdb309..dd8ae7219ec 100644 --- a/reactos/apps/utils/objdir/objdir.c +++ b/reactos/apps/utils/objdir/objdir.c @@ -35,7 +35,7 @@ RawUszAsz ( ) { register PCHAR a = szA; - + while (*szU) {*szA++ = (CHAR) (0x00ff & * szU++);} *szA = '\0'; return a; @@ -51,7 +51,7 @@ RawAszUsz ( ) { register PWCHAR w = szW; - + while (*szA) {*szW++ = (WCHAR) *szA++;} *szW = L'\0'; return w; @@ -64,7 +64,7 @@ STDCALL StatusToName (NTSTATUS Status) { static char RawValue [16]; - + switch (Status) { case STATUS_BUFFER_TOO_SMALL: @@ -112,7 +112,7 @@ ExpandSymbolicLink ( Path.Buffer = PathBuffer; Path.Length = 0; Path.MaximumLength = sizeof PathBuffer; - + RtlCopyUnicodeString (& Path, DirectoryName); if (L'\\' != Path.Buffer [(Path.Length / sizeof Path.Buffer[0]) - 1]) { @@ -183,7 +183,7 @@ ListDirectory ( ULONG Context = 0; ULONG ReturnLength = 0; ULONG EntryCount = 0; - + /* For expanding symbolic links */ WCHAR TargetName [2 * MAX_PATH]; UNICODE_STRING TargetObjectName = { @@ -222,7 +222,7 @@ ListDirectory ( return (FALSE); } printf ("\n Directory of %s\n\n", DirectoryNameA); - + for(;;) { /* @@ -355,7 +355,7 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } RawAszUsz (argv[2], DirectoryNameW); - Recurse = TRUE; + Recurse = TRUE; break; default: fprintf ( diff --git a/reactos/apps/utils/patchnv4/patchnv4.c b/reactos/apps/utils/patchnv4/patchnv4.c index c57462b4681..52f7ab63ba8 100644 --- a/reactos/apps/utils/patchnv4/patchnv4.c +++ b/reactos/apps/utils/patchnv4/patchnv4.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]) if (NULL == Buffer) { perror("Can't allocate buffer"); - fclose(File); + fclose(File); exit(1); } rewind(File); @@ -67,7 +67,7 @@ main(int argc, char *argv[]) { perror("Error reading from original file"); free(Buffer); - fclose(File); + fclose(File); exit(1); } fclose(File); @@ -97,7 +97,7 @@ main(int argc, char *argv[]) if (Size != fwrite(Buffer, 1, Size, File)) { perror("Error writing to output file"); - fclose(File); + fclose(File); remove(TempName); free(Buffer); exit(1); diff --git a/reactos/apps/utils/pesum/pesum.c b/reactos/apps/utils/pesum/pesum.c index b865b1d62c2..e4e5cf3d323 100644 --- a/reactos/apps/utils/pesum/pesum.c +++ b/reactos/apps/utils/pesum/pesum.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) if (!((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].VirtualAddress) break; #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].VirtualAddress, ((PIMAGE_SECTION_HEADER)IMAGE_FIRST_SECTION((PIMAGE_NT_HEADERS)&buffer[offset]))[i].SizeOfRawData, diff --git a/reactos/apps/utils/pice/loader/terminal.h b/reactos/apps/utils/pice/loader/terminal.h index ad37c9a2f5e..b34991560e1 100644 --- a/reactos/apps/utils/pice/loader/terminal.h +++ b/reactos/apps/utils/pice/loader/terminal.h @@ -7,7 +7,7 @@ Module Name: termínal.h Abstract: - + HEADER for terminal.c Environment: @@ -21,7 +21,7 @@ Author: Revision History: 23-Jan-2001: created - + Copyright notice: This file may be distributed under the terms of the GNU Public License. diff --git a/reactos/apps/utils/pice/module/dblflt.h b/reactos/apps/utils/pice/module/dblflt.h index a30f38e689b..c2f8add1e6c 100644 --- a/reactos/apps/utils/pice/module/dblflt.h +++ b/reactos/apps/utils/pice/module/dblflt.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/disassembler.c b/reactos/apps/utils/pice/module/disassembler.c index 522bb6267da..ea257143418 100644 --- a/reactos/apps/utils/pice/module/disassembler.c +++ b/reactos/apps/utils/pice/module/disassembler.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2000-2001 Goran Devic +Copyright (c) 2000-2001 Goran Devic Modified (c) 2001 Klaus P. Gerlicher Module Name: @@ -16,15 +16,15 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: - Goran Devic + Goran Devic Revision History: - 17-Mar-2000: Original (Goran Devic) + 17-Mar-2000: Original (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) @@ -110,7 +110,7 @@ static UCHAR GetNextUCHAR(USHORT sel, UCHAR *offset, UCHAR *pCode) pCode[0] = GetUCHAR((ULONG) offset + 0) & 0xFF; return( pCode[0] ); -} +} 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; return( *(USHORT *) 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; return( *(ULONG *) pCode ); -} +} #define NEXTUCHAR GetNextUCHAR( pDis->wSel, bpTarget, bpCode); bpCode += 1; bpTarget += 1; bInstrLen += 1 @@ -705,7 +705,7 @@ DisEnd: BOOLEAN Disasm(PULONG pOffset,PUCHAR pchDst) { TDisassembler dis; - + dis.dwFlags = DIS_DATA32 | DIS_ADDRESS32; dis.bpTarget = (UCHAR*)*pOffset; dis.szDisasm = pchDst; diff --git a/reactos/apps/utils/pice/module/disassembler.h b/reactos/apps/utils/pice/module/disassembler.h index de503697340..9e9a7571b54 100644 --- a/reactos/apps/utils/pice/module/disassembler.h +++ b/reactos/apps/utils/pice/module/disassembler.h @@ -5,7 +5,7 @@ #define OP_BPTR 0x400 /* BYTE Pointer */ #define OP_WPTR 0x500 /* WORD Pointer */ #define OP_DPTR 0x600 /* DWORD Pointer */ -#define OP_UNK 0x900 +#define OP_UNK 0x900 //#define INS_INVALID 0x00 /* Not a valid instruction */ /* Branch Instruction types */ #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_IMM32,ARG_STRING,ARG_MODRM_BCD,ARG_PSTRING,ARG_DOSSTRING,ARG_CUNICODESTRING, ARG_PUNICODESTRING,ARG_NONEBYTE,ARG_XREG,ARG_XMMMODRM}; - + typedef struct x86_inst { int flags; int destType, srcType, auxType; @@ -122,7 +122,7 @@ typedef struct x86_inst { #define DISP8 0x1000 #define DISP32 0x2000 #define HAS_SIB 0x4000 -#define HAS_MODRM 0x8000 +#define HAS_MODRM 0x8000 struct OPERAND { //arg1, arg2, arg3 char * str; //temporary buffer for building arg text @@ -138,7 +138,7 @@ struct EA { //effective address [SIB/disp] char sib[32]; }; -struct modRM_byte { +struct modRM_byte { unsigned int mod : 2; unsigned int reg : 3; unsigned int rm : 3; diff --git a/reactos/apps/utils/pice/module/disassemblerdata.h b/reactos/apps/utils/pice/module/disassemblerdata.h index 1aa46a3f512..2bde2ec2f48 100644 --- a/reactos/apps/utils/pice/module/disassemblerdata.h +++ b/reactos/apps/utils/pice/module/disassemblerdata.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2000-2001 Goran Devic +Copyright (c) 2000-2001 Goran Devic Modified (c) 2001 Klaus P. Gerlicher Module Name: @@ -16,13 +16,13 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: - Goran Devic + Goran Devic Revision History: - 17-Mar-2000: Original (Goran Devic) + 17-Mar-2000: Original (Goran Devic) 05-Jan-2001: Modified for pICE (Klaus P. Gerlicher) Copyright notice: diff --git a/reactos/apps/utils/pice/module/gpfault.h b/reactos/apps/utils/pice/module/gpfault.h index 2830e575713..76879a6df24 100644 --- a/reactos/apps/utils/pice/module/gpfault.h +++ b/reactos/apps/utils/pice/module/gpfault.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/hercules.h b/reactos/apps/utils/pice/module/hercules.h index 9342a902b61..35f9374c1b7 100644 --- a/reactos/apps/utils/pice/module/hercules.h +++ b/reactos/apps/utils/pice/module/hercules.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/hooks.h b/reactos/apps/utils/pice/module/hooks.h index ab9969a6417..91210bafaf8 100644 --- a/reactos/apps/utils/pice/module/hooks.h +++ b/reactos/apps/utils/pice/module/hooks.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher @@ -28,7 +28,7 @@ Copyright notice: 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); //void UnhookInt(ULONG dwInt); void MaskIrqs(void); diff --git a/reactos/apps/utils/pice/module/init.h b/reactos/apps/utils/pice/module/init.h index e63332a58b0..a1227683479 100644 --- a/reactos/apps/utils/pice/module/init.h +++ b/reactos/apps/utils/pice/module/init.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher @@ -29,7 +29,7 @@ Copyright notice: --*/ -BOOLEAN InitPICE(void); -void CleanUpPICE(void); +BOOLEAN InitPICE(void); +void CleanUpPICE(void); extern char szBootParams[1024]; diff --git a/reactos/apps/utils/pice/module/pci_ids.h b/reactos/apps/utils/pice/module/pci_ids.h index 1b085d1a8ec..b98e0008164 100644 --- a/reactos/apps/utils/pice/module/pci_ids.h +++ b/reactos/apps/utils/pice/module/pci_ids.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/pgflt.h b/reactos/apps/utils/pice/module/pgflt.h index 170a3ef4b0f..41cea22723d 100644 --- a/reactos/apps/utils/pice/module/pgflt.h +++ b/reactos/apps/utils/pice/module/pgflt.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/pice_ver.h b/reactos/apps/utils/pice/module/pice_ver.h index e4c7a7b89cd..d55858e6260 100644 --- a/reactos/apps/utils/pice/module/pice_ver.h +++ b/reactos/apps/utils/pice/module/pice_ver.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher @@ -33,4 +33,4 @@ Copyright notice: #define PICE_MINOR_VERSION (99) // reset this on major or minor version change // increment this on every release build -#define PICE_BUILD (0007) +#define PICE_BUILD (0007) diff --git a/reactos/apps/utils/pice/module/regs.h b/reactos/apps/utils/pice/module/regs.h index 43e99ae30fb..3d5c5dda74d 100644 --- a/reactos/apps/utils/pice/module/regs.h +++ b/reactos/apps/utils/pice/module/regs.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/remods.h b/reactos/apps/utils/pice/module/remods.h index 6c64d78cc13..ce98bda955c 100644 --- a/reactos/apps/utils/pice/module/remods.h +++ b/reactos/apps/utils/pice/module/remods.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/scancodes.h b/reactos/apps/utils/pice/module/scancodes.h index 8e451accfb8..dae66de0de4 100644 --- a/reactos/apps/utils/pice/module/scancodes.h +++ b/reactos/apps/utils/pice/module/scancodes.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/serial.h b/reactos/apps/utils/pice/module/serial.h index b77bf989d02..9c531334395 100644 --- a/reactos/apps/utils/pice/module/serial.h +++ b/reactos/apps/utils/pice/module/serial.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher @@ -32,5 +32,5 @@ void SendString(LPSTR s); void SetupSerial(ULONG port,ULONG baudrate); BOOLEAN ConsoleInitSerial(void); -void ConsoleShutdownSerial(void); +void ConsoleShutdownSerial(void); diff --git a/reactos/apps/utils/pice/module/serial_port.h b/reactos/apps/utils/pice/module/serial_port.h index 83c367e5d9a..eabd62a4e33 100644 --- a/reactos/apps/utils/pice/module/serial_port.h +++ b/reactos/apps/utils/pice/module/serial_port.h @@ -17,7 +17,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/stab_gnu.h b/reactos/apps/utils/pice/module/stab_gnu.h index dbc65ee58d3..faeba1486b6 100644 --- a/reactos/apps/utils/pice/module/stab_gnu.h +++ b/reactos/apps/utils/pice/module/stab_gnu.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/symbols.c b/reactos/apps/utils/pice/module/symbols.c index 76c44d6432c..8713976da0e 100644 --- a/reactos/apps/utils/pice/module/symbols.c +++ b/reactos/apps/utils/pice/module/symbols.c @@ -2035,7 +2035,7 @@ PICE_SYMBOLFILE_HEADER* LoadSymbols(LPSTR filename) if(pSymbols->magic == PICE_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,"ulOffsetToGlobals,ulSizeOfGlobals = %X,%X\n",pSymbols->ulOffsetToGlobals,pSymbols->ulSizeOfGlobals)); DPRINT((0,"ulOffsetToGlobalsStrings,ulSizeOfGlobalsStrings = %X,%X\n",pSymbols->ulOffsetToGlobalsStrings,pSymbols->ulSizeOfGlobalsStrings)); diff --git a/reactos/apps/utils/pice/module/syscall.h b/reactos/apps/utils/pice/module/syscall.h index f318b20dc29..d328d94cbb6 100644 --- a/reactos/apps/utils/pice/module/syscall.h +++ b/reactos/apps/utils/pice/module/syscall.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/trace.h b/reactos/apps/utils/pice/module/trace.h index 28e9369a4da..98f759a3552 100644 --- a/reactos/apps/utils/pice/module/trace.h +++ b/reactos/apps/utils/pice/module/trace.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/pice/module/vga.h b/reactos/apps/utils/pice/module/vga.h index 89e0c302c5d..ec3e1d798cb 100644 --- a/reactos/apps/utils/pice/module/vga.h +++ b/reactos/apps/utils/pice/module/vga.h @@ -15,7 +15,7 @@ Environment: LINUX 2.2.X Kernel mode only -Author: +Author: Klaus P. Gerlicher diff --git a/reactos/apps/utils/ps/ps.c b/reactos/apps/utils/ps/ps.c index 881431a0f2a..eec31179f95 100644 --- a/reactos/apps/utils/ps/ps.c +++ b/reactos/apps/utils/ps/ps.c @@ -36,7 +36,7 @@ static char* title2 = "w PID Hwnd WndStile TID WndName\n"; struct status { DWORD state; char desc[10]; -} thread_stat[8 + 1] = { +} thread_stat[8 + 1] = { {0, "Init "}, {1, "Ready "}, {2, "Running "}, @@ -51,7 +51,7 @@ struct status { struct waitres { DWORD state; char desc[11]; -} waitreason[28 + 1] = { +} waitreason[28 + 1] = { {0, "Executive "}, {1, "FreePage "}, {2, "PageIn "}, @@ -90,9 +90,9 @@ EnumThreadProc(HWND hwnd, LPARAM lp) LONG style; HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE); char buf[256]; - + GetWindowText(hwnd, (LPTSTR)lp, 30); - + if(hwnd != 0) { style = GetWindowLong(hwnd, GWL_STYLE); @@ -116,7 +116,7 @@ int main() NTSTATUS Status; char buf[256]; char buf1[256]; - + WriteFile(stdout, title, lstrlen(title), &r, NULL); WriteFile(stdout, title1, lstrlen(title1), &r, NULL); WriteFile(stdout, title2, lstrlen(title2), &r, NULL); @@ -153,7 +153,7 @@ int main() hour = (ptime.QuadPart / (10000000LL * 3600LL)); minute = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; seconds = (ptime.QuadPart / 10000000LL) % 60LL; - + ptime.QuadPart = CurrentProcess->UserTime.QuadPart; hour1 = (ptime.QuadPart / (10000000LL * 3600LL)); minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL; @@ -166,7 +166,7 @@ int main() hour, minute, seconds, hour1, minute1, seconds1, astring.Buffer); WriteFile(stdout, buf, lstrlen(buf), &r, NULL); - + RtlFreeAnsiString(&astring); for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++) @@ -193,7 +193,7 @@ int main() while (waitt->state != CurrentProcess->TH[ti].WaitReason && waitt->state >= 0) waitt++; - wsprintf (buf1, + wsprintf (buf1, "t% %8d %3d:%02d:%02d %3d:%02d:%02d %s %s\n", CurrentProcess->TH[ti].ClientId.UniqueThread, thour, tmin, tsec, thour1, tmin1, tsec1, @@ -206,6 +206,6 @@ int main() } CurrentProcess = (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess + CurrentProcess->NextEntryOffset); - } + } return (0); } diff --git a/reactos/apps/utils/rosperf/rosperf.c b/reactos/apps/utils/rosperf/rosperf.c index de47d6bec84..6d87e47ffdf 100644 --- a/reactos/apps/utils/rosperf/rosperf.c +++ b/reactos/apps/utils/rosperf/rosperf.c @@ -22,13 +22,13 @@ * * All Rights Reserved * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, * 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 * 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 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -88,7 +88,7 @@ ClearWindow(PPERF_INFO PerfInfo) UpdateWindow(PerfInfo->Wnd); } -static unsigned +static unsigned CalibrateTest(PTEST Test, PPERF_INFO PerfInfo) { #define GOAL 2500 /* Try to get up to 2.5 seconds */ @@ -127,7 +127,7 @@ CalibrateTest(PTEST Test, PPERF_INFO PerfInfo) 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 */ return DidReps; } @@ -165,7 +165,7 @@ CalibrateTest(PTEST Test, PPERF_INFO PerfInfo) return Reps; } -static void +static void DisplayStatus(HWND Label, LPCWSTR Message, LPCWSTR Test, int Try) { WCHAR Status[128]; @@ -176,7 +176,7 @@ DisplayStatus(HWND Label, LPCWSTR Message, LPCWSTR Test, int Try) UpdateWindow(Label); } -static double +static double RoundTo3Digits(double d) { /* 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; } -static void +static void ReportTimes(DWORD Time, int Reps, LPCWSTR Label, BOOL Average) { double MSecsPerObj, ObjsPerSec; @@ -236,7 +236,7 @@ ReportTimes(DWORD Time, int Reps, LPCWSTR Label, BOOL Average) allow averaging results from several repetitions. */ 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); } else @@ -281,7 +281,7 @@ ProcessTest(PTEST Test, PPERF_INFO PerfInfo) ReportTimes(Time, Reps, Test->Label, FALSE); (*Test->PassCleanup)(Context, PerfInfo); ProcessMessages(); - } + } (*Test->Cleanup)(Context, PerfInfo); ReportTimes(TotalTime, Repeat * Reps, Test->Label, TRUE); ProcessMessages(); @@ -367,9 +367,9 @@ PrintOSVersion(void) wprintf(L"Professional "); } } - + /* 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) { if (5 == VersionInfo.dwMajorVersion && 2 == VersionInfo.dwMinorVersion) @@ -460,7 +460,7 @@ PrintOSVersion(void) /* Display service pack (if any) and build number. */ - if (4 == VersionInfo.dwMajorVersion && + if (4 == VersionInfo.dwMajorVersion && 0 == lstrcmpiW(VersionInfo.szCSDVersion, L"Service Pack 6")) { /* Test for SP6 versus SP6a. */ @@ -500,7 +500,7 @@ PrintOSVersion(void) { wprintf(L"OSR2"); } - } + } else if (4 == VersionInfo.dwMajorVersion && 10 == VersionInfo.dwMinorVersion) { @@ -514,7 +514,7 @@ PrintOSVersion(void) else if (4 == VersionInfo.dwMajorVersion && 90 == VersionInfo.dwMinorVersion) { wprintf(L"Running on Microsoft Windows Millennium Edition"); - } + } wprintf(L"\n"); break; @@ -575,7 +575,7 @@ MainWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) EndPaint (Wnd, &Ps); Result = 0; break; - + default: Result = DefWindowProcW(Wnd, Msg, wParam, lParam); break; @@ -623,7 +623,7 @@ LabelWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) EndPaint (Wnd, &Ps); Result = 0; break; - + default: Result = DefWindowProcW(Wnd, Msg, wParam, lParam); break; @@ -857,7 +857,7 @@ ProcessCommandLine(PPERF_INFO PerfInfo, unsigned *TestCount, PTEST *Tests) return TRUE; } -int WINAPI +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, diff --git a/reactos/apps/utils/sc/command.c b/reactos/apps/utils/sc/command.c index 60066dd2cb4..1a49c713fe8 100644 --- a/reactos/apps/utils/sc/command.c +++ b/reactos/apps/utils/sc/command.c @@ -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); case SC_CMD_STOP: return sc_control(hSCManager, argv[0], SERVICE_CONTROL_STOP); - + // case SC_CMD_CONFIG: // case SC_CMD_DESCRIPTION: // case SC_CMD_CONTROL: diff --git a/reactos/apps/utils/sc/main.h b/reactos/apps/utils/sc/main.h index c1785710e37..b6771787937 100644 --- a/reactos/apps/utils/sc/main.h +++ b/reactos/apps/utils/sc/main.h @@ -1,5 +1,5 @@ /* - * ReactOS test program - + * ReactOS test program - * * main.h * diff --git a/reactos/apps/utils/sdkparse/assert.h b/reactos/apps/utils/sdkparse/assert.h index c638cf6aba5..f2f7ea41c3e 100644 --- a/reactos/apps/utils/sdkparse/assert.h +++ b/reactos/apps/utils/sdkparse/assert.h @@ -7,7 +7,7 @@ #ifndef _MFC_VER #ifdef _WIN32_WCE - + #else//_WIN32_WCE #include #endif//_WIN32_WCE diff --git a/reactos/apps/utils/sdkparse/test.h b/reactos/apps/utils/sdkparse/test.h index 9602f17b9ac..29f0cfa4bc1 100644 --- a/reactos/apps/utils/sdkparse/test.h +++ b/reactos/apps/utils/sdkparse/test.h @@ -249,7 +249,7 @@ PsaFreeCapture 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 */ void *PsaiMalloc(SIZE_T size); void *PsaiRealloc(void *ptr, SIZE_T size); diff --git a/reactos/apps/utils/stats/stats.c b/reactos/apps/utils/stats/stats.c index 33ab84f4ee3..970179ec119 100644 --- a/reactos/apps/utils/stats/stats.c +++ b/reactos/apps/utils/stats/stats.c @@ -9,7 +9,7 @@ */ #include #include -#include +#include typedef struct _EXTENSION_INFO { @@ -80,14 +80,14 @@ AddExtension(LPTSTR ExtName, ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO)); if (!ExtInfo) return NULL; - + for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1); ln = (DWORD)t - (DWORD)ExtName; - + ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO)); memcpy (ExtInfo->ExtName, ExtName, ln); _tcscpy (ExtInfo->Description, Description); - + for(t = ExtInfo->ExtName; *t != _T('\0'); t += _tcslen(t) + 1) { if(ExtInfo->nExtensions++ != 0) @@ -95,7 +95,7 @@ AddExtension(LPTSTR ExtName, _tcscat (ExtInfo->ExpandedExtName, _T("*.")); _tcscat (ExtInfo->ExpandedExtName, t); } - + if (ExtInfoList) { Info = ExtInfoList; @@ -201,7 +201,7 @@ ReadLines(PFILE_INFO StatInfo) static char FileBuffer[1024]; char LastChar = '\0'; char *Current; - + LineLen = 0; while(ReadFile (FileHandle, FileBuffer, sizeof(FileBuffer), &ReadBytes, NULL) && ReadBytes >= sizeof(char)) { @@ -226,7 +226,7 @@ ReadLines(PFILE_INFO StatInfo) LineLen++; } } - + StatInfo->LineCount += (LineLen > 0); StatInfo->EmptyLines += ((LastChar != '\0') && (LineLen == 0)); } @@ -245,16 +245,16 @@ PrintStatistics(VOID) TotalLineCount = 0; TotalEmptyLines = 0; Info = ExtInfoList; - + for (Info = ExtInfoList; Info != NULL; Info = Info->Next) { TotalFileCount += Info->FileCount; TotalLineCount += Info->LineCount; TotalEmptyLines += Info->EmptyLines; } - + TotalAvgLF = (TotalFileCount ? TotalLineCount / TotalFileCount : 0); - + for (Info = ExtInfoList; Info != NULL; Info = Info->Next) { DWORD AvgLF; @@ -325,16 +325,16 @@ ProcessFiles(LPTSTR Path) if (LoadFile (FileName)) { PFILE_INFO StatInfo; - + StatInfo = AddFile (FindFile.cFileName, Info); if (!StatInfo) { _tprintf (_T("Not enough free memory.\n")); return FALSE; } - + ReadLines (StatInfo); - + Info->FileCount++; Info->LineCount += StatInfo->LineCount; Info->EmptyLines += StatInfo->EmptyLines; @@ -434,7 +434,7 @@ IsOptionSet(TCHAR *Option) { if(!Options[i]) continue; - + if(!_tcscmp(Options[i], Option)) return TRUE; } @@ -465,7 +465,7 @@ main (int argc, char * argv []) AddExtension (_T("c\0\0"), _T("Ansi C Source files")); AddExtension (_T("cpp\0cxx\0\0"), _T("C++ Source files")); AddExtension (_T("h\0\0"), _T("Header files")); - + for(a = 1; a < argc - 1; a++) { #if UNICODE @@ -479,10 +479,10 @@ main (int argc, char * argv []) Options[a - 1] = argv[a]; #endif } - + SkipEmptyLines = IsOptionSet(_T("-e")); BeSilent = IsOptionSet(_T("-s")); - + #if UNICODE ZeroMemory(Path, sizeof(Path)); if(MultiByteToWideChar(CP_ACP, 0, argv[argc - 1], -1, Path, MAX_PATH) > 0) diff --git a/reactos/apps/utils/tickcount/tickcount.c b/reactos/apps/utils/tickcount/tickcount.c index 9ee52a43e0e..24177ff3107 100644 --- a/reactos/apps/utils/tickcount/tickcount.c +++ b/reactos/apps/utils/tickcount/tickcount.c @@ -30,7 +30,7 @@ uint64_ ticks_per_slice[] = { TICKS_YEAR, TICKS_MONTH, - TICKS_WEEK, + TICKS_WEEK, TICKS_DAY, TICKS_HOUR, TICKS_MINUTE, @@ -103,7 +103,7 @@ void print_uptime _T("and"), (unsigned)tick_cur, (tick_cur == 1 ? slice_names_singular : slice_names_plural)[curslice] - ); + ); } } else if(tick_cur != 0) @@ -139,9 +139,9 @@ void print_uptime int parse_print(const _TCHAR * str) { int64_ tickcount; - + tickcount = _ttoi64(str); - + if(tickcount < 0) tickcount = - tickcount; else if(tickcount == 0) diff --git a/reactos/apps/utils/winetest/gui.c b/reactos/apps/utils/winetest/gui.c index 89a310825a3..727ffe63764 100644 --- a/reactos/apps/utils/winetest/gui.c +++ b/reactos/apps/utils/winetest/gui.c @@ -138,7 +138,7 @@ guiStep (va_list ap) { const int pgID = IDC_ST0 + progressGroup * 2; char *str = vstrmake (NULL, ap); - + progressCurr++; SetDlgItemText (dialog, pgID, str); SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS, @@ -462,7 +462,7 @@ report (enum report_type t, ...) } } } - + va_start (ap, t); if (t < sizeof text_funcs / sizeof text_funcs[0] && t < sizeof GUI_funcs / sizeof GUI_funcs[0] && diff --git a/reactos/apps/utils/winetest/main.c b/reactos/apps/utils/winetest/main.c index 30f1cabb84c..2faf90733f4 100644 --- a/reactos/apps/utils/winetest/main.c +++ b/reactos/apps/utils/winetest/main.c @@ -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 struct rev_info* rev; - + for(rev = rev_infos; rev->file; 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)); 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."); if(!(p = strrchr(revinfo, ':'))) report (R_FATAL, "Revision info malformed (i=%d)", i); @@ -213,7 +213,7 @@ void* extract_rcdata (int id, int type, DWORD* size) HRSRC rsrc; HGLOBAL hdl; LPVOID addr; - + if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) || !(*size = SizeofResource (0, rsrc)) || !(hdl = LoadResource (0, rsrc)) || @@ -601,7 +601,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, } if (!submit) { if (reset_env && (putenv ("WINETEST_PLATFORM=windows") || - putenv ("WINETEST_DEBUG=1") || + putenv ("WINETEST_DEBUG=1") || putenv ("WINETEST_INTERACTIVE=0") || putenv ("WINETEST_REPORT_SUCCESS=0"))) report (R_FATAL, "Could not reset environment: %d", errno); -- 2.17.1