WmParse.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. /******************************<+>*************************************
  24. **********************************************************************
  25. **
  26. ** File: WmParse.h
  27. **
  28. ** Project: HP/Motif Workspace Manager (dtwm)
  29. **
  30. ** Description:
  31. ** -----------
  32. ** This file contains function definitions for the corresponding .c
  33. ** file
  34. **
  35. **
  36. **********************************************************************
  37. **
  38. ** (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
  39. ** ALL RIGHTS RESERVED
  40. **
  41. **********************************************************************
  42. **********************************************************************
  43. **
  44. **
  45. **********************************************************************
  46. ******************************<+>*************************************/
  47. #ifndef _Dt_WmParse_h
  48. #define _Dt_WmParse_h
  49. #include <stdio.h>
  50. #include <string.h>
  51. /*
  52. * Definitions
  53. */
  54. typedef struct _DtWmpParseBuf
  55. {
  56. FILE * pFile; /* FILE variable */
  57. unsigned char * pchLine; /* ptr to current line */
  58. int cLineSize; /* # of bytes in pchLine */
  59. unsigned char * pchNext; /* ptr to next char in pchLine */
  60. int lineNumber; /* # of current line being parsed */
  61. } DtWmpParseBuf;
  62. /******** Public Function Declarations ********/
  63. extern void _DtWmParseSkipWhitespace(
  64. DtWmpParseBuf *pWmPB) ;
  65. extern void _DtWmParseSkipWhitespaceC(
  66. unsigned char **linePP) ;
  67. extern unsigned char * _DtWmParseNextToken (
  68. DtWmpParseBuf *pWmPB) ;
  69. extern unsigned char * _DtWmParseNextTokenC(
  70. unsigned char **linePP,
  71. Boolean SmBehavior) ;
  72. extern DtWmpParseBuf * _DtWmParseNewBuf( void ) ;
  73. extern void _DtWmParseDestroyBuf(
  74. DtWmpParseBuf *pWmPB) ;
  75. extern void _DtWmParseSetLine(
  76. DtWmpParseBuf *pWmPB,
  77. unsigned char *pch) ;
  78. extern void _DtWmParseSetFile(
  79. DtWmpParseBuf *pWmPB,
  80. FILE *pFile) ;
  81. extern unsigned char * _DtWmParseNextLine(
  82. DtWmpParseBuf *pWmPB) ;
  83. extern unsigned char * _DtWmParseCurrentChar(
  84. DtWmpParseBuf *pWmPB) ;
  85. extern unsigned char * _DtWmParseNextChar(
  86. DtWmpParseBuf *pWmPB) ;
  87. extern int _DtWmParseLineNumber(
  88. DtWmpParseBuf *pWmPB) ;
  89. extern void _DtWmParseToLower (
  90. char *string);
  91. extern unsigned int _DtWmParsePeekAhead(
  92. unsigned char *currentChar,
  93. unsigned int currentLev) ;
  94. extern unsigned char * _DtWmParseBackUp (
  95. DtWmpParseBuf *pWmPB,
  96. unsigned char *pchTok) ;
  97. extern unsigned char * _DtWmParseFilenameExpand (
  98. unsigned char *pchFilename
  99. );
  100. extern unsigned char * _DtWmParseMakeQuotedString(
  101. unsigned char *pchLine);
  102. extern unsigned char * _DtWmParseExpandEnvironmentVariables (
  103. unsigned char *pch,
  104. unsigned char *pchBrk
  105. );
  106. extern unsigned char * _DtWmParseNextTokenExpand (
  107. DtWmpParseBuf *pWmPB
  108. );
  109. #endif /* _Dt_WmParse_h */