osdep.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. Copyright (c) 1990-2007 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2007-Mar-4 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. #ifndef __MACOS_OSDEP_H
  9. #define __MACOS_OSDEP_H 1
  10. #ifndef MACOS
  11. # define MACOS
  12. #endif
  13. #include <setjmp.h>
  14. #include <types.h>
  15. #include <signal.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <unix.h>
  19. #include <unistd.h>
  20. #include <console.h>
  21. #include <Errors.h>
  22. #include <Files.h>
  23. #include "unixlike.h"
  24. #include "macglob.h"
  25. #define NO_MKTEMP 1
  26. #define PASSWD_FROM_STDIN 1
  27. #define NO_SYMLINKS 1
  28. #define USE_ZIPMAIN 1
  29. #define USE_CASE_MAP 1 /* case_map is used to ignore case in comparisons */
  30. /*
  31. #define DEBUG_TIME
  32. */
  33. #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
  34. # define USE_EF_UT_TIME
  35. #endif
  36. #undef IZ_CHECK_TZ
  37. #ifndef ZP_NEED_MEMCOMPR
  38. # define ZP_NEED_MEMCOMPR
  39. #endif
  40. #define EXDEV 18
  41. #define PATHCUT ':'
  42. /* file operations use "b" for binary */
  43. #define FOPR "rb"
  44. #define FOPM "r+b"
  45. #define FOPW "wb"
  46. /*
  47. #define DEBUG
  48. */
  49. /* These functions are defined as a macro instead of a function.
  50. so we have to undefine them for replacing (see printf.c) */
  51. #undef getc
  52. #undef getchar
  53. #undef putchar
  54. void setfiletype(char *file, unsigned long Creator, unsigned long Type);
  55. char *GetZipVersionsInfo(void);
  56. char *GetZipVersionLocal(void);
  57. char *GetZipCopyright(void);
  58. void InitAllVars(void);
  59. void PrintFileInfo(void);
  60. int fprintf(FILE *file, const char *format, ...);
  61. int printf(const char *format, ...);
  62. void perror(const char *parm1);
  63. int macgetch(void);
  64. int MacOpen(const char *path,int oflag,...);
  65. FILE *MacFopen(const char *path,const char *mode);
  66. #define fopen(path, mode) MacFopen(path, mode)
  67. #define open(path, oflag) MacOpen(path, oflag)
  68. char *GetComment(char *filename);
  69. int readlink(char *path, char *buf, int size);
  70. void PrintStatProgress(char *msg);
  71. void InformProgress(const long progressMax, const long progressSoFar );
  72. void ShowCounter(Boolean reset);
  73. void leftStatusString(char *status);
  74. #define PROCNAME(n) (action == ADD || action == UPDATE ? wild(n) : \
  75. procname(n, 1))
  76. #endif /* __MACOS_OSDEP_H */