summaryrefslogtreecommitdiff
path: root/src/preproc/html
diff options
context:
space:
mode:
authorwlemb <wlemb>2001-04-19 14:01:50 +0000
committerwlemb <wlemb>2001-04-19 14:01:50 +0000
commit92c8fbd691fccf1796420251c5b2978bcd748393 (patch)
tree59f943e99f24a2a958181453908371aa4158e19c /src/preproc/html
parent0f162cb51f1cf6f3528f7f1e86b149c9541cfa98 (diff)
downloadgroff-92c8fbd691fccf1796420251c5b2978bcd748393.tar.gz
* src/preproc/html/pre-html.cc (scanArguments): Use `troff_command'
instead of hardwired `"troff"'. (char_buffer::read_file): Remove unused variables. (char_buffer::write_file_troff): Ditto. (char_buffer::write_file_html): Ditto. (generateImages): Ditto. (abs): Removed. * src/utils/addftinfo/addftinfo.cc (main): Fix compilation problem. * src/include/lib.h: Don't include `groff-getopt.h' for UWIN. * src/libs/libgroff/font.cc (font::load_desc): Fix compiler warning. * src/libs/libbib/index.cc (index_search_item_iterator::get_tag, index_search_item::search1): Ditto. * src/roff/troff/node.h (width_list): Reorder members. * src/roff/troff/input.cc (do_define_macro): Fix compiler warning. (lookup_warning): Ditto. (prepend_string): Commented out. * src/roff/troff/dictionary.cc (is_good_size): Fix compiler warning. * src/roff/troff/reg.cc (number_value_to_ascii): Ditto. * src/preproc/tbl/main.cc (process_format): Ditto. * src/preproc/pic/pic.y (define_variable, reset, reset_all): Fix compiler warnings. * src/preproc/pic/pic.cc: Updated. * src/preproc/eqn/lex.cc (init_table): Fix compiler warnings. * src/preproc/eqn/over.cc (over_box::compute_metrics): Ditto. * src/preproc/refer/command.cc (execute_command): Ditto. * src/preproc/refer/ref.cc (sortify_title, find_month): Ditto. * src/preproc/refer/token.cc (lookup_token): Ditto. * src/preproc/soelim/soelim.cc: Ditto. * src/preproc/html/pushbackbuffer.cc (ERROR): Ditto. (isHexDigit): Commented out. (pushBackBuffer::isString): Remove unused variable. * src/devices/grops/ps.cc (ps_printer::special): Fix compiler warning. * src/devices/grops/psrm.cc (resource_manager::lookup_font, resource_manager::read_resource_arg, read_one_of, parse_extensions): Ditto. * src/devices/grodvi/dvi.cc (dvi_printer::draw): Ditto. * src/devices/grolj4/lj4.cc (lj4_font::handle_unknown_font_command, lookup_paper_size): Ditto. * src/devices/grohtml/post-html.cc (is_subsection): Commented out. (text_glob, element_list): Reorder members. * src/devices/grohtml/html-text.cc (html_text::do_pre): Remove compiler warning. * src/devices/grohtml/html-text.h (html_text::emit_space): Change return value to `void'. * src/devices/grohtml/output.cc (word_list::word_list): Fix order of initializers. * src/devices/grohtml/html.h (simple_output::check_newline, simple_output::space_or_newline, simple_output::enable_newlines): Add return value. * src/devices/grolbp/lbp.cc (wp54charset, set_papersize): Remove compiler warnings. * src/utils/tfmtodit/tfmtodit.cc (tfm::load, gf::load, main): Ditto. * src/utils/hpftodit/hpftodit.cc (File::seek, read_symbol_sets, output_ligatures, output_charset, read_map): Ditto. * src/utils/lookbib/lookbib.cc (main): Ditto. * src/utils/indxbib/indxbib.cc (main, fwrite_or_die): Ditto. (do_file): Fix typo (`=' -> `=='). * src/utils/lkbib/lkbib.cc (main): Remove compiler warning. * src/utils/addftinfo/addftinfo.cc (main): Ditto.
Diffstat (limited to 'src/preproc/html')
-rw-r--r--src/preproc/html/pre-html.cc24
-rwxr-xr-xsrc/preproc/html/pushbackbuffer.cc5
2 files changed, 6 insertions, 23 deletions
diff --git a/src/preproc/html/pre-html.cc b/src/preproc/html/pre-html.cc
index 8357dd6e..c87612ef 100644
--- a/src/preproc/html/pre-html.cc
+++ b/src/preproc/html/pre-html.cc
@@ -187,8 +187,6 @@ char_buffer::~char_buffer()
int char_buffer::read_file (FILE *fp)
{
- int i=0;
- unsigned int old_used;
int n;
while (! feof(fp)) {
@@ -456,7 +454,6 @@ void char_buffer::skip_to_newline (char_block **t, int *i)
void char_buffer::write_file_troff (void)
{
char_block *t=head;
- int r;
int i=0;
if (t != 0) {
@@ -613,19 +610,6 @@ static void removeAllPages (void)
}
/*
- * abs - returns the absolute value.
- */
-
-int abs (int x)
-{
- if (x < 0) {
- return( -x );
- } else {
- return( x );
- }
-}
-
-/*
* min - returns the minimum of two numbers.
*/
@@ -712,7 +696,6 @@ static imageList listOfImages; // list of images defined by the region file.
void char_buffer::write_file_html (void)
{
char_block *t =head;
- char *name;
int i=0;
if (t != 0) {
@@ -760,7 +743,6 @@ void char_buffer::write_file_html (void)
static void generateImages (char *regionFileName)
{
pushBackBuffer *f=new pushBackBuffer(regionFileName);
- char ch;
while (f->putPB(f->getPB()) != eof) {
if (f->isString("grohtml-info:page")) {
@@ -775,10 +757,10 @@ static void generateImages (char *regionFileName)
listOfImages.add(x1, y1, x2, y2, page, res, maxx, name);
while ((f->putPB(f->getPB()) != '\n') &&
(f->putPB(f->getPB()) != eof)) {
- ch = f->getPB();
+ (void)f->getPB();
}
if (f->putPB(f->getPB()) == '\n') {
- ch = f->getPB();
+ (void)f->getPB();
}
} else {
/*
@@ -1034,7 +1016,7 @@ int scanArguments (int argc, char **argv)
|| (strcmp(argv[i], "-?") == 0)) {
usage(stdout);
exit(0);
- } else if (strcmp(argv[i], "troff") == 0) {
+ } else if (strcmp(argv[i], troff_command) == 0) {
/* remember troff argument number */
troff_arg = i;
#if defined(DEBUGGING)
diff --git a/src/preproc/html/pushbackbuffer.cc b/src/preproc/html/pushbackbuffer.cc
index 1d380f4d..4bea4516 100755
--- a/src/preproc/html/pushbackbuffer.cc
+++ b/src/preproc/html/pushbackbuffer.cc
@@ -48,7 +48,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define FALSE (1==0)
#endif
-# define ERROR(X) (fprintf(stderr, "%s:%d error %s\n", __FILE__, __LINE__, X) && \
+# define ERROR(X) (void)(fprintf(stderr, "%s:%d error %s\n", __FILE__, __LINE__, X) && \
(fflush(stderr)) && localexit(1))
@@ -195,7 +195,6 @@ int pushBackBuffer::isString (char *s)
{
int length=strlen(s);
int i=0;
- int j;
while ((i<length) && (putPB(getPB())==s[i])) {
if (getPB() != s[i]) {
@@ -230,10 +229,12 @@ static int isDigit (char ch)
* isHexDigit - returns TRUE if the character, ch, is a hex digit.
*/
+#if 0
static int isHexDigit (char ch)
{
return( (isDigit(ch)) || ((ch>='a') && (ch<='f')) );
}
+#endif
/*
* readInt - returns an integer from the input stream.