DtShmDb.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: DtShmDb.h /main/4 1996/05/09 04:22:30 drk $ */
  24. #ifndef DtShmDb_h
  25. #define DtShmDb_h
  26. /*
  27. this include file provides prototypes for the various
  28. shared memory database routines
  29. */
  30. typedef void * DtShmProtoStrtab;
  31. typedef void * DtShmProtoInttab;
  32. typedef void * DtShmProtoIntList;
  33. typedef const void * DtShmStrtab;
  34. typedef const void * DtShmInttab;
  35. typedef const int * DtShmIntList;
  36. typedef int DtShmBoson;
  37. /*
  38. routines used while building shared memory databases
  39. */
  40. DtShmProtoStrtab _DtShmProtoInitStrtab (int estimated_entries);
  41. DtShmBoson _DtShmProtoAddStrtab (DtShmProtoStrtab prototab, const char * string, int * isnew);
  42. const char * _DtShmProtoLookUpStrtab (DtShmProtoStrtab prototab, DtShmBoson boson);
  43. int _DtShmProtoSizeStrtab (DtShmProtoStrtab prototab);
  44. DtShmStrtab _DtShmProtoCopyStrtab (DtShmProtoStrtab prototab, void * dataspace);
  45. int _DtShmProtoDestroyStrtab (DtShmProtoStrtab prototab);
  46. DtShmProtoInttab _DtShmProtoInitInttab (int estimated_entries);
  47. int _DtShmProtoAddInttab (DtShmProtoInttab prototab, unsigned int keyin, int datain);
  48. int * _DtShmProtoLookUpInttab (DtShmProtoInttab prototab, unsigned int keyin);
  49. int _DtShmProtoSizeInttab (DtShmProtoInttab prototab);
  50. DtShmInttab _DtShmProtoCopyInttab (DtShmProtoInttab prototab, void * dataspace);
  51. int _DtShmProtoDestroyInttab (DtShmProtoInttab prototab);
  52. DtShmProtoIntList _DtShmProtoInitIntLst (int estimated_entries);
  53. int * _DtShmProtoAddIntLst (DtShmProtoIntList protolist, int size, int * index_value);
  54. int _DtShmProtoSizeIntLst (DtShmProtoIntList protolist);
  55. DtShmIntList _DtShmProtoCopyIntLst (DtShmProtoIntList protolist, void * dataspace);
  56. int _DtShmProtoDestroyIntLst (DtShmProtoIntList protolist);
  57. /*
  58. run-time routines once shared memory area is built
  59. */
  60. DtShmBoson _DtShmStringToBoson (DtShmStrtab tab, const char * string);
  61. const char * _DtShmBosonToString (DtShmStrtab tab, DtShmBoson boson);
  62. const int * _DtShmFindIntTabEntry (DtShmInttab tab, unsigned int key);
  63. #endif /* DtShmDb_h */