Sync-to-go: update copyright for 2015
[s-roff.git] / src / dev-html / html.h
blobbede978cd9e4222b11a187bf87bc8bf3ad42b104
1 /*@
2 * Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 * Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
5 * Written by James Clark (jjc@jclark.com)
7 * This is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2, or (at your option) any later
10 * version.
12 * This is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with groff; see the file COPYING. If not, write to the Free Software
19 * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef _HTML_H
22 #define _HTML_H
24 #include "config.h"
25 #include "html-config.h"
27 class word
29 public:
30 char *s;
31 word *next;
33 word(const char *w, int n);
34 ~word(void);
37 class word_list
39 int length;
40 word *head;
41 word *tail;
43 public:
44 word_list(void);
45 int flush(FILE *f);
46 void add_word(const char *s, int n);
47 int get_length(void);
50 class simple_output
52 FILE *fp;
53 int max_line_length; // not including newline
54 int col;
55 int fixed_point;
56 int newlines; // can we issue newlines automatically?
57 word_list last_word;
59 void flush_last_word(void);
60 int check_space(const char *s, int n);
62 public:
63 simple_output(FILE *, int max_line_length);
64 simple_output &put_string(const char *, int);
65 simple_output &put_string(const char *s);
66 simple_output &put_string(const string &s);
67 simple_output &put_troffps_char (const char *s);
68 simple_output &put_translated_string(const char *s);
69 simple_output &put_number(int);
70 simple_output &put_float(double);
71 simple_output &put_symbol(const char *);
72 simple_output &put_literal_symbol(const char *);
73 simple_output &set_fixed_point(int);
74 simple_output &simple_comment(const char *);
75 simple_output &begin_comment(const char *);
76 simple_output &comment_arg(const char *);
77 simple_output &end_comment();
78 simple_output &set_file(FILE *);
79 simple_output &include_file(FILE *);
80 simple_output &copy_file(FILE *);
81 simple_output &end_line();
82 simple_output &put_raw_char(char);
83 simple_output &special(const char *);
84 simple_output &enable_newlines(int);
85 simple_output &check_newline(int n);
86 simple_output &nl(void);
87 simple_output &force_nl(void);
88 simple_output &space_or_newline (void);
89 simple_output &begin_tag (void);
90 FILE *get_file();
93 inline FILE *simple_output::get_file()
95 return fp;
98 #endif // _HTML_H
99 // s-it2-mode