From c64c44c3165482c7ea8e6cda9e0c1e6349aa8dd7 Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Wed, 17 Dec 2003 01:46:08 +0000 Subject: [PATCH] - genntdll, shut up - fixed some forward exports in kernel32 - fixed a couple of embarassing bugs in my getopt implementation - fixed a warning in pipetools svn path=/trunk/; revision=7094 --- reactos/iface/native/genntdll.c | 4 ++-- reactos/lib/kernel32/kernel32.edf | 20 ++++++++++---------- reactos/lib/tgetopt/getopt.c | 10 ++++++---- reactos/tools/pipetools/piperead.cpp | 4 ++-- reactos/tools/pipetools/pipetunnel.cpp | 4 ++-- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/reactos/iface/native/genntdll.c b/reactos/iface/native/genntdll.c index 2bd47837470..68bec3cf2aa 100644 --- a/reactos/iface/native/genntdll.c +++ b/reactos/iface/native/genntdll.c @@ -1,4 +1,4 @@ -/* $Id: genntdll.c,v 1.12 2003/01/03 00:28:07 guido Exp $ +/* $Id: genntdll.c,v 1.13 2003/12/17 01:46:08 hyperion Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS version of ntdll @@ -22,7 +22,7 @@ #define PARAMETERIZED_LIBS -#define VERBOSE +/* #define VERBOSE */ #define INPUT_BUFFER_SIZE 255 diff --git a/reactos/lib/kernel32/kernel32.edf b/reactos/lib/kernel32/kernel32.edf index fe97f838395..46dd483eb59 100644 --- a/reactos/lib/kernel32/kernel32.edf +++ b/reactos/lib/kernel32/kernel32.edf @@ -1,4 +1,4 @@ -; $Id: kernel32.edf,v 1.30 2003/11/08 18:05:05 hyperion Exp $ +; $Id: kernel32.edf,v 1.31 2003/12/17 01:46:08 hyperion Exp $ ; ; kernel32.edf ; @@ -565,15 +565,15 @@ HeapWalk=HeapWalk@8 InitAtomTable=InitAtomTable@4 InitializeCriticalSection=InitializeCriticalSection@4 InitializeCriticalSectionAndSpinCount=InitializeCriticalSectionAndSpinCount@8 -InitializeSListHead=NTDLL.RtlInitializeSListHead@4 +InitializeSListHead=NTDLL.RtlInitializeSListHead InterlockedCompareExchange=InterlockedCompareExchange@12 InterlockedDecrement=InterlockedDecrement@4 InterlockedExchange=InterlockedExchange@8 InterlockedExchangeAdd=InterlockedExchangeAdd@8 -InterlockedFlushSList=NTDLL.RtlInterlockedFlushSList@4 +InterlockedFlushSList=NTDLL.RtlInterlockedFlushSList InterlockedIncrement=InterlockedIncrement@4 -InterlockedPopEntrySList=NTDLL.RtlInterlockedPopEntrySList@4 -InterlockedPushEntrySList=NTDLL.RtlInterlockedPushEntrySList@8 +InterlockedPopEntrySList=NTDLL.RtlInterlockedPopEntrySList +InterlockedPushEntrySList=NTDLL.RtlInterlockedPushEntrySList InvalidateConsoleDIBits=InvalidateConsoleDIBits@8 IsBadCodePtr=IsBadCodePtr@4 IsBadHugeReadPtr=IsBadHugeReadPtr@8 @@ -682,7 +682,7 @@ Process32NextW=Process32NextW@8 PulseEvent=PulseEvent@4 PurgeComm=PurgeComm@8 QueryActCtxW=QueryActCtxW@28 -QueryDepthSList=NTDLL.RtlQueryDepthSList@4 +QueryDepthSList=NTDLL.RtlQueryDepthSList QueryDosDeviceA=QueryDosDeviceA@12 QueryDosDeviceW=QueryDosDeviceW@12 QueryInformationJobObject=QueryInformationJobObject@20 @@ -724,7 +724,7 @@ RemoveDirectoryA=RemoveDirectoryA@4 RemoveDirectoryW=RemoveDirectoryW@4 ;RemoveLocalAlternateComputerNameA ;RemoveLocalAlternateComputerNameW -RemoveVectoredExceptionHandler=NTDLL.RtlRemoveVectoredExceptionHandler@4 +RemoveVectoredExceptionHandler=NTDLL.RtlRemoveVectoredExceptionHandler ReplaceFile=ReplaceFileW@24 ReplaceFileA=ReplaceFileA@24 ReplaceFileW=ReplaceFileW@24 @@ -734,7 +734,7 @@ ResetEvent=ResetEvent@4 ResetWriteWatch=ResetWriteWatch@8 RestoreLastError=RestoreLastError@4 ResumeThread=ResumeThread@4 -RtlCaptureContext=NTDLL.RtlCaptureContext@4 +RtlCaptureContext=NTDLL.RtlCaptureContext ;RtlCaptureStackBackTrace RtlFillMemory=NTDLL.RtlFillMemory RtlMoveMemory=NTDLL.RtlMoveMemory @@ -788,7 +788,7 @@ SetConsoleTextAttribute=SetConsoleTextAttribute@8 SetConsoleTitleA=SetConsoleTitleA@4 SetConsoleTitleW=SetConsoleTitleW@4 SetConsoleWindowInfo=SetConsoleWindowInfo@12 -SetCriticalSectionSpinCount=NTDLL.RtlSetCriticalSectionSpinCount@8 +SetCriticalSectionSpinCount=NTDLL.RtlSetCriticalSectionSpinCount SetCurrentDirectoryA=SetCurrentDirectoryA@4 SetCurrentDirectoryW=SetCurrentDirectoryW@4 SetDefaultCommConfigA=SetDefaultCommConfigA@12 @@ -900,7 +900,7 @@ VDMConsoleOperation=VDMConsoleOperation@8 VDMOperationStarted=VDMOperationStarted@4 VerLanguageNameA=VerLanguageNameA@12 VerLanguageNameW=VerLanguageNameW@12 -VerSetConditionMask=NTDLL.VerSetConditionMask@16 +VerSetConditionMask=NTDLL.VerSetConditionMask VerifyConsoleIoHandle=VerifyConsoleIoHandle@4 VerifyVersionInfoA=VerifyVersionInfoA@16 VerifyVersionInfoW=VerifyVersionInfoW@16 diff --git a/reactos/lib/tgetopt/getopt.c b/reactos/lib/tgetopt/getopt.c index 23f1edc025a..20fc2866a12 100644 --- a/reactos/lib/tgetopt/getopt.c +++ b/reactos/lib/tgetopt/getopt.c @@ -1,4 +1,4 @@ -/* $Id: getopt.c,v 1.1 2003/04/22 03:20:25 hyperion Exp $ +/* $Id: getopt.c,v 1.2 2003/12/17 01:46:08 hyperion Exp $ */ /* tgetopt -- POSIX-compliant implementation of getopt() with string-type-generic @@ -10,7 +10,8 @@ #include #include #include -#include + +#include "tgetopt.h" int _topterr = 1; int _toptind = 1; @@ -85,7 +86,7 @@ int _tgetopt(int argc, _TCHAR * const argv[], const _TCHAR * optstring) { /* print an error message */ if(_topterr && optstring[0] != _T(':')) - _ftprintf(stderr, _T("%s: illegal option -- %c\n"), argv[0], _toptopt);; + _ftprintf(stderr, _T("%s: illegal option -- %c\n"), argv[0], _toptopt); /* return an error */ return _T('?'); @@ -102,7 +103,7 @@ int _tgetopt(int argc, _TCHAR * const argv[], const _TCHAR * optstring) s_nArgChar = 0; /* this is the last argument */ - if(_toptopt >= argc) + if(_toptind >= argc) { /* print an error message */ if(_topterr && optstring[0] != _T(':')) @@ -122,6 +123,7 @@ int _tgetopt(int argc, _TCHAR * const argv[], const _TCHAR * optstring) /* return the argument */ _toptarg = argv[_toptind]; + ++ _toptind; } /* the rest of the argument is the argument of the option */ else diff --git a/reactos/tools/pipetools/piperead.cpp b/reactos/tools/pipetools/piperead.cpp index 17b4c294985..bac9e0eb6fb 100644 --- a/reactos/tools/pipetools/piperead.cpp +++ b/reactos/tools/pipetools/piperead.cpp @@ -21,9 +21,9 @@ #endif -static void print_error(LONG win32_error) +static void print_error(DWORD win32_error) { - fprintf(stderr, "WIN32 error %d\n", win32_error); + fprintf(stderr, "WIN32 error %lu\n", win32_error); } diff --git a/reactos/tools/pipetools/pipetunnel.cpp b/reactos/tools/pipetools/pipetunnel.cpp index dc714316f47..f7ac369db2c 100644 --- a/reactos/tools/pipetools/pipetunnel.cpp +++ b/reactos/tools/pipetools/pipetunnel.cpp @@ -32,9 +32,9 @@ #endif -static void print_error(LONG win32_error) +static void print_error(DWORD win32_error) { - fprintf(stderr, "WIN32 error %d\n", win32_error); + fprintf(stderr, "WIN32 error %lu\n", win32_error); }