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.

34 lines
1.3 KiB

  1. /***************************************************************************
  2. Name : ENCODER.H
  3. Comment : HDLC encoding structs
  4. Copyright (c) Microsoft Corp. 1991 1992 1993
  5. ***************************************************************************/
  6. #ifdef WIN32
  7. # define CODEBASED
  8. #else
  9. # define CODEBASED __based(__segname("_CODE"))
  10. #endif
  11. #ifdef SWECM
  12. # define SWECMEXP _export FAR PASCAL
  13. #else
  14. # define SWECMEXP
  15. #endif
  16. USHORT SWECMEXP HDLC_Encode(PThrdGlbl pTG, LPBYTE lpbSrc, USHORT cbSrc, LPBYTE lpbDst, LPENCODESTATE lpState);
  17. USHORT SWECMEXP HDLC_AddFlags(PThrdGlbl pTG, LPBYTE lpbDst, USHORT cbFlags, LPENCODESTATE lpState);
  18. /******
  19. #define HDLC_End(lpbDst, lpState) \
  20. { (lpState)->len = 0; \
  21. *lpbDst = (lpState)->carry; \
  22. *lpbDst++ |= (0xFF << ((lpState)->enc_width)); \
  23. (lpState)->carry = (lpState)->enc_width = 0; }
  24. ******/
  25. #define InitEncoder(pTG, State) { State.carry=State.enc_width=State.len=0; }