FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add caca terminal documentation to the user manual · gnuplot/gnuplot-old@995b255 · GitHub

Repository navigation

Commit 995b255

Browse files
sfeam
committed
add caca terminal documentation to the user manual
1 parent 97107fe commit 995b255

4 files changed

Lines changed: 25 additions & 15 deletions

File tree

‎ChangeLog‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
* src/eval.c (set_gpval_axis_sth_double): Remove unused parameter.
1616

17+
* configure.ac docs/Makefile.am term/caca.trm:
18+
Add caca terminal documentation to the user manual. Fix segfault on
19+
"set term caca driver raw".
20+
1721
2017-07-04 Bastian Maerkisch <bmaerkisch@web.de>
1822

1923
* src/win/wgnuplib.h src/win/wgraph.c src/win/wgdiplus.cpp

‎configure.ac‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dnl Process this file with autoconf to produce a configure script.
22
dnl configure.in for gnuplot on Unix.
33
dnl
4-
dnl $Id: configure.ac,v 1.34 2017-06-28 21:35:26 sfeam Exp $
4+
dnl $Id: configure.ac,v 1.35 2017-07-05 19:17:59 sfeam Exp $
55
dnl
66
dnl this is actually major.minor ...
77
dnl note that for a non-beta release, we need to disable DEVELOPMENT_RELEASE
@@ -748,10 +748,10 @@ fi
748748

749749
dnl Disable experimental support for nonlinear axes
750750
AC_ARG_WITH(nonlinear-axes,dnl
751-
[ --without-nonlinear-axes disable EXPERIMENTAL support for nonlinear axes])
751+
[ --without-nonlinear-axes disable support for nonlinear axes])
752752
if test "$with_nonlinear_axes" = no; then
753753
AC_DEFINE(DISABLE_NONLINEAR_AXES, 1,
754-
[ Define if you want to disable EXPERIMENTAL support for nonlinear axes ])
754+
[ Define if you want to disable support for nonlinear axes ])
755755
fi
756756

757757
dnl Sort help/subtopic tables by row or column
@@ -1360,7 +1360,7 @@ fi
13601360
if test "$with_caca" = yes; then
13611361
AC_MSG_RESULT([ caca terminal: yes (EXPERIMENTAL)])
13621362
else
1363-
AC_MSG_RESULT([ caca terminal: no (requires libcaca >= 0.99.beta15)])
1363+
AC_MSG_RESULT([ caca terminal: no (use --with-caca to enable)])
13641364
fi
13651365

13661366
if test "$gnuplot_framework_AquaTerm" = yes; then

‎docs/Makefile.am‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ noinst_PROGRAMS = checkdoc doc2ipf doc2tex doc2gih doc2rnh doc2hlp \
5151
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/term
5252

5353
T = $(top_srcdir)/term/
54-
CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \
54+
CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm \
5555
$(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm \
5656
$(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \
5757
$(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm \

‎term/caca.trm‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* GNUPLOT - caca.trm
33
*
4-
* $Id: caca.trm,v 1.11 2017-04-19 18:52:14 markisch Exp $
4+
* $Id: caca.trm,v 1.12 2017-07-05 19:17:59 sfeam Exp $
55
*
66
* This file uses UTF8 encoding and a tab size of 4.
77
*
@@ -197,8 +197,10 @@ static caca_canvas_t * CACA_suspend_cv = NULL;
197197
static TBOOLEAN CACA_windowed = FALSE; /* graphics output in different window*/
198198
static TBOOLEAN CACA_exportonly = FALSE; /* no output to screen but to file */
199199
static TBOOLEAN CACA_processing_events = FALSE; /* flag processing of events in CACA_text() */
200+
#ifdef WIN32
200201
static unsigned CACA_codepage = 0;
201202
static unsigned TMP_codepage;
203+
#endif
202204

203205
/* drawing */
204206
static char CACA_pen; /* current character used to draw point symbols */
@@ -810,8 +812,12 @@ CACA_init_aspect_ratio(void)
810812
if (CACA_dp) {
811813
height = caca_get_display_height(CACA_dp) / (CACA_ymax + CACA_status_height + 1);
812814
width = caca_get_display_width(CACA_dp) / (CACA_xmax + 1);
815+
/* The caca man page says "these functions never fail". */
816+
/* But in practice they can return 0. */
813817
}
814-
if (height > width) {
818+
if (height == 0 || width == 0) {
819+
term->h_tic = term->v_tic = 1;
820+
} else if (height > width) {
815821
term->h_tic = (height + width / 2) / width;
816822
term->v_tic = 1;
817823
} else {
@@ -3354,23 +3360,23 @@ START_HELP(caca)
33543360
"?terminal caca",
33553361
"?term caca",
33563362
"?caca",
3357-
" The `caca` terminal driver uses `libcaca` to plot using ascii characters.",
3358-
" In contrast to the `dumb` terminal it is a full-fledged terminal and",
3359-
" includes support for (RGB) colors, box fill, images, rotated text,",
3360-
" filled polygons, unicode character encoding and mouse interaction.",
3363+
" [EXPERIMENTAL] ",
3364+
" The `caca` terminal is a mostly-for-fun output mode that uses `libcaca` to",
3365+
" plot using ascii characters. In contrast to the `dumb` terminal it includes",
3366+
" support for color, box fill, images, rotated text, filled polygons,",
3367+
" and mouse interaction.",
33613368
"",
33623369
" Syntax:",
33633370
" set terminal caca {{driver | format} {default | <driver> | list}}",
33643371
" {color | monochrome}",
3365-
" {{no}inverted}",
3366-
" {enhanced | noenhanced}",
3372+
" {{no}inverted} {{no}enhanced}",
33673373
" {background <rgb color>}",
33683374
" {title \"<plot window title>\"}",
33693375
" {size <width>,<height>}",
33703376
" {charset ascii|blocks|unicode}",
33713377
"",
33723378
" The `driver` option selects the `libcaca` display driver or export `format`.",
3373-
" Use `default` to let `libcaca` choose the platform default display driver.",
3379+
" Use `default` is to let `libcaca` choose the platform default display driver.",
33743380
" The default driver can be changed by setting the environment variable",
33753381
" CACA_DRIVER before starting `gnuplot`.",
33763382
" Use `set term caca driver list` to print a list of supported output modes.",
@@ -3434,7 +3440,7 @@ START_HELP(caca)
34343440
"?term caca bugs",
34353441
"?caca limitations",
34363442
"?caca bugs",
3437-
" The `caca` terminal has some known bugs and limitations:",
3443+
" The `caca` terminal has known bugs and limitations:",
34383444
"",
34393445
" Closing the terminal window by clicking the \"X\" on the title line",
34403446
" does not work correctly. Press \"q\" to close the window.",

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL