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.

105 lines
2.2 KiB

  1. /***
  2. **
  3. ** Module: FReader
  4. **
  5. ** Description:
  6. ** This is a module of the T1 to TT font converter. The module
  7. ** contains functions that decodes and decrypts the data of a
  8. ** T1 font file.
  9. **
  10. ** Author: Michael Jansson
  11. **
  12. ** Created: 5/26/93
  13. **
  14. ***/
  15. #ifndef _ARGS
  16. # define IN const
  17. # define OUT
  18. # define INOUT
  19. # define _ARGS(arg) arg
  20. #endif
  21. #ifndef FASTCALL
  22. # ifdef MSDOS
  23. # define FASTCALL __fastcall
  24. # else
  25. # define FASTCALL
  26. # endif
  27. #endif
  28. enum ftype {pfb_file, mac_file, ascii_file};
  29. struct FRHandle;
  30. struct FontFile;
  31. /***
  32. ** Function: GetByte
  33. **
  34. ** Description:
  35. ** Pull one byte out of the T1 font file.
  36. ***/
  37. short FASTCALL GetByte _ARGS((INOUT struct FontFile *ff));
  38. /***
  39. ** Function: Decrypt
  40. **
  41. ** Description:
  42. ** Decrypt a byte.
  43. ***/
  44. UBYTE FASTCALL Decrypt _ARGS((INOUT USHORT *r, IN UBYTE b));
  45. /***
  46. ** Function: FRCleanUp
  47. **
  48. ** Description:
  49. ** Free the resources used when reading/decoding data from
  50. ** a T1 font file.
  51. ***/
  52. errcode FRCleanUp _ARGS((INOUT struct FontFile *ff));
  53. /***
  54. ** Function: FRInit
  55. **
  56. ** Description:
  57. ** Initite the resources needed to read/decode data from
  58. ** a T1 font file.
  59. ***/
  60. errcode FRInit _ARGS((IN char *name,
  61. IN enum ftype,
  62. OUT struct FontFile **));
  63. /***
  64. ** Function: GetSeq
  65. **
  66. ** Description:
  67. ** Pull one sequence of bytes that are delimited by
  68. ** a given pair of characters, e.g. '[' and ']'.
  69. ***/
  70. char *GetSeq _ARGS((INOUT struct FontFile *ff,
  71. OUT char *buf,
  72. IN USHORT len));
  73. /***
  74. ** Function: Get_Token
  75. **
  76. ** Description:
  77. ** Pull one token from the T1 font file. A token
  78. ** is delimited by white space and various brackets.
  79. ***/
  80. char *Get_Token _ARGS((INOUT struct FontFile *ff,
  81. OUT char *buf,
  82. IN USHORT len));
  83. /***
  84. ** Function: GetNewLine
  85. **
  86. ** Description:
  87. ** Pull one whole line from the T1 font file, starting at
  88. ** the current position.
  89. ***/
  90. char *GetNewLine _ARGS((INOUT struct FontFile *ff,
  91. OUT char *buf,
  92. IN USHORT len));