Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.6 KiB

  1. #ifndef __EFI_STRING_UTILS__
  2. #define __EFI_STRING_UTILS__
  3. /*++
  4. Copyright (c) 1999-2000 Microsoft Corporation
  5. Module Name:
  6. efistrutil.hxx
  7. Abstract:
  8. This contains definitions and constants for the string functions not supplied by EFI
  9. that the utilities libraires use and that we don't want to link to MS runtimes.
  10. Revision History:
  11. --*/
  12. // the EFI library function names don't look like CRT function names.
  13. #include <efi.h>
  14. #include <efilib.h>
  15. #include <stdarg.h>
  16. #define _wcsicmp (INT32)StriCmp
  17. #define wcscmp (INT32)StrCmp
  18. #define wcslen(a) (UINT32)StrLen((WCHAR*)(a))
  19. #define wcscpy StrCpy
  20. #define strlen(a) (UINT32)strlena((CHAR8*)(a))
  21. #define strcmp(a,b) (UINT32)strcmpa((CHAR8*)(a),(CHAR8*)(b))
  22. #define strncmp strncmpa
  23. #define memset( a, b, c ) SetMem( a, c, b )
  24. #define memcmp CompareMem
  25. #define memcpy(a,b,c) CopyMem(a,(VOID*)(b),c)
  26. void *memmove( void *dest, const void *src, size_t count );
  27. char *strcpy( char *strDestination, const char *strSource );
  28. int iswspace( WCHAR c );
  29. int isspace( CHAR c );
  30. int isdigit( int c );
  31. int towupper( WCHAR c );
  32. long atol(const char *nptr);
  33. int atoi(const char *nptr);
  34. int wcsncmp( const WCHAR *string1, const WCHAR *string2, size_t count );
  35. // taken from CRT
  36. int sprintf(char *buf, const char *fmt, ...);
  37. // taken from NTRTL
  38. NTSTATUS
  39. RtlFormatMessage(
  40. IN PWSTR MessageFormat,
  41. IN ULONG MaximumWidth OPTIONAL,
  42. IN BOOLEAN IgnoreInserts,
  43. IN BOOLEAN ArgumentsAreAnsi,
  44. IN BOOLEAN ArgumentsAreAnArray,
  45. IN va_list *Arguments,
  46. OUT PWSTR Buffer,
  47. IN ULONG Length,
  48. OUT PULONG ReturnLength OPTIONAL
  49. );
  50. #endif // __EFI_STRING_UTILS__