[PR] この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。
1 #ifndef __DOUBLE_ARRAY_ORIGINAL_H_ 2 #define __DOUBLE_ARRAY_ORIGINAL_H_ 3 4 5 // Functions return these integers. 6 #define DARY_OK 0 7 #define DARY_EHDL 100 8 #define DARY_EMEM 101 9 #define DARY_EIO 102 10 #define DARY_EARG 103 11 #define DARY_EKEY 104 12 #define DARY_EBAD 105 13 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 20 // Handle of double-array. 21 typedef struct Dary *hDary; 22 23 // Status of double-array. 24 typedef struct Dstat 25 { 26 unsigned max; // Rearmost used element. 27 unsigned mblk; // Rearmost used block. 28 unsigned nblk; // Number of blocks. 29 unsigned mtail; // Rearmost used element in Tail. 30 unsigned ntail; // Length of Tail. 31 unsigned size; // Size of double-array. 32 unsigned nemp; // Number of empty elements. 33 unsigned nkey; // Number of keys. 34 } Dstat, *hDstat; 35 36 37 // Open. 38 int Dary_Open( hDary *h, const char *path ); 39 // Close. 40 int Dary_Close( hDary h ); 41 // Save. 42 int Dary_Save( hDary h, const char *path ); 43 44 // Status. 45 int Dary_Status( hDary h, hDstat st ); 46 47 // Search. 48 int Dary_Search( hDary h, const char *s ); 49 // Insert. 50 int Dary_Insert( hDary h, const char *s ); 51 // Delete. 52 int Dary_Delete( hDary h, const char *s ); 53 54 // Adjust Base and Check. 55 int Dary_AdjustBC( hDary h ); 56 // Adjust Tail. 57 int Dary_AdjustTail( hDary h ); 58 59 // Error message. 60 void Dary_Error( int code ); 61 62 63 #ifdef __cplusplus 64 } 65 #endif 66 67 68 #endif