home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / EZY110-1.ARJ / STRUCT.ARJ / CLIB.ARJ / EZYLIB.H < prev    next >
C/C++ Source or Header  |  1995-03-28  |  3KB  |  93 lines

  1.  
  2. #ifndef EZYLIBH
  3.  
  4. #define EZYLIBH
  5.  
  6. #include <ezycom.h>
  7. #include <stdio.h>
  8.  
  9. char    *AppendBackslash(char *Source);
  10. int     ExistFile(char *Filename);
  11. int     InitEzycom(char *FailReason);
  12. int     FindParam(char *StrToFind);
  13. char    *GetParam(char *StrToFind,char *Result);
  14. void    pPasToC(char *Source, char *&Dest);
  15. void    PasToC(char *Source, char *Dest);
  16. char    *FindDataFilePath(char *Filename,char *Result);
  17. int     FindMinusSlashParam(char *StrToFind);
  18. char    *GetMinusSlashParam(char *StrToFind,char *Result);
  19. char    *GetSystemPath();
  20. longint FileSize(FILE *hStream);
  21. longint FileSize(char *Filename);
  22. long    UpdateCRC32(byte CurByte, long CurCRC);
  23. char    *GetMsgAreaPath(word MsgBoard,char *MsgAreaPath,int FileType = 1);
  24.  
  25. void SetBitByte(byte Position,int Value,byte &ChangeByte);
  26. void SetBitWord(byte Position,int Value,word &ChangeWord);
  27.  
  28. int CheckDate(word yy, word mm, word dd);                   // date1.cpp
  29.  
  30. // Convert Date to Ezycom Date format
  31. word Date2Word(word yy, word mm, word dd);                  // date2.cpp
  32.  
  33. // Convert from Ezycom Date format to Day, Month and Year
  34. int Word2Date(word Date, word &yy, word &mm, word &dd);     // date3.cpp
  35.  
  36. // Convert from Date to Packed Dos Format
  37. unsigned long Date2Long(word year, word month, word day,
  38.                         word hour, word min,   word sec);   // date4.cpp
  39.  
  40. // Unix format Date with Todays Time/Date
  41. long TodayUnix();                                           // date5.cpp
  42.  
  43. // Unix format Date with number of days added to Todays Time/Date
  44. long TodayUnixAddDays(longint Days);                        // date6.cpp
  45.  
  46. // Compare Unix and Dos Dates
  47. //    -1 = Dos Date Less
  48. //     0 = Equal
  49. //     1 = Dos Date Greater
  50. int  CompareDosUnixDate(long PackedDosDate,
  51.                         unsigned long UnixDate);            // date7.cpp
  52.  
  53. // Convert Dos Packed Date to Year, Month, Day, Hour, Min, Sec
  54. void Long2Date(long Date, word &Year, word &Month, word &Day,
  55.                         word &Hour, word &Min, word &Sec);  // date8.cpp
  56.  
  57. word GetNextRead(FILE *hLastComb,word UserRecord,
  58.                         word MsgBoard);                     // lastread.cpp
  59. int  PutNextRead(FILE *hLastComb,word UserRecord,
  60.                         word MsgBoard,word MsgNumber=1);    // lastread.cpp
  61.  
  62. // String functions
  63. void ForceExtension(char *Path,char *Extension);            // str1.cpp
  64. char *FirstWord(char *FirstWordStr,char *SourceStr);        // str2.cpp
  65. char *TrimLead(char *S);                                    // str3.cpp
  66. char *TrimTrail(char *S);                                   // str4.cpp
  67. char *Trim(char *S);                                        // str5.cpp
  68. char *RemoveBackslash(char *Source);                        // str6.cpp
  69.  
  70.  
  71. extern char *SystemPath;
  72. extern int  Node;
  73. extern ConfigRecord   Config;
  74. extern ConstantRecord Constant;
  75. extern char *MsgPath;
  76. extern char *UserBasePath;
  77.  
  78. #ifndef TRUE
  79.     #define TRUE 1
  80. #endif
  81.  
  82. #ifndef FALSE
  83.     #define FALSE 0
  84. #endif
  85.  
  86. #ifdef __OS2__
  87.   #define WILDCARD "????????????"
  88. #else
  89.   #define WILDCARD "*.*"
  90. #endif
  91.  
  92. #endif
  93.