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.

21 lines
508 B

  1. #include <npdefs.h>
  2. #include <netlib.h>
  3. #define ADVANCE(p) (p += IS_LEAD_BYTE(*p) ? 2 : 1)
  4. #define SPN_SET(bits,ch) bits[(ch)/8] |= (1<<((ch) & 7))
  5. #define SPN_TEST(bits,ch) (bits[(ch)/8] & (1<<((ch) & 7)))
  6. // The following is created to avoid an alignment fault on Win64 platforms.
  7. inline UINT GetTwoByteChar( LPCSTR lpString )
  8. {
  9. BYTE bFirst = *lpString;
  10. lpString++;
  11. BYTE bSecond = *lpString;
  12. UINT uiChar = ( bFirst << 8) | bSecond;
  13. return uiChar;
  14. }