/*TITLE quantum file header */ /****keyword-flag*** "%v %f %n" */ /* "8 2-Sep-92,19:56:00 QUANTUM.H" */ /****revision-history****/ /*1 QUANTUM.H 13-Mar-91,18:13:28 Quantum file header. */ /*2 QUANTUM.H 13-Mar-91,18:22:36 Added prototype for */ /* create_main_object. */ /*3 QUANTUM.H 9-Apr-91,10:14:10 Deleted typedefs that are used */ /* only in quantum.c. */ /* Prefixed qf_ to functions that are visible outside quantum.c. */ /* Added StorageType for possible later use of EMS buffers. */ /* Added StatusType for return values from functions. */ /* The qf_create_main_object function now takes the object number */ /* as an argument rather than assigning it itself. */ /* Added qf_flush_buffers to make sure the buffers have been */ /* written to the disk. */ /*4 QUANTUM.H 6-Jul-91,13:43:14 Changed unsigned to unsigned short for */ /* compatibility with other compilers. */ /*5 QUANTUM.H 25-Aug-91,11:37:18 Removed storagetype definition. */ /*6 QUANTUM.H 16-May-92,8:12:08 Added prototype for Megasort. */ /*7 QUANTUM.H 20-Aug-92,20:40:56 Changed argument to Megasort to unsigned */ /* char so it will work properly with high characters. */ /*8 QUANTUM.H 2-Sep-92,19:56:00 Added new typedef "ItemSize". */ /* Used the new type to declare the "item_size" argument to */ /* "qf_store_item" and "qf_get_item". */ /****revision-history****/ typedef unsigned short ObjectNumber; typedef unsigned short ArrayIndex; typedef unsigned short ItemSize; enum statustype {OKAY,ERROR}; typedef enum statustype StatusType; FILE *qf_open_quantum_file(char *filename, int buffer_count); StatusType qf_create_main_object(FILE *quantum_file, ObjectNumber object_number, ArrayIndex item_count); StatusType qf_store_item(FILE *quantum_file, ObjectNumber main_object_number, ArrayIndex element_index, char *item, ItemSize item_size); StatusType qf_get_item(FILE *quantum_file, ObjectNumber main_object_number, ArrayIndex element_index, char **item, ItemSize *item_size); void qf_flush_buffers(FILE *quantum_file); StatusType qf_close_quantum_file(FILE *quantum_file); void Megasort(unsigned char **PtrArray, unsigned short *RecNums, int KeyLength, char KeyType, unsigned ArraySize);