mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Added missing printf() functions
Changed format %w to %S and %W to %wZ svn path=/trunk/; revision=931
This commit is contained in:
parent
de66c40007
commit
3d1f2d98ba
24 changed files with 203 additions and 172 deletions
|
@ -275,7 +275,7 @@ NTSTATUS Ext2OpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
PEXT2_FCB Fcb;
|
||||
ULONG StartIndex = 0;
|
||||
|
||||
DPRINT("Ext2OpenFile(DeviceExt %x, FileObject %x, FileName %w)\n",
|
||||
DPRINT("Ext2OpenFile(DeviceExt %x, FileObject %x, FileName %S)\n",
|
||||
DeviceExt,FileObject,FileName);
|
||||
|
||||
Fcb = ExAllocatePool(NonPagedPool, sizeof(EXT2_FCB));
|
||||
|
|
|
@ -53,7 +53,7 @@ ULONG MinixDirLookup(PMINIX_DEVICE_EXTENSION DeviceExt,
|
|||
unsigned int inode;
|
||||
PCCB Ccb = NULL;
|
||||
|
||||
DPRINT("MinixDirLookup(DeviceExt %x, dir %x, Name %w)\n",DeviceExt,dir,
|
||||
DPRINT("MinixDirLookup(DeviceExt %x, dir %x, Name %S)\n",DeviceExt,dir,
|
||||
Name);
|
||||
|
||||
for (i=0;i<(dir->i_size/MINIX_DIR_ENTRY_SIZE);i++)
|
||||
|
@ -111,7 +111,7 @@ NTSTATUS MinixOpen(PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
DeviceName = FileObject->FileName.Buffer;
|
||||
|
||||
DbgPrint("MinixOpen(DeviceObject %x, DeviceName %w, result %x)\n",
|
||||
DbgPrint("MinixOpen(DeviceObject %x, DeviceName %S, result %x)\n",
|
||||
DeviceObject,DeviceName,result);
|
||||
DPRINT("DeviceName %x\n",DeviceName);
|
||||
|
||||
|
@ -125,7 +125,7 @@ NTSTATUS MinixOpen(PDEVICE_OBJECT DeviceObject,
|
|||
{
|
||||
MinixReadInode(DeviceObject,DeviceExt,current_ino,¤t_dir);
|
||||
|
||||
DPRINT("current %w next %x\n",current,next);
|
||||
DPRINT("current %S next %x\n",current,next);
|
||||
|
||||
*next = '\\';
|
||||
current = next+1;
|
||||
|
@ -199,7 +199,7 @@ NTSTATUS MinixCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
MINIX_DEVICE_EXTENSION* DeviceExt;
|
||||
|
||||
DPRINT("MinixCreate(DeviceObject %x, Irp %x)\n",DeviceObject,Irp);
|
||||
DPRINT("Opening file %x %w\n",FileObject->FileName.Buffer,
|
||||
DPRINT("Opening file %x %S\n",FileObject->FileName.Buffer,
|
||||
FileObject->FileName.Buffer);
|
||||
DPRINT("FileObject->FileName.Buffer %x\n",
|
||||
FileObject->FileName.Buffer);
|
||||
|
|
|
@ -249,7 +249,7 @@ NTSTATUS MinixOpen(PDEVICE_OBJECT DeviceObject,
|
|||
struct minix_inode current_dir;
|
||||
unsigned int current_ino;
|
||||
|
||||
DbgPrint("MinixOpen(DeviceObject %x, DeviceName %w, result %x)\n",
|
||||
DbgPrint("MinixOpen(DeviceObject %x, DeviceName %S, result %x)\n",
|
||||
DeviceObject,DeviceName,result);
|
||||
DPRINT("DeviceName %x\n",DeviceName);
|
||||
|
||||
|
@ -262,7 +262,7 @@ NTSTATUS MinixOpen(PDEVICE_OBJECT DeviceObject,
|
|||
{
|
||||
MinixReadInode(DeviceObject,DeviceExt,current_ino,¤t_dir);
|
||||
|
||||
DPRINT("current %w next %x\n",current,next);
|
||||
DPRINT("current %S next %x\n",current,next);
|
||||
|
||||
*next = '\\';
|
||||
current = next+1;
|
||||
|
@ -387,7 +387,7 @@ NTSTATUS MinixCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
MINIX_DEVICE_EXTENSION* DeviceExt;
|
||||
|
||||
DPRINT("MinixCreate(DeviceObject %x, Irp %x)\n",DeviceObject,Irp);
|
||||
DPRINT("Opening file %x %w\n",FileObject->FileName.Buffer,
|
||||
DPRINT("Opening file %x %S\n",FileObject->FileName.Buffer,
|
||||
FileObject->FileName.Buffer);
|
||||
DPRINT("FileObject->FileName.Buffer %x\n",
|
||||
FileObject->FileName.Buffer);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.1 1999/12/11 21:14:48 dwelch Exp $
|
||||
/* $Id: create.c,v 1.2 2000/01/12 19:05:32 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -213,7 +213,7 @@ NTSTATUS FindFile(PDEVICE_EXTENSION DeviceExt, PVFATFCB Fcb,
|
|||
ULONG NextCluster;
|
||||
WCHAR TempStr[2];
|
||||
|
||||
DPRINT("FindFile(Parent %x, FileToFind '%w')\n",Parent,FileToFind);
|
||||
DPRINT("FindFile(Parent %x, FileToFind '%S')\n",Parent,FileToFind);
|
||||
|
||||
if (wcslen(FileToFind)==0)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ NTSTATUS FindFile(PDEVICE_EXTENSION DeviceExt, PVFATFCB Fcb,
|
|||
DPRINT("Parent->entry.FirstCluster %d\n",Parent->entry.FirstCluster);
|
||||
}
|
||||
|
||||
DPRINT("FindFile '%w'\n", FileToFind);
|
||||
DPRINT("FindFile '%S'\n", FileToFind);
|
||||
if (Parent == NULL||Parent->entry.FirstCluster==1)
|
||||
{
|
||||
CHECKPOINT;
|
||||
|
@ -294,7 +294,7 @@ NTSTATUS FindFile(PDEVICE_EXTENSION DeviceExt, PVFATFCB Fcb,
|
|||
}
|
||||
if (GetEntryName((PVOID)block,&i,name,&j,DeviceExt,&StartingSector))
|
||||
{
|
||||
DPRINT("Comparing '%w' '%w'\n",name,FileToFind);
|
||||
DPRINT("Comparing '%S' '%S'\n",name,FileToFind);
|
||||
if (wstrcmpjoki(name,FileToFind))
|
||||
{
|
||||
/* In the case of a long filename, the firstcluster is stored in
|
||||
|
@ -403,7 +403,7 @@ NTSTATUS FsdOpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
PLIST_ENTRY current_entry;
|
||||
KIRQL oldIrql;
|
||||
|
||||
DPRINT("FsdOpenFile(%08lx, %08lx, %w)\n",
|
||||
DPRINT("FsdOpenFile(%08lx, %08lx, %S)\n",
|
||||
DeviceExt,
|
||||
FileObject,
|
||||
FileName);
|
||||
|
@ -411,7 +411,7 @@ NTSTATUS FsdOpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
/* FIXME : treat relative name */
|
||||
if(FileObject->RelatedFileObject)
|
||||
{
|
||||
DbgPrint("try related for %w\n",FileName);
|
||||
DbgPrint("try related for %S\n",FileName);
|
||||
pRelFileObject=FileObject->RelatedFileObject;
|
||||
pRelCcb=pRelFileObject->FsContext2;
|
||||
assert(pRelCcb);
|
||||
|
@ -450,7 +450,7 @@ NTSTATUS FsdOpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
Fcb = CONTAINING_RECORD(current_entry, VFATFCB, FcbListEntry);
|
||||
|
||||
DPRINT("Scanning %x\n", Fcb);
|
||||
DPRINT("Scanning %w\n", Fcb->PathName);
|
||||
DPRINT("Scanning %S\n", Fcb->PathName);
|
||||
|
||||
if (DeviceExt==Fcb->pDevExt
|
||||
&& wstrcmpi(FileName,Fcb->PathName))
|
||||
|
@ -491,7 +491,7 @@ NTSTATUS FsdOpenFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
{
|
||||
*next=0;
|
||||
}
|
||||
DPRINT("current '%w'\n",current);
|
||||
DPRINT("current '%S'\n",current);
|
||||
Status = FindFile(DeviceExt,Fcb,ParentFcb,current,NULL,NULL);
|
||||
if (Status != STATUS_SUCCESS)
|
||||
{
|
||||
|
|
|
@ -248,7 +248,7 @@ NTSTATUS DoQuery(PDEVICE_OBJECT DeviceObject, PIRP Irp,PIO_STACK_LOCATION Stack)
|
|||
Buffer = MmGetSystemAddressForMdl(Irp->MdlAddress);
|
||||
else
|
||||
Buffer = Irp->UserBuffer;
|
||||
DPRINT("Buffer=%x tofind=%w\n",Buffer,pSearchPattern->Buffer);
|
||||
DPRINT("Buffer=%x tofind=%S\n",Buffer,pSearchPattern->Buffer);
|
||||
if (pSearchPattern==NULL)
|
||||
{
|
||||
star[0]='*';
|
||||
|
@ -263,7 +263,7 @@ NTSTATUS DoQuery(PDEVICE_OBJECT DeviceObject, PIRP Irp,PIO_STACK_LOCATION Stack)
|
|||
OldEntry=pCcb->StartEntry;
|
||||
if(OldSector)pCcb->StartEntry++;
|
||||
RC=FindFile(DeviceExt,&tmpFcb,pFcb,pCharPattern,&pCcb->StartSector,&pCcb->StartEntry);
|
||||
DPRINT("Found %w,RC=%x, sector %x entry %x\n",tmpFcb.ObjectName,RC
|
||||
DPRINT("Found %S,RC=%x, sector %x entry %x\n",tmpFcb.ObjectName,RC
|
||||
,pCcb->StartSector,pCcb->StartEntry);
|
||||
if (NT_SUCCESS(RC))
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ NTSTATUS updEntry(PDEVICE_EXTENSION DeviceExt,PFILE_OBJECT pFileObject)
|
|||
if(FileName[0]==0 && DirName[0]==0)
|
||||
return STATUS_SUCCESS;//root : nothing to do ?
|
||||
memset(&FileObject,0,sizeof(FILE_OBJECT));
|
||||
DPRINT("open directory %w for update of entry %w\n",DirName,FileName);
|
||||
DPRINT("open directory %S for update of entry %S\n",DirName,FileName);
|
||||
status=FsdOpenFile(DeviceExt,&FileObject,DirName);
|
||||
pDirCcb=(PVFATCCB)FileObject.FsContext2;
|
||||
assert(pDirCcb);
|
||||
|
@ -95,7 +95,7 @@ NTSTATUS addEntry(PDEVICE_EXTENSION DeviceExt
|
|||
KIRQL oldIrql;
|
||||
|
||||
PathFileName=pFileObject->FileName.Buffer;
|
||||
DPRINT("addEntry: Pathname=%w\n",PathFileName);
|
||||
DPRINT("addEntry: Pathname=%S\n",PathFileName);
|
||||
//find last \ in PathFileName
|
||||
posCar=-1;
|
||||
for(i=0;PathFileName[i];i++)
|
||||
|
|
|
@ -255,7 +255,7 @@ VOID DbgPrintErrorMessage(NTSTATUS ErrorCode)
|
|||
UNICODE_STRING ErrorText;
|
||||
|
||||
DbgGetErrorText(ErrorCode, &ErrorText, 0xf);
|
||||
DbgPrint("%W\n", &ErrorText);
|
||||
DbgPrint("%wZ\n", &ErrorText);
|
||||
RtlFreeUnicodeString(&ErrorText);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ NTSTATUS IopCreateFile(PVOID ObjectBody,
|
|||
PFILE_OBJECT FileObject = (PFILE_OBJECT)ObjectBody;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("IopCreateFile(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("IopCreateFile(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody,Parent,RemainingPath);
|
||||
|
||||
if (DeviceObject == NULL)
|
||||
|
@ -116,7 +116,7 @@ NTSTATUS IopCreateFile(PVOID ObjectBody,
|
|||
}
|
||||
RtlInitUnicodeString(&(FileObject->FileName),wcsdup(RemainingPath));
|
||||
}
|
||||
DPRINT("FileObject->FileName.Buffer %w\n",FileObject->FileName.Buffer);
|
||||
DPRINT("FileObject->FileName.Buffer %S\n",FileObject->FileName.Buffer);
|
||||
FileObject->DeviceObject = DeviceObject;
|
||||
DPRINT("FileObject %x DeviceObject %x\n", FileObject, DeviceObject);
|
||||
FileObject->Vpb = DeviceObject->Vpb;
|
||||
|
@ -205,7 +205,7 @@ NtCreateFile (
|
|||
PIO_STACK_LOCATION StackLoc;
|
||||
|
||||
DPRINT("NtCreateFile(FileHandle %x, DesiredAccess %x, "
|
||||
"ObjectAttributes %x ObjectAttributes->ObjectName->Buffer %w)\n",
|
||||
"ObjectAttributes %x ObjectAttributes->ObjectName->Buffer %S)\n",
|
||||
FileHandle,DesiredAccess,ObjectAttributes,
|
||||
ObjectAttributes->ObjectName->Buffer);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: device.c,v 1.13 1999/11/24 11:51:50 dwelch Exp $
|
||||
/* $Id: device.c,v 1.14 2000/01/12 19:02:40 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -189,7 +189,7 @@ NTSTATUS IopCreateDevice(PVOID ObjectBody,
|
|||
POBJECT_ATTRIBUTES ObjectAttributes)
|
||||
{
|
||||
|
||||
DPRINT("IopCreateDevice(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("IopCreateDevice(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody, Parent, RemainingPath);
|
||||
|
||||
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
|
||||
|
@ -239,7 +239,7 @@ NTSTATUS IoCreateDevice(PDRIVER_OBJECT DriverObject,
|
|||
|
||||
if (DeviceName != NULL)
|
||||
{
|
||||
DPRINT("IoCreateDevice(DriverObject %x, DeviceName %w)\n",DriverObject,
|
||||
DPRINT("IoCreateDevice(DriverObject %x, DeviceName %S)\n",DriverObject,
|
||||
DeviceName->Buffer);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: symlink.c,v 1.9 1999/08/29 06:59:08 ea Exp $
|
||||
/* $Id: symlink.c,v 1.10 2000/01/12 19:02:40 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -324,7 +324,7 @@ IoCreateSymbolicLink (
|
|||
assert_irql(PASSIVE_LEVEL);
|
||||
|
||||
DPRINT(
|
||||
"IoCreateSymbolicLink(SymbolicLinkName %w, DeviceName %w)\n",
|
||||
"IoCreateSymbolicLink(SymbolicLinkName %S, DeviceName %S)\n",
|
||||
SymbolicLinkName->Buffer,
|
||||
DeviceName->Buffer
|
||||
);
|
||||
|
@ -362,7 +362,7 @@ IoCreateSymbolicLink (
|
|||
DeviceName
|
||||
);
|
||||
|
||||
DPRINT("DeviceName %w\n", SymbolicLink->TargetName.Buffer);
|
||||
DPRINT("DeviceName %S\n", SymbolicLink->TargetName.Buffer);
|
||||
|
||||
InitializeObjectAttributes(
|
||||
& (SymbolicLink->Target),
|
||||
|
|
|
@ -146,7 +146,7 @@ static void print_address(PVOID address)
|
|||
if (address >= current->Base &&
|
||||
address < (current->Base + current->Length))
|
||||
{
|
||||
DbgPrint("<%w: %x>", current->Name,
|
||||
DbgPrint("<%S: %x>", current->Name,
|
||||
address - current->Base);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ NTSTATUS LdrLoadImage(HANDLE ProcessHandle,
|
|||
NULL
|
||||
);
|
||||
DPRINT(
|
||||
"Opening image file %w\n",
|
||||
"Opening image file %S\n",
|
||||
FileObjectAttributes.ObjectName->Buffer
|
||||
);
|
||||
Status = ZwOpenFile(
|
||||
|
@ -649,7 +649,7 @@ NTSTATUS LdrLoadInitialProcess (VOID)
|
|||
Status = LdrLoadImage(ProcessHandle, &ProcessName);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("Failed to load %W\n",&ProcessName);
|
||||
DbgPrint("Failed to load %wZ\n",&ProcessName);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: loader.c,v 1.41 1999/12/22 14:48:24 dwelch Exp $
|
||||
/* $Id: loader.c,v 1.42 2000/01/12 19:03:27 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -115,7 +115,7 @@ VOID LdrInitModuleManagement(VOID)
|
|||
0,
|
||||
NULL,
|
||||
NULL);
|
||||
DPRINT("Create dir: %W\n", &ModuleName);
|
||||
DPRINT("Create dir: %wZ\n", &ModuleName);
|
||||
Status = ZwCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
|
||||
assert(NT_SUCCESS(Status));
|
||||
|
||||
|
@ -124,7 +124,7 @@ VOID LdrInitModuleManagement(VOID)
|
|||
wcscat(NameBuffer, L"ntoskrnl.exe");
|
||||
ModuleName.Length = ModuleName.MaximumLength = wcslen(NameBuffer);
|
||||
ModuleName.Buffer = NameBuffer;
|
||||
DPRINT("Kernel's Module name is: %W\n", &ModuleName);
|
||||
DPRINT("Kernel's Module name is: %wZ\n", &ModuleName);
|
||||
|
||||
/* Initialize ObjectAttributes for ModuleObject */
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
|
@ -174,7 +174,7 @@ static VOID LdrLoadAutoConfigDriver (LPWSTR RelativeDriverName)
|
|||
NTSTATUS Status;
|
||||
UNICODE_STRING DriverName;
|
||||
|
||||
DbgPrint("Loading %w\n",RelativeDriverName);
|
||||
DbgPrint("Loading %S\n",RelativeDriverName);
|
||||
|
||||
LdrGetSystemDirectory(TmpFileName, (MAX_PATH * sizeof(WCHAR)));
|
||||
wcscat(TmpFileName, L"\\drivers\\");
|
||||
|
@ -223,7 +223,7 @@ LdrCreateModule(PVOID ObjectBody,
|
|||
PWSTR RemainingPath,
|
||||
POBJECT_ATTRIBUTES ObjectAttributes)
|
||||
{
|
||||
DPRINT("LdrCreateModule(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("LdrCreateModule(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody,
|
||||
Parent,
|
||||
RemainingPath);
|
||||
|
@ -281,7 +281,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
|||
return ModuleObject;
|
||||
}
|
||||
|
||||
DPRINT("Loading Module %W...\n", Filename);
|
||||
DPRINT("Loading Module %wZ...\n", Filename);
|
||||
|
||||
/* Open the Module */
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
|
@ -297,7 +297,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
|||
CHECKPOINT;
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("Could not open module file: %W\n", Filename);
|
||||
DbgPrint("Could not open module file: %wZ\n", Filename);
|
||||
return 0;
|
||||
}
|
||||
CHECKPOINT;
|
||||
|
@ -437,7 +437,7 @@ LdrOpenModule(PUNICODE_STRING Filename)
|
|||
CHECKPOINT;
|
||||
if (NT_SUCCESS(Status) && (RemainingPath == NULL || *RemainingPath == 0))
|
||||
{
|
||||
DPRINT("Module %W at %p\n", Filename, ModuleObject);
|
||||
DPRINT("Module %wZ at %p\n", Filename, ModuleObject);
|
||||
|
||||
return ModuleObject;
|
||||
}
|
||||
|
@ -679,11 +679,11 @@ LdrPEProcessModule(PVOID ModuleLoadBase, PUNICODE_STRING pModuleName)
|
|||
NameBuffer[Idx + Idx2] = 0;
|
||||
ModuleName.Length = ModuleName.MaximumLength = wcslen(NameBuffer);
|
||||
ModuleName.Buffer = NameBuffer;
|
||||
DPRINT("Import module: %W\n", &ModuleName);
|
||||
DPRINT("Import module: %wZ\n", &ModuleName);
|
||||
LibraryModuleObject = LdrLoadModule(&ModuleName);
|
||||
if (LibraryModuleObject == 0)
|
||||
{
|
||||
DbgPrint("Unknown import module: %W\n", &ModuleName);
|
||||
DbgPrint("Unknown import module: %wZ\n", &ModuleName);
|
||||
}
|
||||
/* Get the import address list */
|
||||
ImportAddressList = (PVOID *) ((DWORD)DriverBase +
|
||||
|
@ -766,7 +766,7 @@ LdrPEProcessModule(PVOID ModuleLoadBase, PUNICODE_STRING pModuleName)
|
|||
}
|
||||
ModuleName.Length = ModuleName.MaximumLength = wcslen(NameBuffer);
|
||||
ModuleName.Buffer = NameBuffer;
|
||||
DbgPrint("Module name is: %W\n", &ModuleName);
|
||||
DbgPrint("Module name is: %wZ\n", &ModuleName);
|
||||
|
||||
/* Initialize ObjectAttributes for ModuleObject */
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: section.c,v 1.21 1999/12/30 01:51:39 dwelch Exp $
|
||||
/* $Id: section.c,v 1.22 2000/01/12 19:03:42 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -81,7 +81,7 @@ NTSTATUS MmpCreateSection(PVOID ObjectBody,
|
|||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("MmpCreateDevice(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("MmpCreateDevice(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody, Parent, RemainingPath);
|
||||
|
||||
if (RemainingPath == NULL)
|
||||
|
|
|
@ -28,7 +28,7 @@ NTSTATUS NtpCreateEvent(PVOID ObjectBody,
|
|||
POBJECT_ATTRIBUTES ObjectAttributes)
|
||||
{
|
||||
|
||||
DPRINT("NtpCreateDevice(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("NtpCreateDevice(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody, Parent, RemainingPath);
|
||||
|
||||
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
|
||||
|
|
|
@ -27,7 +27,7 @@ NTSTATUS NtpCreateSemaphore(PVOID ObjectBody,
|
|||
POBJECT_ATTRIBUTES ObjectAttributes)
|
||||
{
|
||||
|
||||
DPRINT("NtpCreateSemaphore(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("NtpCreateSemaphore(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody, Parent, RemainingPath);
|
||||
|
||||
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: port.c,v 1.15 1999/12/30 01:51:40 dwelch Exp $
|
||||
/* $Id: port.c,v 1.16 2000/01/12 19:04:01 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -265,7 +265,7 @@ NTSTATUS STDCALL NtConnectPort (OUT PHANDLE ConnectedPort,
|
|||
KIRQL oldIrql;
|
||||
|
||||
DPRINT("PortName %x\n", PortName);
|
||||
DPRINT("NtConnectPort(PortName %w)\n", PortName->Buffer);
|
||||
DPRINT("NtConnectPort(PortName %S)\n", PortName->Buffer);
|
||||
|
||||
/*
|
||||
* Copy in user parameters
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.def,v 1.38 2000/01/10 22:46:37 ea Exp $
|
||||
; $Id: ntoskrnl.def,v 1.39 2000/01/12 19:01:56 ekohl Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -392,7 +392,7 @@ ZwYieldExecution@0
|
|||
_itoa
|
||||
;_local_unwind2
|
||||
;_purecall
|
||||
;_snprintf
|
||||
_snprintf
|
||||
;_snwprintf
|
||||
_stricmp
|
||||
_strlwr
|
||||
|
@ -401,7 +401,7 @@ _strnset
|
|||
_strrev
|
||||
_strset
|
||||
_strupr
|
||||
;_vsnprintf
|
||||
_vsnprintf
|
||||
_wcsicmp
|
||||
_wcslwr
|
||||
_wcsnicmp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.edf,v 1.25 2000/01/10 22:46:37 ea Exp $
|
||||
; $Id: ntoskrnl.edf,v 1.26 2000/01/12 19:01:56 ekohl Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -390,7 +390,7 @@ ZwYieldExecution=ZwYieldExecution@0
|
|||
_itoa
|
||||
;_local_unwind2
|
||||
;_purecall
|
||||
;_snprintf
|
||||
_snprintf
|
||||
;_snwprintf
|
||||
_stricmp
|
||||
_strlwr
|
||||
|
@ -399,7 +399,7 @@ _strnset
|
|||
_strrev
|
||||
_strset
|
||||
_strupr
|
||||
;_vsnprintf
|
||||
_vsnprintf
|
||||
_wcsicmp
|
||||
_wcslwr
|
||||
_wcsnicmp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dirobj.c,v 1.6 1999/11/27 03:31:08 ekohl Exp $
|
||||
/* $Id: dirobj.c,v 1.7 2000/01/12 19:04:22 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -202,7 +202,7 @@ NtQueryDirectoryObject (
|
|||
Entry
|
||||
);
|
||||
DPRINT(
|
||||
"Scanning %w\n",
|
||||
"Scanning %S\n",
|
||||
current->Name.Buffer
|
||||
);
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ PVOID ObpFindEntryDirectory(PDIRECTORY_OBJECT DirectoryObject,
|
|||
PLIST_ENTRY current = DirectoryObject->head.Flink;
|
||||
POBJECT_HEADER current_obj;
|
||||
|
||||
DPRINT("ObDirLookup(dir %x, name %w)\n",DirectoryObject, Name);
|
||||
DPRINT("ObDirLookup(dir %x, name %S)\n",DirectoryObject, Name);
|
||||
|
||||
if (Name[0]==0)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ PVOID ObpFindEntryDirectory(PDIRECTORY_OBJECT DirectoryObject,
|
|||
while (current!=(&(DirectoryObject->head)))
|
||||
{
|
||||
current_obj = CONTAINING_RECORD(current,OBJECT_HEADER,Entry);
|
||||
DPRINT("Scanning %w %w\n",current_obj->Name.Buffer, Name);
|
||||
DPRINT("Scanning %S %S\n",current_obj->Name.Buffer, Name);
|
||||
if (Attributes & OBJ_CASE_INSENSITIVE)
|
||||
{
|
||||
if (_wcsicmp(current_obj->Name.Buffer, Name)==0)
|
||||
|
@ -134,7 +134,7 @@ PVOID ObpParseDirectory(PVOID Object, PWSTR* Path)
|
|||
PWSTR end;
|
||||
PVOID FoundObject;
|
||||
|
||||
DPRINT("ObpParseDirectory(Object %x, Path %x, *Path %w)\n",
|
||||
DPRINT("ObpParseDirectory(Object %x, Path %x, *Path %S)\n",
|
||||
Object,Path,*Path);
|
||||
|
||||
if ((*Path) == NULL)
|
||||
|
@ -184,7 +184,7 @@ NTSTATUS ObpCreateDirectory(PVOID ObjectBody,
|
|||
{
|
||||
PDIRECTORY_OBJECT DirectoryObject = (PDIRECTORY_OBJECT)ObjectBody;
|
||||
|
||||
DPRINT("ObpCreateDirectory(ObjectBody %x, Parent %x, RemainingPath %w)\n",
|
||||
DPRINT("ObpCreateDirectory(ObjectBody %x, Parent %x, RemainingPath %S)\n",
|
||||
ObjectBody, Parent, RemainingPath);
|
||||
|
||||
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
|
||||
|
|
|
@ -107,7 +107,7 @@ NTSTATUS ObFindObject(POBJECT_ATTRIBUTES ObjectAttributes,
|
|||
|
||||
while (TRUE)
|
||||
{
|
||||
DPRINT("current %w\n",current);
|
||||
DPRINT("current %S\n",current);
|
||||
CurrentHeader = BODY_TO_HEADER(CurrentObject);
|
||||
if (CurrentHeader->ObjectType->Parse == NULL)
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ PVOID ObCreateObject(PHANDLE Handle,
|
|||
if (ObjectAttributes != NULL &&
|
||||
ObjectAttributes->ObjectName != NULL)
|
||||
{
|
||||
DPRINT("ObjectAttributes->ObjectName->Buffer %w\n",
|
||||
DPRINT("ObjectAttributes->ObjectName->Buffer %S\n",
|
||||
ObjectAttributes->ObjectName->Buffer);
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ NTSTATUS ObReferenceObjectByPointer(PVOID ObjectBody,
|
|||
|
||||
if (ObjectType != NULL && ObjectHeader->ObjectType != ObjectType)
|
||||
{
|
||||
DPRINT("Failed %x (type was %x %w) should %x\n",
|
||||
DPRINT("Failed %x (type was %x %S) should %x\n",
|
||||
ObjectHeader,
|
||||
ObjectHeader->ObjectType,
|
||||
ObjectHeader->ObjectType->TypeName.Buffer,
|
||||
|
|
|
@ -13,48 +13,20 @@
|
|||
* Appropiated for the reactos kernel, March 1998 -- David Welch
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
|
||||
{
|
||||
unsigned long result = 0,value;
|
||||
|
||||
if (!base) {
|
||||
base = 10;
|
||||
if (*cp == '0') {
|
||||
base = 8;
|
||||
cp++;
|
||||
if ((*cp == 'x') && isxdigit(cp[1])) {
|
||||
cp++;
|
||||
base = 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
|
||||
? toupper(*cp) : *cp)-'A'+10) < base) {
|
||||
result = result*base + value;
|
||||
cp++;
|
||||
}
|
||||
if (endp)
|
||||
*endp = (char *)cp;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* we use this so that we can do without the ctype library */
|
||||
#define is_digit(c) ((c) >= '0' && (c) <= '9')
|
||||
|
||||
static int skip_atoi(const char **s)
|
||||
{
|
||||
int i=0;
|
||||
|
||||
while (is_digit(**s))
|
||||
while (isdigit(**s))
|
||||
i = i*10 + *((*s)++) - '0';
|
||||
return i;
|
||||
}
|
||||
|
@ -73,8 +45,8 @@ __res = ((unsigned long) n) % (unsigned) base; \
|
|||
n = ((unsigned long) n) / (unsigned) base; \
|
||||
__res; })
|
||||
|
||||
static char * number(char * str, long num, int base, int size, int precision
|
||||
,int type)
|
||||
static char *
|
||||
number (char * str, long num, int base, int size, int precision, int type)
|
||||
{
|
||||
char c,sign,tmp[66];
|
||||
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
|
@ -86,8 +58,10 @@ static char * number(char * str, long num, int base, int size, int precision
|
|||
type &= ~ZEROPAD;
|
||||
if (base < 2 || base > 36)
|
||||
return 0;
|
||||
|
||||
c = (type & ZEROPAD) ? '0' : ' ';
|
||||
sign = 0;
|
||||
|
||||
if (type & SIGN) {
|
||||
if (num < 0) {
|
||||
sign = '-';
|
||||
|
@ -101,12 +75,14 @@ static char * number(char * str, long num, int base, int size, int precision
|
|||
size--;
|
||||
}
|
||||
}
|
||||
|
||||
if (type & SPECIAL) {
|
||||
if (base == 16)
|
||||
size -= 2;
|
||||
else if (base == 8)
|
||||
size--;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
if (num == 0)
|
||||
tmp[i++]='0';
|
||||
|
@ -140,7 +116,7 @@ static char * number(char * str, long num, int base, int size, int precision
|
|||
return str;
|
||||
}
|
||||
|
||||
int vsprintf(char *buf, const char *fmt, va_list args)
|
||||
int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args)
|
||||
{
|
||||
int len;
|
||||
unsigned long num;
|
||||
|
@ -148,7 +124,6 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
char * str;
|
||||
const char *s;
|
||||
const short int* sw;
|
||||
PUNICODE_STRING pus;
|
||||
|
||||
int flags; /* flags to number() */
|
||||
|
||||
|
@ -177,7 +152,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
|
||||
/* get field width */
|
||||
field_width = -1;
|
||||
if (is_digit(*fmt))
|
||||
if (isdigit(*fmt))
|
||||
field_width = skip_atoi(&fmt);
|
||||
else if (*fmt == '*') {
|
||||
++fmt;
|
||||
|
@ -193,7 +168,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
precision = -1;
|
||||
if (*fmt == '.') {
|
||||
++fmt;
|
||||
if (is_digit(*fmt))
|
||||
if (isdigit(*fmt))
|
||||
precision = skip_atoi(&fmt);
|
||||
else if (*fmt == '*') {
|
||||
++fmt;
|
||||
|
@ -206,7 +181,8 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
|
||||
/* get the conversion qualifier */
|
||||
qualifier = -1;
|
||||
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
|
||||
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w' ||
|
||||
(*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4')) {
|
||||
qualifier = *fmt;
|
||||
++fmt;
|
||||
}
|
||||
|
@ -219,52 +195,24 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
if (!(flags & LEFT))
|
||||
while (--field_width > 0)
|
||||
*str++ = ' ';
|
||||
if (qualifier == 'l' || qualifier == 'w')
|
||||
*str++ = (unsigned char) va_arg(args, wchar_t);
|
||||
else
|
||||
*str++ = (unsigned char) va_arg(args, int);
|
||||
while (--field_width > 0)
|
||||
*str++ = ' ';
|
||||
continue;
|
||||
|
||||
case 'w':
|
||||
sw = va_arg(args,short int *);
|
||||
// DPRINT("L %x\n",sw);
|
||||
if (sw==NULL)
|
||||
{
|
||||
// CHECKPOINT;
|
||||
s = "<NULL>";
|
||||
while ((*s)!=0)
|
||||
{
|
||||
*str++ = *s++;
|
||||
}
|
||||
// CHECKPOINT;
|
||||
// DbgPrint("str %x\n",str);
|
||||
}
|
||||
case 'C':
|
||||
if (!(flags & LEFT))
|
||||
while (--field_width > 0)
|
||||
*str++ = ' ';
|
||||
if (qualifier == 'h')
|
||||
*str++ = (unsigned char) va_arg(args, int);
|
||||
else
|
||||
{
|
||||
while ((*sw)!=0)
|
||||
{
|
||||
*str++ = (char)(*sw++);
|
||||
}
|
||||
}
|
||||
// CHECKPOINT;
|
||||
continue;
|
||||
|
||||
case 'W':
|
||||
pus = va_arg(args, PUNICODE_STRING);
|
||||
if (pus == NULL)
|
||||
{
|
||||
s = "<NULL>";
|
||||
while ((*s) != 0)
|
||||
{
|
||||
*str++ = *s++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
||||
{
|
||||
*str++ = (char)(pus->Buffer[i]);
|
||||
}
|
||||
}
|
||||
*str++ = (unsigned char) va_arg(args, wchar_t);
|
||||
while (--field_width > 0)
|
||||
*str++ = ' ';
|
||||
continue;
|
||||
|
||||
case 's':
|
||||
|
@ -283,6 +231,75 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
*str++ = ' ';
|
||||
continue;
|
||||
|
||||
/*
|
||||
case 'w':
|
||||
sw = va_arg(args,short int *);
|
||||
// DPRINT("L %x\n",sw);
|
||||
if (sw==NULL) {
|
||||
// CHECKPOINT;
|
||||
s = "<NULL>";
|
||||
while ((*s)!=0)
|
||||
*str++ = *s++;
|
||||
// CHECKPOINT;
|
||||
// DbgPrint("str %x\n",str);
|
||||
} else {
|
||||
while ((*sw)!=0)
|
||||
*str++ = (char)(*sw++);
|
||||
}
|
||||
// CHECKPOINT;
|
||||
continue;
|
||||
*/
|
||||
|
||||
case 'S':
|
||||
sw = va_arg(args,short int *);
|
||||
if (sw==NULL) {
|
||||
s = "<NULL>";
|
||||
while ((*s)!=0)
|
||||
*str++ = *s++;
|
||||
} else {
|
||||
while ((*sw)!=0)
|
||||
*str++ = (char)(*sw++);
|
||||
}
|
||||
continue;
|
||||
|
||||
/*
|
||||
case 'W':
|
||||
pus = va_arg(args, PUNICODE_STRING);
|
||||
if (pus == NULL) {
|
||||
s = "<NULL>";
|
||||
while ((*s) != 0)
|
||||
*str++ = *s++;
|
||||
} else {
|
||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
||||
*str++ = (char)(pus->Buffer[i]);
|
||||
}
|
||||
continue;
|
||||
*/
|
||||
|
||||
case 'Z':
|
||||
if (qualifier == 'w') {
|
||||
PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING);
|
||||
if (pus == NULL) {
|
||||
s = "<NULL>";
|
||||
while ((*s) != 0)
|
||||
*str++ = *s++;
|
||||
} else {
|
||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
||||
*str++ = (char)(pus->Buffer[i]);
|
||||
}
|
||||
} else {
|
||||
PANSI_STRING pus = va_arg(args, PANSI_STRING);
|
||||
if (pus == NULL) {
|
||||
s = "<NULL>";
|
||||
while ((*s) != 0)
|
||||
*str++ = *s++;
|
||||
} else {
|
||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
||||
*str++ = pus->Buffer[i];
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
case 'p':
|
||||
if (field_width == -1) {
|
||||
field_width = 2 * sizeof(void *);
|
||||
|
@ -293,7 +310,6 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
field_width, precision, flags);
|
||||
continue;
|
||||
|
||||
|
||||
case 'n':
|
||||
if (qualifier == 'l') {
|
||||
long * ip = va_arg(args, long *);
|
||||
|
@ -334,19 +350,17 @@ int vsprintf(char *buf, const char *fmt, va_list args)
|
|||
--fmt;
|
||||
continue;
|
||||
}
|
||||
if (qualifier == 'l') {
|
||||
if (qualifier == 'l')
|
||||
num = va_arg(args, unsigned long);
|
||||
} else if (qualifier == 'h') {
|
||||
if (flags & SIGN) {
|
||||
else if (qualifier == 'h')
|
||||
if (flags & SIGN)
|
||||
num = va_arg(args, short);
|
||||
} else {
|
||||
else
|
||||
num = va_arg(args, unsigned short);
|
||||
}
|
||||
} else if (flags & SIGN) {
|
||||
else if (flags & SIGN)
|
||||
num = va_arg(args, int);
|
||||
} else {
|
||||
else
|
||||
num = va_arg(args, unsigned int);
|
||||
}
|
||||
str = number(str, num, base, field_width, precision, flags);
|
||||
}
|
||||
*str = '\0';
|
||||
|
@ -359,8 +373,25 @@ int sprintf(char * buf, const char *fmt, ...)
|
|||
int i;
|
||||
|
||||
va_start(args, fmt);
|
||||
i=vsprintf(buf,fmt,args);
|
||||
i=_vsnprintf(buf,INT_MAX,fmt,args);
|
||||
va_end(args);
|
||||
return i;
|
||||
}
|
||||
|
||||
int _snprintf(char * buf, size_t cnt, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
int i;
|
||||
|
||||
va_start(args, fmt);
|
||||
i=_vsnprintf(buf,cnt,fmt,args);
|
||||
va_end(args);
|
||||
return i;
|
||||
}
|
||||
|
||||
int vsprintf(char *buf, const char *fmt, va_list args)
|
||||
{
|
||||
return _vsnprintf(buf,INT_MAX,fmt,args);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -148,7 +148,7 @@ int wcscmp(const wchar_t *cs, const wchar_t *ct)
|
|||
wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2)
|
||||
{
|
||||
wchar_t* s = str1;
|
||||
DPRINT("wcscpy(str1 %w, str2 %w)\n",str1,str2);
|
||||
DPRINT("wcscpy(str1 %S, str2 %S)\n",str1,str2);
|
||||
while ((*str2)!=0)
|
||||
{
|
||||
*s = *str2;
|
||||
|
|
Loading…
Reference in a new issue