Leaked source code of windows server 2003
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.

44 lines
891 B

  1. /* Copyright (C) Boris Nikolaus, Germany, 1996-1997. All rights reserved. */
  2. /* Copyright (C) Microsoft Corporation, 1997-1998. All rights reserved. */
  3. #include "precomp.h"
  4. /* check if a 16 bit character is a space */
  5. int
  6. ASN1is16space(ASN1char16_t c)
  7. {
  8. return c == ' ' || c == '\t' || c == '\b' || c == '\f' || c == '\r' ||
  9. c == '\n' || c == '\v';
  10. }
  11. /* get length of a 16 bit string */
  12. // lonchanc: lstrlenW()
  13. int
  14. ASN1str16len(ASN1char16_t *p)
  15. {
  16. int len;
  17. for (len = 0; *p; p++)
  18. len++;
  19. return len;
  20. }
  21. /* check if a 32 bit character is a space */
  22. int
  23. ASN1is32space(ASN1char32_t c)
  24. {
  25. return c == ' ' || c == '\t' || c == '\b' || c == '\f' || c == '\r' ||
  26. c == '\n' || c == '\v';
  27. }
  28. /* get length of a 32 bit string */
  29. int
  30. ASN1str32len(ASN1char32_t *p)
  31. {
  32. int len;
  33. for (len = 0; *p; p++)
  34. len++;
  35. return len;
  36. }