home *** CD-ROM | disk | FTP | other *** search
/ Amiga News 95 / Amiga News 95.iso / dpat / dpat13 / sources / sources.lha / structures.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-14  |  3.4 KB  |  156 lines

  1.  
  2. #ifndef STRUCTURES_H
  3. #define STRUCTURES_H
  4. /*
  5. **      $Filename: Structures.h $
  6. **      $Revision: 2.0 $
  7. **      $Release: 2.21 $
  8. **      $Date : 92/09/12 $
  9. **
  10. **
  11. **      (C) Copyright 1992 David Scrève
  12. **          All Rights Reserved
  13. */
  14.  
  15.  
  16. #include "menus_values.h"
  17. #include <dos/dos.h>
  18. #include <libraries/Gadtools.h>
  19.  
  20. /* New for Release 2.2 : Adaptive Application Screen Title */
  21.  
  22. #define AppliNameFrancais "DP Managing 68030/68882 Version 2.21 By David Scrève © 1992"
  23. #define AppliNameEnglish  "DP Managing 68030/68882 Release 2.21 By David Scrève © 1992"
  24.  
  25. /* New for Gadtools.h V37 */
  26. #define GT_Underscore GT_TagBase+64
  27.  
  28. #define STD_STRING_LEN         65
  29. #define EXSTD_STRING_LEN       200
  30. #define BUFFER_SIZE            65536L
  31. #define DISK_SIZE              830000L
  32.  
  33. #define NO_ERROR                0L
  34. #define ALLOC_MEM_ERR           1L
  35. #define OBJECT_NOT_CREATED      2L
  36. #define OPERATION_CANCELED      3L
  37. #define DEALLOC_MEM_ERR         4L
  38. #define UNAUTHORIZED_PEOPLE     5L
  39. #define UNKNOWN_DISK_ERROR      6L
  40. #define EOF_REACHED             7L
  41.  
  42. /* Define for checking the directory Names in Tooltypes 's icon*/
  43. #define SLASH 47
  44. #define DOUBLE_POINT 58
  45.  
  46. /* Value returned by the different modules */
  47.  
  48. #define MOD_STATISTIQUES 2L
  49. #define MOD_MAINTENANCE 3L
  50. #define MOD_CONSULTATION 4L
  51. #define MOD_EMPRUNTS 5L
  52. #define MOD_AJOUT 6L
  53. #define MOD_QUIT 7L
  54. #define CHANGE_LANGUAGE 11L
  55.  
  56. /* The NeXT Step will be 12L */
  57.  
  58.  
  59. /* Hera are value for different languages */
  60. #define FRANCAIS 0L
  61. #define ENGLISH  1L
  62.  
  63.  
  64. /*  global Datas */
  65.  
  66. /* for the printer */
  67.  
  68. #define MaxLenProg 22
  69. #define MaxLenDisk 6
  70. #define MaxLenTaille 6
  71. #define MaxLenComment 56
  72. #define MaxLenConfig 33
  73.  
  74.  
  75. /* this structure is used with the disk management */
  76. struct programme
  77.        {
  78.         LONG taille;
  79.         LONG disk;
  80.         char categorie[STD_STRING_LEN];
  81.         char nom[STD_STRING_LEN];
  82.         char comment[STD_STRING_LEN];
  83.         char config[STD_STRING_LEN];
  84.        };
  85.  
  86. /* this structure is used with the memory management */
  87. struct ProgMem
  88.        {
  89.         struct programme program;
  90.         BOOL special;
  91.         BOOL news;
  92.        };
  93.  
  94. struct adhrent
  95.         {
  96.          char nom[STD_STRING_LEN];
  97.          char prenom[STD_STRING_LEN];
  98.          LONG age;
  99.          LONG NbCommandes;
  100.          LONG NbPrgEmp;
  101.         };
  102.  
  103. struct DiskHeader
  104.         {
  105.          LONG numero;
  106.          LONG FreeSize;
  107.         };
  108.  
  109. /* this structure is used with the disk management */
  110. struct CateHeader
  111.         {
  112.          char code_serveur[3];
  113.          LONG nb_emprunts;
  114.         };
  115.  
  116. /* this structure is used with the memory management */
  117. struct CateMem
  118.         {
  119.          char nom[STD_STRING_LEN];
  120.          struct CateHeader head;
  121.         };
  122.  
  123. struct SoftRecord
  124.         {
  125.          char nom[STD_STRING_LEN];
  126.          LONG indice;
  127.         };
  128.  
  129. struct OneEmprunt
  130.         {
  131.          char nom[STD_STRING_LEN];
  132.          LONG indice;
  133.          LONG disk;
  134.          LONG taille;
  135.         };
  136.  
  137. struct OneCommande
  138.         {
  139.          struct DateStamp date;
  140.          LONG taille;
  141.          LONG nbemprunts;
  142.          char emprunteur[STD_STRING_LEN];
  143.          struct OneEmprunt lesprog[5];
  144.         };
  145.  
  146. /* this strange structure is returned by DoubleManageError */
  147. /* Also we known if the user canceled the double requester or click */
  148. /* on the OK button when all was good ( NO_ERROR Value )         */
  149.  
  150. struct DoubleAnswer
  151.         {
  152.          BOOL arret;
  153.          BOOL OK;
  154.         };
  155.  
  156. #endif  /* STRUCTURES_H */