diff options
author | wlemb <wlemb> | 2004-04-08 20:43:20 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2004-04-08 20:43:20 +0000 |
commit | 6db213602466ae985e880b2c7bc1fca73cdbf87b (patch) | |
tree | ea355d4fa460a526d24eea2bfceda73deb58a3a9 /src/devices/grodvi | |
parent | 8ceee8e98c76d3ba7c8fffa753ea6cf9570d4f10 (diff) | |
download | groff-6db213602466ae985e880b2c7bc1fca73cdbf87b.tar.gz |
* src/libs/libgroff/glyphuni.cpp (glyph_to_unicode_list),
src/libs/libgroff/uniglyph.cpp (unicode_to_glyph_list),
src/libs/libgroff/uniuni.cpp (unicode_decompose_list),
src/preproc/eqn/box.cpp (param_table), src/preproc/grn/hgraph.cpp
(polyfill), src/preproc/grn/main.cpp (polyfill),
src/preproc/refer/command.cpp (command_table),
src/utils/tfmtodit.cpp (lig_table): Don't use anonymous types (which
gcc 3.5 doesn't like).
Removing many compiler warnings. groff should now compile with
a C++ compiler used for C files also. [Simple variable renamings
to avoid shadowing aren't logged in detail.]
* src/devices/grodvi/dvi.cpp: Some local variable renamings.
(draw_dvi_printer::draw) ['c']: Enclose in block.
* src/devices/grohtml/post-html.cpp: Some local variable renamings.
(page::add_line): Fix typos.
* src/devices/grohtml/html-text.cpp: Some local variable renamings.
* src/devices/grolbp/lbp.cpp: Don't define _GNU_SOURCE.
Some local variable renamings.
* src/devices/grolbp/lbp.h: Some local variable renamings.
* src/devices/grolj4/lj4.cpp, src/devices/grotty/tty.cpp: Some local
variable renamings.
* src/libs/libbib/index.cpp (index_search_item_iterator::get_tag):
Remove redundant local variable declaration.
* src/libs/libbib/map.c (mapread, unmap): Don't use K&R style.
Don't use `caddr_t' but `void *'.
Enclose functions with `extern "C"' for C++.
* src/libs/libdriver/input.cpp (remember_filename,
remember_source_filename): Use cast for string constant.
* src/libs/libgroff/font.cpp, src/libs/libgroff/fontfile.cpp,
src/libs/libgroff/nametoindex.cpp, src/libs/libgroff/paper.cpp,
src/libs/libgroff/geometry.cpp: Some local variable renamings.
* src/libs/libgroff/iftoa.c, src/libs/libgroff/itoa.c: Don't use K&R
style.
Enclose functions with `extern "C"' for C++.
* src/libs/libgroff/quotearg.c (TRUE,FALSE): Define as macros.
(needs_quoting): Return `int'.
(quote_arg): Add proper casts to malloc and realloc.
* src/libs/libgroff/spawnvp.c: Compile code only for MS-DOS and
various MS Windows environments.
(spawnvp_wrapper): Add proper cast to malloc.
* src/preproc/eqn/box.h: Remove redundant declarations of
`make_script_box', `make_mark_box' and `make_lineup_box'.
* src/preproc/eqn/eqn.y: Remove redundant declaration of `strsave'.
* src/preproc/eqn/script.cpp, src/preproc/eqn/pile.cpp: Some local
variable renamings.
* src/preproc/grn/hpoint.cpp: Some local variable renamings.
* src/preproc/grn/hgraph.cpp: Some local variable renamings.
(dx, dy): Renamed functions to...
(deltax, deltay): This.
* src/preproc/grn/main.cpp: Some local variable renamings.
(deffont): Add `const'.
(initpic, conv): Use cast for string constant.
* src/preproc/html/pre-html.cpp: Some local variable renamings.
(makeFileName, alterDeviceTo, addZ): Use cast for string constant.
(char_buffer::run_output_filter): Second argument is unused.
* src/preproc/html/pushback.cpp: Some local variable renamings.
* src/preproc/pic/pic.y: Remove redundant declaration of `do_copy'.
* src/preproc/pic/object.cpp: Some local variable renamings.
* src/preproc/refer/label.y (lookup_label): Remove redundant
declaration of local variable.
* src/preproc/soelim.cpp: Remove redundant declaration of
`interpret_lf_args'.
* src/preproc/tbl/main.cpp: Some local variable renamings.
* src/roff/groff/groff.cpp (main): Use cast for string constant.
* src/roff/groff/pipeline.c: Enclose declarations of `error',
`c_fatal', and `i_to_a' with `extern "C"' for C++.
Don't use C++-style comments.
* src/roff/troff/env.h: Remove redundant declaration of `title'.
* src/roff/troff/node.h, src/roff/troff/env.cpp,
src/roff/troff/div.cpp, src/roff/troff/node.cpp: Some local variable
renamings.
* src/roff/troff/div.h: Remove redundant declaration of
`end_diversions'.
* src/roff/troff/troff.h: Remove redundant declaration of
`cleanup_and_exit'
* src/roff/troff/input.cpp: Remove redundant declaration of
`handle_first_page_transition' and `process_input_stack'.
* src/utils/hpftodit.cpp: Some local variable renamings.
* src/utils/indxbib/signal.c: Enclose functions with `extern "C"'
for C++.
Don't define RETSIGTYPE.
* src/utils/indxbib/indxbib.cpp: Some local variable renamings.
* src/utils/pfbtops/pfbtops.cpp: Don't use K&R style.
(error): Use `const' in argument.
(main): Remove redundant declaration of `optind'.
Move declaration of `Version_string' to top-level.
* PROBLEMS: Document difficulties compiling signal.c if a C++
compiler is used for C.
* Makefile.sub (DISTCLEANFILES): Add `test-groff'.
Diffstat (limited to 'src/devices/grodvi')
-rw-r--r-- | src/devices/grodvi/dvi.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/src/devices/grodvi/dvi.cpp b/src/devices/grodvi/dvi.cpp index 9a07cdc1..fb3636ec 100644 --- a/src/devices/grodvi/dvi.cpp +++ b/src/devices/grodvi/dvi.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -340,12 +340,12 @@ void dvi_printer::set_color(color *col) do_special(buf); } -void dvi_printer::set_char(int index, font *f, const environment *env, +void dvi_printer::set_char(int idx, font *f, const environment *env, int w, const char *) { if (*env->col != cur_color) set_color(env->col); - int code = f->get_code(index); + int code = f->get_code(idx); if (env->size != cur_point_size || f != cur_font) { cur_font = f; cur_point_size = env->size; @@ -384,7 +384,7 @@ void dvi_printer::set_char(int index, font *f, const environment *env, } possibly_begin_line(); end_h = env->hpos + w; - cur_h += scale(f->get_width(index, UNITWIDTH)/MULTIPLIER, + cur_h += scale(f->get_width(idx, UNITWIDTH)/MULTIPLIER, cur_point_size*RES_7227); if (cur_h > max_h) max_h = cur_h; @@ -709,24 +709,26 @@ void draw_dvi_printer::draw(int code, int *p, int np, const environment *env) fill_flag = 1; // fall through case 'c': - // troff adds an extra argument to C - if (np != 1 && !(code == 'C' && np == 2)) { - error("1 argument required for circle"); + { + // troff adds an extra argument to C + if (np != 1 && !(code == 'C' && np == 2)) { + error("1 argument required for circle"); + break; + } + moveto(env->hpos+p[0]/2, env->vpos); + if (fill_flag) + fill_next(env); + else + set_line_thickness(env); + int rad; + rad = milliinches(p[0]/2); + sprintf(buf, "%s 0 0 %d %d 0 6.28319", + (fill_flag ? "ia" : "ar"), + rad, + rad); + do_special(buf); break; } - moveto(env->hpos+p[0]/2, env->vpos); - if (fill_flag) - fill_next(env); - else - set_line_thickness(env); - int rad; - rad = milliinches(p[0]/2); - sprintf(buf, "%s 0 0 %d %d 0 6.28319", - (fill_flag ? "ia" : "ar"), - rad, - rad); - do_special(buf); - break; case 'l': if (np != 2) { error("2 arguments required for line"); |