FormatUtilI.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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: FormatUtilI.h /main/9 1996/05/09 03:42:14 drk $ */
  24. /*************************************<+>*************************************
  25. ****************************************************************************
  26. **
  27. ** File: FormatUtilI.h
  28. **
  29. ** Project: TextGraphic Display routines
  30. **
  31. **
  32. ** Description: Header file for FormatUtil.c
  33. **
  34. **
  35. ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
  36. **
  37. ** (c) Copyright 1993, 1994 Hewlett-Packard Company
  38. ** (c) Copyright 1993, 1994 International Business Machines Corp.
  39. ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  40. ** (c) Copyright 1993, 1994 Novell, Inc.
  41. **
  42. **
  43. ****************************************************************************
  44. ************************************<+>*************************************/
  45. #ifndef _DtHelpFormatUtilI_h
  46. #define _DtHelpFormatUtilI_h
  47. /******** Semi-Private Structure Declarations ********/
  48. typedef struct sdlMatchData {
  49. int clan;
  50. int level;
  51. char *ssi;
  52. } SdlMatchData;
  53. typedef struct _frmtUiInfo {
  54. _DtCvValue (*load_graphic)();
  55. _DtCvValue (*resolve_spc)();
  56. void (*load_font)();
  57. int (*exec_filter)();
  58. void (*destroy_region)();
  59. _DtCvPointer client_data;
  60. _DtCvUnit line_width;
  61. _DtCvUnit line_height;
  62. _DtCvUnit leading;
  63. int avg_char;
  64. short nl_to_space;
  65. } _FrmtUiInfo;
  66. typedef struct _frmtPrivateInfo {
  67. char top_block;
  68. char dup_flag;
  69. int sdl_el_type;
  70. int interp;
  71. void *match_info;
  72. void *id_info;
  73. void *doc_info;
  74. void *entry;
  75. void *toss;
  76. void *lang_char;
  77. char *abbrev;
  78. } FrmtPrivateInfo;
  79. /******** Semi-Private Function Declarations ********/
  80. extern int _DtHelpCeAddCharToBuf (
  81. char **src,
  82. char **dst,
  83. int *dst_size,
  84. int *dst_max,
  85. int grow_size );
  86. extern int _DtHelpCeAddOctalToBuf(
  87. char *src,
  88. char **dst,
  89. int *dst_size,
  90. int *dst_max,
  91. int grow_size );
  92. extern int _DtHelpCeAddStrToBuf (
  93. char **src,
  94. char **dst,
  95. int *dst_size,
  96. int *dst_max,
  97. int copy_size,
  98. int grow_size );
  99. extern _DtCvSegment *_DtHelpAllocateSegments (
  100. int malloc_size);
  101. extern int _DtHelpCeGetMbLen(
  102. char *lang,
  103. char *char_set);
  104. extern int _DtHelpCeGetNxtBuf(
  105. BufFilePtr file,
  106. char *dst,
  107. char **src,
  108. int max_size);
  109. extern char * _DtHelpGetNxtToken (
  110. char *str,
  111. char **retToken);
  112. extern int _DtHelpCeReadBuf(
  113. BufFilePtr file,
  114. char *buffer,
  115. int size);
  116. extern int _DtHelpFmtFindBreak(
  117. char *ptr,
  118. int mb_len,
  119. int *num_chars);
  120. extern void _DtHelpLoadMultiInfo(
  121. wchar_t **cant_begin_chars,
  122. wchar_t **cant_end_chars,
  123. short *nl_to_space);
  124. /******** Semi-Private Macro Declarations ********/
  125. #define FrmtPrivInfoPtr(x) ((FrmtPrivateInfo *) (x)->client_use)
  126. #endif /* _DtHelpFormatUtilI_h */