home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / utility / MacBinSupport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.7 KB  |  59 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /* MacBinSupport.h */
  20.  
  21. #include "xp_file.h"
  22.  
  23. #define kMBHeaderLength    128L
  24.  
  25. typedef struct
  26. {
  27.     short    fileState;        /* Current phase of MB read */
  28.     short    fileRefNum;
  29.     long    dataForkLength;
  30.     long    dataBytesRead;
  31.     long    resForkLength;
  32.     long    resBytesRead;
  33.     FSSpec    theFileSpec;
  34.     Byte    mbHeader[kMBHeaderLength];        /* The actual MacBinary header info */
  35. } MB_FileSpec;
  36.  
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. /* NOTE!! - FSSpecFromPathname_CWrapper is declared in ufilemgr.cp as an
  43.             extern "C" function.  This prototype must match the declaration in
  44.             ufilemgr.cp or bad things will happen
  45. */
  46. OSErr    FSSpecFromPathname_CWrapper(char * path, FSSpec * outSpec);
  47.  
  48. int        MB_Stat( const char* name, XP_StatStruct * outStat,  XP_FileType type );
  49.  
  50. OSErr    MB_Open(const char *name, MB_FileSpec *mbFileSpec);
  51.  
  52. int32    MB_Read(char *buf, int bufSize, MB_FileSpec *mbFileSpec);
  53.  
  54. void    MB_Close(MB_FileSpec *mbFileSpec);
  55.  
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59.