home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / quot210s.zip / include / html.h < prev    next >
C/C++ Source or Header  |  1998-09-12  |  2KB  |  77 lines

  1. /*
  2.  * html.h
  3.  *
  4.  * Header file for HTML parsing functions.
  5.  *
  6.  *      Created: 4th March, 1997
  7.  * Version 1.00: 6th March, 1997
  8.  * Version 2.00: 9th December, 1997
  9.  *
  10.  * (C) 1997 Nicholas Paul Sheppard
  11.  *
  12.  * This file is distributed under the GNU General Public License. See the
  13.  * file copying.txt for details.
  14.  */
  15.  
  16. #ifndef _QUOTERISER_HTML_H
  17. #define _QUOTERISER_HTML_H
  18.  
  19.  
  20. /* types of chunks we can return */
  21. #define HTML_WORD_END        0
  22. #define HTML_WORD_MID        1
  23. #define HTML_TAG_END        2
  24. #define HTML_TAG_MID           3
  25. #define HTML_MACRO_END        4
  26. #define HTML_MACRO_MID        5
  27. #define HTML_END        6
  28.  
  29.  
  30. /* tag translations */
  31. #define HTML_INVALID        -1
  32. #define HTML_UNKNOWN        0
  33. #define HTML_PARAGRAPH        1
  34. #define HTML_ITALICS_START    2
  35. #define HTML_ITALICS_END    3
  36. #define HTML_BOLD_START        4
  37. #define HTML_BOLD_END        5
  38. #define HTML_LINEBREAK         6
  39. #define HTML_TABLE_ROW        7
  40. #define HTML_TABLE_DATA        8
  41.  
  42. /* limits */
  43. #define HTML_MAX_TAG        100    /* maximum length of a tag */
  44. #define HTML_MAX_ELEM        10    /* maximum length of a tag element */
  45. #define HTML_MAX_MACRO        10    /* maximum length of a macro */
  46.  
  47. /* alignments */
  48. #define HTML_ALIGN_INVALID    0
  49. #define HTML_ALIGN_LEFT        1
  50. #define HTML_ALIGN_RIGHT    2
  51. #define HTML_ALIGN_TOP        3
  52. #define HTML_ALIGN_BOTTOM    4
  53. #define HTML_ALIGN_MIDDLE    5
  54.  
  55. /* type for holding attributes of a TD tag */
  56. typedef struct _HTML_TDATTR {
  57.     int bNoWrap;
  58.     int iRowSpan;
  59.     int iColSpan;
  60.     int iAlign;
  61.     int iVAlign;
  62. } HTML_TDATTR;
  63.  
  64.  
  65. /* functions in html.c */
  66. int    HTMLGetNextChunk(char *, char *, char **);
  67. int    HTMLParseTag(char *);
  68. int    HTMLParseMacro(char *);
  69. char    *HTMLMakePlain(char *);
  70.  
  71. /* functions in htmlattr.c */
  72. void    HTMLAttrTD(char *, HTML_TDATTR *);
  73. char    *HTMLAttrFirst(char *, char *, int, char *, int);
  74. char    *HTMLAttrNext(char *, char *, int, char *, int);
  75.  
  76. #endif
  77.