home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / Level 1 Extensions 29Sep94 / BufferedFileOutput.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  3.2 KB  |  75 lines  |  [TEXT/KAHL]

  1. /* BufferedFileOutput.h */
  2.  
  3. #ifndef Included_BufferedFileOutput_h
  4. #define Included_BufferedFileOutput_h
  5.  
  6. /* BufferedFileOutput module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Files */
  12. /* Memory */
  13.  
  14. struct BufferedOutputRec;
  15. typedef struct BufferedOutputRec BufferedOutputRec;
  16.  
  17. /* forwards */
  18. struct FileType;
  19.  
  20. /* create a new buffered output object around a file.  the file is not allowed */
  21. /* to be tampered with after it has been registered with this since I am too */
  22. /* lazy to implement proper buffering in the Level 0 library like I should. */
  23. BufferedOutputRec*    NewBufferedOutput(struct FileType* TheFileDescriptor);
  24.  
  25. /* clean up a buffered output object from around a file.  the file may be */
  26. /* used normally after this has been called.  if it failed to write the */
  27. /* data out to disk, then it returns False. */
  28. MyBoolean                        EndBufferedOutput(BufferedOutputRec* BufferedThang);
  29.  
  30. /* write a raw block of data to the file.  it returns 0 if it wrote all of the */
  31. /* data in or however many bytes were not able to be written. */
  32. MyBoolean                        WriteBufferedOutput(BufferedOutputRec* BufferedThang,
  33.                                             long RequestedBytes, char* PlaceToGetFrom);
  34.  
  35.  
  36. /* write a signed character to the file.  returns True if successful. */
  37. MyBoolean                        WriteBufferedSignedChar(BufferedOutputRec* BufferedThang,
  38.                                             signed char SignedChar);
  39.  
  40. /* write an unsigned character to the file.  returns True if successful. */
  41. MyBoolean                        WriteBufferedUnsignedChar(BufferedOutputRec* BufferedThang,
  42.                                             unsigned char UnsignedChar);
  43.  
  44.  
  45. /* write a signed 2's complement 16-bit short little endian.  returns True if successful */
  46. MyBoolean                        WriteBufferedSignedShortLittleEndian(BufferedOutputRec* BufferedThang,
  47.                                             signed short SignedShort);
  48. /* write a signed 2's complement 16-bit short big endian.  returns True if successful */
  49. MyBoolean                        WriteBufferedSignedShortBigEndian(BufferedOutputRec* BufferedThang,
  50.                                             signed short SignedShort);
  51.  
  52. /* write an unsigned 16-bit short little endian.  returns True if successful. */
  53. MyBoolean                        WriteBufferedUnsignedShortLittleEndian(BufferedOutputRec* BufferedThang,
  54.                                             unsigned short UnsignedShort);
  55. /* write an unsigned 16-bit short big endian.  returns True if successful. */
  56. MyBoolean                        WriteBufferedUnsignedShortBigEndian(BufferedOutputRec* BufferedThang,
  57.                                             unsigned short UnsignedShort);
  58.  
  59.  
  60. /* write a signed 2's complement 32-bit long little endian.  returns True if successful */
  61. MyBoolean                        WriteBufferedSignedLongLittleEndian(BufferedOutputRec* BufferedThang,
  62.                                             signed long SignedLong);
  63. /* write a signed 2's complement 32-bit long big endian.  returns True if successful */
  64. MyBoolean                        WriteBufferedSignedLongBigEndian(BufferedOutputRec* BufferedThang,
  65.                                             signed long SignedLong);
  66.  
  67. /* write an unsigned 32-bit long little endian.  returns True if successful */
  68. MyBoolean                        WriteBufferedUnsignedLongLittleEndian(BufferedOutputRec* BufferedThang,
  69.                                             unsigned long UnsignedLong);
  70. /* write an unsigned 32-bit long big endian.  returns True if successful */
  71. MyBoolean                        WriteBufferedUnsignedLongBigEndian(BufferedOutputRec* BufferedThang,
  72.                                             unsigned long UnsignedLong);
  73.  
  74. #endif
  75.