helpers.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Copyright (c) 1990-2001 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2000-Apr-09 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 HELPERS_H
  9. #define HELPERS_H 1
  10. /* Convert a C string to a Pascal string */
  11. unsigned char *CToPCpy(unsigned char *pstr, char *cstr);
  12. /* Convert a Pascal string to a C string */
  13. char *PToCCpy(unsigned char *pstr, char *cstr);
  14. char *sstrcpy(char *to,const char *from);
  15. char *sstrcat(char *to,const char *from);
  16. char *StrCalloc(unsigned short size);
  17. char *StrFree(char *strPtr);
  18. char *sBit2Str(unsigned short value);
  19. void print_extra_info(void);
  20. int ParseArguments(char *s, char ***arg);
  21. void PrintArguments(int argc, char **argv);
  22. Boolean IsZipFile(char *name);
  23. OSErr printerr(const char *msg, int cond, int err, int line, char *file,
  24. const char *msg2);
  25. int PrintUserHFSerr(int cond, int err, char *msg2);
  26. short CheckMountedVolumes(char *FullPath);
  27. void DoWarnUserDupVol(char *path);
  28. void PrintFileInfo(void);
  29. int stricmp(const char *p1, const char *p2);
  30. void leftStatusString(char *status);
  31. void rightStatusString(char *status);
  32. Boolean isZipFile(FSSpec *fileToOpen);
  33. unsigned long MacFileDate_to_UTime(unsigned long mactime);
  34. Boolean CheckForSwitch(char *Switch, int argc, char **argv);
  35. void MakeCompatibleString(char *MacOS_Str,
  36. const char SpcChar1, const char SpcChar2,
  37. const char SpcChar3, const char SpcChar4,
  38. short CurrTextEncodingBase);
  39. #define MAX_ARGS 25
  40. #endif /* HELPERS_H */