|
From: <sm...@us...> - 2008-10-15 06:16:17
|
Revision: 8909
http://plplot.svn.sourceforge.net/plplot/?rev=8909&view=rev
Author: smekal
Date: 2008-10-15 06:16:14 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
Removed a debug message which actually spoiled the .rc files on Linux/Mac OS X leading to a segmentation fault.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2008-10-14 22:20:08 UTC (rev 8908)
+++ trunk/src/plcore.c 2008-10-15 06:16:14 UTC (rev 8909)
@@ -2183,8 +2183,6 @@
}
}
- printf("plGetDrvDir(): drvdir=%s\n", drvdir );
-
return drvdir;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-02-27 21:30:51
|
Revision: 9636
http://plplot.svn.sourceforge.net/plplot/?rev=9636&view=rev
Author: smekal
Date: 2009-02-27 21:30:47 +0000 (Fri, 27 Feb 2009)
Log Message:
-----------
Macros regarding dirent are now in plcore.c (dirent is only used here).
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-02-27 21:29:55 UTC (rev 9635)
+++ trunk/src/plcore.c 2009-02-27 21:30:47 UTC (rev 9636)
@@ -45,6 +45,33 @@
#endif
#endif
+#if HAVE_DIRENT_H
+/* The following conditional is a workaround for a bug in the MacOSX system.
+ When the dirent.h file will be fixed upstream by Apple Inc, this should
+ go away. */
+# ifdef NEED_SYS_TYPE_H
+# include <sys/types.h>
+# endif
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# if defined(_MSC_VER)
+# include "dirent_msvc.h"
+# else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+# endif
+#endif
+
#define BUFFER_SIZE 80
#define BUFFER2_SIZE 300
#define DRVSPEC_SIZE 400
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-03-03 07:21:29
|
Revision: 9664
http://plplot.svn.sourceforge.net/plplot/?rev=9664&view=rev
Author: smekal
Date: 2009-03-03 07:21:21 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
For Visual C++ getcwd and chdir must be redefined to _getcwd and _chdir. In addition direct.h must be included, where these functions are defined (only for Visual C++). Tested on Visual C++ and MinGW.
Removed an unreferenced variable as well.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-03-03 07:18:44 UTC (rev 9663)
+++ trunk/src/plcore.c 2009-03-03 07:21:21 UTC (rev 9664)
@@ -72,6 +72,18 @@
# endif
#endif
+/* AM: getcwd has a somewhat strange status on Windows, its proper
+ name is _getcwd, this is a problem in the case of DLLs, like with
+ the Java bindings. The functions _getcwd() and chdir() are
+ declared in direct.h for Visual C++. Since chdir() is deprecated
+ (but still available) in Visual C++ we redefine chdir to _chdir.
+*/
+#if defined(_MSC_VER)
+# include <direct.h>
+# define getcwd _getcwd
+# define chdir _chdir
+#endif
+
#define BUFFER_SIZE 80
#define BUFFER2_SIZE 300
#define DRVSPEC_SIZE 400
@@ -425,7 +437,6 @@
{
char *endptr;
- char *endptr2;
char msgbuf[BUFFER_SIZE];
*num = strtoul(text,&endptr,0);
@@ -2171,14 +2182,6 @@
char currdir[PLPLOT_MAX_PATH];
char builddir[PLPLOT_MAX_PATH];
-/* AM: getcwd has a somewhat strange status on Windows, its proper
- name is _getcwd, this is a problem in the case of DLLs, like with
- the Java bindings.
-*/
-#if defined(WIN32) && !defined(__BORLANDC__)
-#define getcwd _getcwd
-#endif
-
if (getcwd(currdir, PLPLOT_MAX_PATH) == NULL) {
pldebug("plInBuildTree():", "Not enough buffer space");
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hba...@us...> - 2009-04-10 02:22:11
|
Revision: 9798
http://plplot.svn.sourceforge.net/plplot/?rev=9798&view=rev
Author: hbabcock
Date: 2009-04-10 01:46:03 +0000 (Fri, 10 Apr 2009)
Log Message:
-----------
Fixed a bug in the new unicode text handling. We were trying to look up the unicode equivalent of a unicode character in the hershey_to_unicode_lookup_table.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-04-08 19:31:08 UTC (rev 9797)
+++ trunk/src/plcore.c 2009-04-10 01:46:03 UTC (rev 9798)
@@ -615,8 +615,7 @@
args.n_fci = fci;
args.n_ctrl_char = PLTEXT_FONTCHANGE;
plP_esc(PLESC_CONTROL_CHAR, &args);
- args.n_char = \
- (PLUNICODE)hershey_to_unicode_lookup_table[idx].Unicode;
+ args.n_char = code;
plP_esc(PLESC_TEXT_CHAR, &args);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-09-08 03:08:16
|
Revision: 10383
http://plplot.svn.sourceforge.net/plplot/?rev=10383&view=rev
Author: airwin
Date: 2009-09-08 03:08:07 +0000 (Tue, 08 Sep 2009)
Log Message:
-----------
Protect all device driver calls using the (now) reentrant plsave_set_locale
and plrestore_locale. The former saves the fundamental PLplot LC_NUMERIC
locale and then sets the LC_NUMERIC locale to "C" for everything done by all
device drivers. Of course, any library called by a device driver can also
change the locale, but we guard against such changes affecting the rest of
PLplot by using plrestore_locale to restore the fundamental PLplot
LC_NUMERIC locale saved by plsave_set_locale.
N.B. this logic allows the fundamental PLplot LC_NUMERIC locale (except for
the parts like the device drivers and palette file reading that are
protected by the combination of plsave_set_locale and plrestore_locale) to
be any valid locale set by any application or library that calls the PLplot
library. If that locale specifies comma decimal separators rather than
period decimal separators, for example, then the PLplot core will
automatically use those for for specifying axis labels. Those commas for
axis labels are drawn by the PLplot core for the Hershey font device drivers
or just propagate to the unicode device drivers as UCS4 arrays. Thus, in
both cases, we get a comma decimal separator for axis labels (if that is
what the fundamental PLplot LC_NUMERIC locale calls for) independently of
the logic of the present commit that sets the LC_NUMERIC locale to "C" for
all device driver code that is executed.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-09-08 02:45:49 UTC (rev 10382)
+++ trunk/src/plcore.c 2009-09-08 03:08:07 UTC (rev 10383)
@@ -131,9 +131,12 @@
void
plP_init(void)
{
+ char * save_locale;
plsc->page_status = AT_EOP;
+ save_locale = plsave_set_locale();
(*plsc->dispatch_table->pl_init) ((struct PLStream_struct *) plsc);
+ plrestore_locale(save_locale);
if (plsc->plbuf_write)
plbuf_init(plsc);
@@ -161,8 +164,11 @@
if (plsc->eop_handler != NULL)
(*plsc->eop_handler) (plsc->eop_data, &skip_driver_eop);
- if (!skip_driver_eop)
- (*plsc->dispatch_table->pl_eop) ((struct PLStream_struct *) plsc);
+ if (!skip_driver_eop) {
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_eop) ((struct PLStream_struct *) plsc);
+ plrestore_locale(save_locale);
+ }
}
/* Set up new page. */
@@ -187,8 +193,11 @@
if (plsc->bop_handler != NULL)
(*plsc->bop_handler) (plsc->bop_data, &skip_driver_bop);
- if (!skip_driver_bop)
- (*plsc->dispatch_table->pl_bop) ((struct PLStream_struct *) plsc);
+ if (!skip_driver_bop) {
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_bop) ((struct PLStream_struct *) plsc);
+ plrestore_locale(save_locale);
+ }
if (plsc->plbuf_write)
plbuf_bop(plsc);
@@ -199,13 +208,16 @@
void
plP_tidy(void)
{
+ char * save_locale;
if (plsc->tidy) {
(*plsc->tidy) (plsc->tidy_data);
plsc->tidy = NULL;
plsc->tidy_data = NULL;
}
+ save_locale = plsave_set_locale();
(*plsc->dispatch_table->pl_tidy) ((struct PLStream_struct *) plsc);
+ plrestore_locale(save_locale);
if (plsc->plbuf_write) {
plbuf_tidy(plsc);
@@ -220,9 +232,12 @@
void
plP_state(PLINT op)
{
+ char * save_locale;
if (plsc->plbuf_write) plbuf_state(plsc, op);
+ save_locale = plsave_set_locale();
(*plsc->dispatch_table->pl_state) ((struct PLStream_struct *) plsc, op);
+ plrestore_locale(save_locale);
}
/* Escape function, for driver-specific commands. */
@@ -230,6 +245,7 @@
void
plP_esc(PLINT op, void *ptr)
{
+ char * save_locale;
PLINT clpxmi, clpxma, clpymi, clpyma;
EscText* args;
@@ -247,7 +263,9 @@
}
}
+ save_locale = plsave_set_locale();
(*plsc->dispatch_table->pl_esc) ((struct PLStream_struct *) plsc, op, ptr);
+ plrestore_locale(save_locale);
}
/* Set up plot window parameters. */
@@ -295,8 +313,10 @@
/* It must use the filtered data, which it can get from *plsc */
if (plsc->dev_swin) {
- (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
- PLESC_SWIN, NULL );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
+ PLESC_SWIN, NULL );
+ plrestore_locale(save_locale);
}
}
@@ -971,26 +991,33 @@
static void
grline(short *x, short *y, PLINT npts)
{
- (*plsc->dispatch_table->pl_line) ( (struct PLStream_struct *) plsc,
- x[0], y[0], x[1], y[1] );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_line) ( (struct PLStream_struct *) plsc,
+ x[0], y[0], x[1], y[1] );
+ plrestore_locale(save_locale);
}
static void
grpolyline(short *x, short *y, PLINT npts)
{
- (*plsc->dispatch_table->pl_polyline) ( (struct PLStream_struct *) plsc,
- x, y, npts );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_polyline) ( (struct PLStream_struct *) plsc,
+ x, y, npts );
+ plrestore_locale(save_locale);
}
static void
grfill(short *x, short *y, PLINT npts)
{
+ char * save_locale;
plsc->dev_npts = npts;
plsc->dev_x = x;
plsc->dev_y = y;
+ save_locale = plsave_set_locale();
(*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
PLESC_FILL, NULL );
+ plrestore_locale(save_locale);
}
/*--------------------------------------------------------------------------*\
@@ -1362,8 +1389,10 @@
PLINT pxmin, pxmax, pymin, pymax, pxlen, pylen;
if (plsc->dev_di) {
- (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
- PLESC_DI, NULL );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
+ PLESC_DI, NULL );
+ plrestore_locale(save_locale);
}
if ( ! (plsc->difilt & PLDI_PLT))
@@ -1444,8 +1473,10 @@
PLINT pxmin, pxmax, pymin, pymax, pxlen, pylen;
if (plsc->dev_di) {
- (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
- PLESC_DI, NULL );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
+ PLESC_DI, NULL );
+ plrestore_locale(save_locale);
}
if ( ! (plsc->difilt & PLDI_DEV))
@@ -1562,8 +1593,10 @@
PLFLT x0, y0, lx, ly, aspect;
if (plsc->dev_di) {
- (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
- PLESC_DI, NULL );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
+ PLESC_DI, NULL );
+ plrestore_locale(save_locale);
}
if ( ! (plsc->difilt & PLDI_ORI))
@@ -1711,8 +1744,10 @@
c_plflush(void)
{
if (plsc->dev_flush) {
- (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
- PLESC_FLUSH, NULL );
+ char *save_locale = plsave_set_locale();
+ (*plsc->dispatch_table->pl_esc) ( (struct PLStream_struct *) plsc,
+ PLESC_FLUSH, NULL );
+ plrestore_locale(save_locale);
}
else {
if (plsc->OutFile != NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-11-23 05:29:45
|
Revision: 10623
http://plplot.svn.sourceforge.net/plplot/?rev=10623&view=rev
Author: airwin
Date: 2009-11-23 05:29:30 +0000 (Mon, 23 Nov 2009)
Log Message:
-----------
Disallow momentary change to symbol font for PLplot escape
sequences (Hershey, hexadecimal, and Greek) for specifying
unicode.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-11-23 05:27:16 UTC (rev 10622)
+++ trunk/src/plcore.c 2009-11-23 05:29:30 UTC (rev 10623)
@@ -33,9 +33,10 @@
*/
#define DEBUG
-/* Allow momentary change to symbol font for certain PLplot-specific
- * escape-sequence encodings for unicode. */
-#define PL_MOMENTARY_SYMBOL_FONT
+/* Disallow momentary change to symbol font for PLplot escape
+ * sequences (Hershey, hexadecimal, and Greek) for specifying
+ * unicode. */
+#undef PL_MOMENTARY_SYMBOL_FONT
#define NEED_PLDEBUG
#include "plcore.h"
@@ -2014,9 +2015,9 @@
plstrm_init();
/* Set title for window to a sensible default if not defined */
- if ( plsc->plwindow == NULL )
+ if ( plsc->plwindow == NULL )
{
- if ( plsc->program )
+ if ( plsc->program )
{
if (( plsc->plwindow = (char *) malloc((size_t) ( 1 + strlen( plsc->program )) * sizeof ( char ))) == NULL )
{
@@ -2033,7 +2034,7 @@
strcpy( plsc->plwindow, "PLplot" );
}
}
-
+
/* Initialize device & first page */
plP_init();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-12-06 03:20:55
|
Revision: 10687
http://plplot.svn.sourceforge.net/plplot/?rev=10687&view=rev
Author: airwin
Date: 2009-12-06 03:20:48 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Calculate affine transformation for orientation using new affine utilities.
Results for an -ori 0.2 test were identical. This is an excellent test of
the translate, scale, rotate, and multiply affine utilities.
BTW, the results still suck (are skewed) at non-integral -ori just like
before. However, we at least now know the exact elementary affine
transformations whose product is used to calculate the complete orientation
transformation.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-12-06 03:13:49 UTC (rev 10686)
+++ trunk/src/plcore.c 2009-12-06 03:20:48 UTC (rev 10687)
@@ -11,7 +11,7 @@
* Copyright (C) 2004, 2005 Rafael Laboissiere
* Copyright (C) 2004, 2006 Andrew Ross
* Copyright (C) 2004 Andrew Roach
- * Copyright (C) 2005 Alan W. Irwin
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Alan W. Irwin
* Copyright (C) 2005 Thomas J. Duck
*
* This file is part of PLplot.
@@ -1798,6 +1798,7 @@
{
PLFLT r11, r21, r12, r22, cost, sint;
PLFLT x0, y0, lx, ly, aspect;
+ PLFLT affineA[NAFFINE], affineB[NAFFINE], affineC[NAFFINE];
if ( plsc->dev_di )
{
@@ -1850,13 +1851,34 @@
/* Transformation coefficients */
- plsc->dioxax = r11;
- plsc->dioxay = r21 * ( lx / ly );
- plsc->dioxb = ( 1. - r11 ) * x0 - r21 * y0 * ( lx / ly );
+ /*
+ * plsc->dioxax = r11;
+ * plsc->dioxay = r21 * ( lx / ly );
+ * plsc->dioxb = ( 1. - r11 ) * x0 - r21 * y0 * ( lx / ly );
+ *
+ * plsc->dioyax = r12 * ( ly / lx );
+ * plsc->dioyay = r22;
+ * plsc->dioyb = ( 1. - r22 ) * y0 - r12 * x0 * ( ly / lx );
+ */
- plsc->dioyax = r12 * ( ly / lx );
- plsc->dioyay = r22;
- plsc->dioyb = ( 1. - r22 ) * y0 - r12 * x0 * ( ly / lx );
+ /* Calculate affine transformation as product of translate to middle
+ * of device, scale to relative device coordinates, rotate, unscale
+ * to physical coordinates, untranslate to original zero point. */
+ plP_affine_translate( affineC, x0, y0 );
+ plP_affine_scale( affineB, lx, ly );
+ plP_affine_multiply( affineA, affineB, affineC );
+ plP_affine_rotate( affineC, plsc->diorot * 90. );
+ plP_affine_multiply( affineB, affineC, affineA );
+ plP_affine_scale( affineC, 1. / lx, 1. / ly );
+ plP_affine_multiply( affineA, affineC, affineB );
+ plP_affine_translate( affineC, -x0, -y0 );
+ plP_affine_multiply( affineB, affineC, affineA );
+ plsc->dioxax = affineB[0];
+ plsc->dioxay = affineB[2];
+ plsc->dioxb = affineB[4];
+ plsc->dioyax = affineB[1];
+ plsc->dioyay = affineB[3];
+ plsc->dioyb = affineB[5];
}
/*--------------------------------------------------------------------------*\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-12-06 22:42:38
|
Revision: 10689
http://plplot.svn.sourceforge.net/plplot/?rev=10689&view=rev
Author: airwin
Date: 2009-12-06 22:42:29 +0000 (Sun, 06 Dec 2009)
Log Message:
-----------
Make manipulation of affine matrices more understandable by only using two
of them that are labelled _result for all previous multiplication results and
_left for left-hand matrix that multiplies the previous multiplication result
matrix.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-12-06 22:31:07 UTC (rev 10688)
+++ trunk/src/plcore.c 2009-12-06 22:42:29 UTC (rev 10689)
@@ -1798,7 +1798,7 @@
{
PLFLT r11, r21, r12, r22, cost, sint;
PLFLT x0, y0, lx, ly, aspect;
- PLFLT affineA[NAFFINE], affineB[NAFFINE], affineC[NAFFINE];
+ PLFLT affine_result[NAFFINE], affine_left[NAFFINE];
if ( plsc->dev_di )
{
@@ -1864,21 +1864,21 @@
/* Calculate affine transformation as product of translate to middle
* of device, scale to relative device coordinates, rotate, unscale
* to physical coordinates, untranslate to original zero point. */
- plP_affine_translate( affineC, x0, y0 );
- plP_affine_scale( affineB, lx, ly );
- plP_affine_multiply( affineA, affineB, affineC );
- plP_affine_rotate( affineC, plsc->diorot * 90. );
- plP_affine_multiply( affineB, affineC, affineA );
- plP_affine_scale( affineC, 1. / lx, 1. / ly );
- plP_affine_multiply( affineA, affineC, affineB );
- plP_affine_translate( affineC, -x0, -y0 );
- plP_affine_multiply( affineB, affineC, affineA );
- plsc->dioxax = affineB[0];
- plsc->dioxay = affineB[2];
- plsc->dioxb = affineB[4];
- plsc->dioyax = affineB[1];
- plsc->dioyay = affineB[3];
- plsc->dioyb = affineB[5];
+ plP_affine_translate( affine_result, x0, y0 );
+ plP_affine_scale( affine_left, lx, ly );
+ plP_affine_multiply( affine_result, affine_left, affine_result );
+ plP_affine_rotate( affine_left, plsc->diorot * 90. );
+ plP_affine_multiply( affine_result, affine_left, affine_result );
+ plP_affine_scale( affine_left, 1. / lx, 1. / ly );
+ plP_affine_multiply( affine_result, affine_left, affine_result );
+ plP_affine_translate( affine_left, -x0, -y0 );
+ plP_affine_multiply( affine_result, affine_left, affine_result );
+ plsc->dioxax = affine_result[0];
+ plsc->dioxay = affine_result[2];
+ plsc->dioxb = affine_result[4];
+ plsc->dioyax = affine_result[1];
+ plsc->dioyay = affine_result[3];
+ plsc->dioyb = affine_result[5];
}
/*--------------------------------------------------------------------------*\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2009-12-09 23:08:54
|
Revision: 10716
http://plplot.svn.sourceforge.net/plplot/?rev=10716&view=rev
Author: andrewross
Date: 2009-12-09 23:08:42 +0000 (Wed, 09 Dec 2009)
Log Message:
-----------
Alternative neater approach to fixing problem with overlapping data buffer.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-12-09 22:49:12 UTC (rev 10715)
+++ trunk/src/plcore.c 2009-12-09 23:08:42 UTC (rev 10716)
@@ -961,9 +961,11 @@
if ( ptr == NULL )
{
char buf[BUFFER_SIZE];
- strncpy( buf, "UTF-8 string is malformed: ", BUFFER_SIZE );
- strncat( buf, string, 30 );
- if ( strlen( string ) > 30 ) strncat( buf, "[...]", 5 );
+ char tmpstring[31];
+ strncpy( tmpstring, string, 30 );
+ tmpstring[30] = '\0';
+ snprintf( buf, BUFFER_SIZE, "UTF-8 string is malformed: %s%s",
+ tmpstring, strlen( string ) > 30 ? "[...]" : "" );
plabort( buf );
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-12-16 19:54:22
|
Revision: 10722
http://plplot.svn.sourceforge.net/plplot/?rev=10722&view=rev
Author: smekal
Date: 2009-12-16 19:54:02 +0000 (Wed, 16 Dec 2009)
Log Message:
-----------
The file handle fp_drvdb is only available if ENABLE_DYNDRIVERS is defined. So two more lines need to be #ifdef-ed out.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-12-16 00:44:29 UTC (rev 10721)
+++ trunk/src/plcore.c 2009-12-16 19:54:02 UTC (rev 10722)
@@ -2805,7 +2805,9 @@
if (( dispatch_table = (PLDispatchTable **)
malloc(( nplstaticdevices + npldynamicdevices ) * sizeof ( PLDispatchTable * ))) == NULL )
{
+#ifdef ENABLE_DYNDRIVERS
fclose( fp_drvdb );
+#endif
plexit( "plInitDispatchTable: Insufficient memory" );
}
@@ -2818,7 +2820,9 @@
{
if (( dispatch_table[n] = (PLDispatchTable *) malloc( sizeof ( PLDispatchTable ))) == NULL )
{
+#ifdef ENABLE_DYNDRIVERS
fclose( fp_drvdb );
+#endif
plexit( "plInitDispatchTable: Insufficient memory" );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hba...@us...> - 2010-01-06 21:33:32
|
Revision: 10738
http://plplot.svn.sourceforge.net/plplot/?rev=10738&view=rev
Author: hbabcock
Date: 2010-01-06 21:33:22 +0000 (Wed, 06 Jan 2010)
Log Message:
-----------
Separate old and new unicode text handling loops so that the -save option will work properly.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-01-06 20:21:34 UTC (rev 10737)
+++ trunk/src/plcore.c 2010-01-06 21:33:22 UTC (rev 10738)
@@ -95,33 +95,33 @@
#include <errno.h>
/*--------------------------------------------------------------------------*\
- * Driver Interface
- *
- * These routines are the low-level interface to the driver -- all calls to
- * driver functions must pass through here. For implementing driver-
- * specific functions, the escape function is provided. The command stream
- * gets duplicated to the plot buffer here.
- *
- * All functions that result in graphics actually being plotted (rather than
- * just a change of state) are filtered as necessary before being passed on.
- * The default settings do not require any filtering, i.e. PLplot physical
- * coordinates are the same as the device physical coordinates (currently
- * this can't be changed anyway), and a global view equal to the entire page
- * is used.
- *
- * The reason one wants to put view-specific filtering here is that if
- * enabled, the plot buffer should receive the unfiltered data stream. This
- * allows a specific view to be used from an interactive device (e.g. TCL/TK
- * driver) but be restored to the full view at any time merely by
- * reprocessing the contents of the plot buffer.
- *
- * The metafile, on the other hand, *should* be affected by changes in the
- * view, since this is a crucial editing capability. It is recommended that
- * the initial metafile be created without a restricted global view, and
- * modification of the view done on a per-plot basis as desired during
- * subsequent processing.
- *
- \*--------------------------------------------------------------------------*/
+* Driver Interface
+*
+* These routines are the low-level interface to the driver -- all calls to
+* driver functions must pass through here. For implementing driver-
+* specific functions, the escape function is provided. The command stream
+* gets duplicated to the plot buffer here.
+*
+* All functions that result in graphics actually being plotted (rather than
+* just a change of state) are filtered as necessary before being passed on.
+* The default settings do not require any filtering, i.e. PLplot physical
+* coordinates are the same as the device physical coordinates (currently
+* this can't be changed anyway), and a global view equal to the entire page
+* is used.
+*
+* The reason one wants to put view-specific filtering here is that if
+* enabled, the plot buffer should receive the unfiltered data stream. This
+* allows a specific view to be used from an interactive device (e.g. TCL/TK
+* driver) but be restored to the full view at any time merely by
+* reprocessing the contents of the plot buffer.
+*
+* The metafile, on the other hand, *should* be affected by changes in the
+* view, since this is a crucial editing capability. It is recommended that
+* the initial metafile be created without a restricted global view, and
+* modification of the view done on a per-plot basis as desired during
+* subsequent processing.
+*
+\*--------------------------------------------------------------------------*/
enum { AT_BOP, DRAWING, AT_EOP };
@@ -333,8 +333,8 @@
}
/*--------------------------------------------------------------------------*\
- * Drawing commands.
- \*--------------------------------------------------------------------------*/
+* Drawing commands.
+\*--------------------------------------------------------------------------*/
/* Draw line between two points */
/* The plot buffer must be called first so it gets the unfiltered data */
@@ -506,17 +506,17 @@
*/
/*--------------------------------------------------------------------------*\
- * int text2num( char *text, char end, PLUNICODE *num)
- * char *text - pointer to the text to be parsed
- * char end - end character (i.e. ')' or ']' to stop parsing
- * PLUNICODE *num - pointer to an PLUNICODE to store the value
- *
- * Function takes a string, which can be either hex or decimal,
- * and converts it into an PLUNICODE, stopping at either a null,
- * or the character pointed to by 'end'. This implementation using
- * the C library strtoul replaces the original brain-dead version
- * and should be more robust to invalid control strings.
- \*--------------------------------------------------------------------------*/
+* int text2num( char *text, char end, PLUNICODE *num)
+* char *text - pointer to the text to be parsed
+* char end - end character (i.e. ')' or ']' to stop parsing
+* PLUNICODE *num - pointer to an PLUNICODE to store the value
+*
+* Function takes a string, which can be either hex or decimal,
+* and converts it into an PLUNICODE, stopping at either a null,
+* or the character pointed to by 'end'. This implementation using
+* the C library strtoul replaces the original brain-dead version
+* and should be more robust to invalid control strings.
+\*--------------------------------------------------------------------------*/
int text2num( const char *text, char end, PLUNICODE *num )
{
@@ -535,22 +535,22 @@
}
/*--------------------------------------------------------------------------*\
- * int text2fci( char *text, unsigned char *hexdigit, unsigned char *hexpower)
- * char *text - pointer to the text to be parsed
- * unsigned char *hexdigit - pointer to hex value that is stored.
- * unsigned char *hexpower - pointer to hex power (left shift) that is stored.
- *
- * Function takes a pointer to a string, which is looked up in a table
- * to determine the corresponding FCI (font characterization integer)
- * hex digit value and hex power (left shift). All matched strings
- * start with "<" and end with the two characters "/>".
- * If the lookup succeeds, hexdigit and hexpower are set to the appropriate
- * values in the table, and the function returns the number of characters
- * in text that are consumed by the matching string in the table lookup.
- *
- * If the lookup fails, hexdigit is set to 0, hexpower is set to and
- * impossible value, and the function returns 0.
- \*--------------------------------------------------------------------------*/
+* int text2fci( char *text, unsigned char *hexdigit, unsigned char *hexpower)
+* char *text - pointer to the text to be parsed
+* unsigned char *hexdigit - pointer to hex value that is stored.
+* unsigned char *hexpower - pointer to hex power (left shift) that is stored.
+*
+* Function takes a pointer to a string, which is looked up in a table
+* to determine the corresponding FCI (font characterization integer)
+* hex digit value and hex power (left shift). All matched strings
+* start with "<" and end with the two characters "/>".
+* If the lookup succeeds, hexdigit and hexpower are set to the appropriate
+* values in the table, and the function returns the number of characters
+* in text that are consumed by the matching string in the table lookup.
+*
+* If the lookup fails, hexdigit is set to 0, hexpower is set to and
+* impossible value, and the function returns 0.
+\*--------------------------------------------------------------------------*/
int text2fci( const char *text, unsigned char *hexdigit, unsigned char *hexpower )
{
@@ -648,11 +648,6 @@
* string. */
plgfci( &fci );
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- plP_esc( PLESC_BEGIN_TEXT, &args );
- }
/* Walk through the string, and convert
* some stuff to unicode on the fly */
for ( j = i = 0; i < len; i++ )
@@ -674,17 +669,6 @@
unicode_buffer[j++] = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
- if ( plsc->alt_unicode )
- {
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
- args.n_char = \
- (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
- plP_esc( PLESC_TEXT_CHAR, &args );
- }
/* if unicode_buffer[j-1] corresponds to the escape
* character must unescape it by appending one more.
@@ -697,13 +681,6 @@
#ifdef PL_MOMENTARY_SYMBOL_FONT
fci = fcisave;
unicode_buffer[j++] = fci;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
#endif
j--;
skip = 1;
@@ -718,16 +695,6 @@
#endif
unicode_buffer[j++] = code;
- if ( plsc->alt_unicode )
- {
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
- args.n_char = code;
- plP_esc( PLESC_TEXT_CHAR, &args );
- }
/* if unicode_buffer[j-1] corresponds to the escape
* character must unescape it by appending one more.
@@ -740,13 +707,6 @@
#ifdef PL_MOMENTARY_SYMBOL_FONT
fci = fcisave;
unicode_buffer[j++] = fci;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
#endif
j--;
skip = 1;
@@ -764,13 +724,6 @@
fci = code;
unicode_buffer[j] = fci;
skip = 1;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
}
else
{
@@ -784,13 +737,6 @@
plP_hex2fci( hexdigit, hexpower, &fci );
unicode_buffer[j] = fci;
skip = 1;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
}
}
else
@@ -801,13 +747,6 @@
plP_hex2fci( hexdigit, hexpower, &fci );
unicode_buffer[j] = fci;
skip = 1;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
}
}
break;
@@ -850,13 +789,6 @@
i += 2;
unicode_buffer[j] = fci;
skip = 1;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
}
break;
@@ -870,13 +802,6 @@
fcisave = fci;
plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
unicode_buffer[j++] = fci;
-
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
#endif
ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
@@ -890,13 +815,6 @@
i += 2;
skip = 1; /* skip is set if we have copied something
* into the unicode table */
-
- if ( plsc->alt_unicode )
- {
- args.n_char = \
- (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
- plP_esc( PLESC_TEXT_CHAR, &args );
- }
}
else
{
@@ -906,47 +824,14 @@
i += 2;
skip = 1; /* skip is set if we have copied something
* into the unicode table */
-
- if ( plsc->alt_unicode )
- {
- args.n_char = \
- (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
- plP_esc( PLESC_TEXT_CHAR, &args );
- }
}
#ifdef PL_MOMENTARY_SYMBOL_FONT
fci = fcisave;
unicode_buffer[j++] = fci;
- if ( plsc->alt_unicode )
- {
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- }
#endif
j--;
break;
-
- case 'u':
- if ( plsc->alt_unicode )
- {
- args.n_ctrl_char = PLTEXT_SUPERSCRIPT;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- i += 1;
- skip = 1;
- }
- break;
-
- case 'd':
- if ( plsc->alt_unicode )
- {
- args.n_ctrl_char = PLTEXT_SUBSCRIPT;
- plP_esc( PLESC_CONTROL_CHAR, &args );
- i += 1;
- skip = 1;
- }
- break;
}
}
@@ -979,16 +864,7 @@
{
i++;
unicode_buffer[++j] = esc;
- args.n_char = esc;
}
- else
- {
- args.n_char = unichar;
- }
- if ( plsc->alt_unicode )
- {
- plP_esc( PLESC_TEXT_CHAR, &args );
- }
}
j++;
}
@@ -1001,15 +877,274 @@
* though it is
* currently static) */
}
- else
- /* Don't print anything, if there is no unicode to print! */
+
+
+ /* The alternate unicode text handling loop. */
+
+ if ( plsc->alt_unicode )
+ {
+ args.n_fci = fci;
+ plP_esc( PLESC_BEGIN_TEXT, &args );
+
+ for ( i = 0; i < len; i++ )
+ {
+ skip = 0;
+
+ if ( string[i] == esc )
+ {
+ switch ( string[i + 1] )
+ {
+ case '(': /* hershey code */
+ i += 2 + text2num( &string[i + 2], ')', &code );
+ idx = plhershey2unicode( code );
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ fcisave = fci;
+ plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
+ args.n_char = \
+ (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
+ plP_esc( PLESC_TEXT_CHAR, &args );
+
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ fci = fcisave;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
+ skip = 1;
+ break;
+
+ case '[': /* unicode */
+ i += 2 + text2num( &string[i + 2], ']', &code );
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ fcisave = fci;
+ plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
+#endif
+
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
+ args.n_char = code;
+ plP_esc( PLESC_TEXT_CHAR, &args );
+
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ fci = fcisave;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
+ skip = 1;
+ break;
+
+ case '<': /* change font*/
+ if ( '0' <= string[i + 2] && string[i + 2] <= '9' )
+ {
+ i += 2 + text2num( &string[i + 2], '>', &code );
+ if ( code & PL_FCI_MARK )
+ {
+ /* code is a complete FCI (font characterization
+ * integer): change FCI to this value.
+ */
+ fci = code;
+ skip = 1;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ }
+ else
+ {
+ /* code is not complete FCI. Change
+ * FCI with hex power in rightmost hex
+ * digit and hex digit value in second rightmost
+ * hex digit.
+ */
+ hexdigit = ( code >> 4 ) & PL_FCI_HEXDIGIT_MASK;
+ hexpower = code & PL_FCI_HEXPOWER_MASK;
+ plP_hex2fci( hexdigit, hexpower, &fci );
+ skip = 1;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ }
+ }
+ else
+ {
+ i += text2fci( &string[i + 1], &hexdigit, &hexpower );
+ if ( hexpower < 7 )
+ {
+ plP_hex2fci( hexdigit, hexpower, &fci );
+ skip = 1;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ }
+ }
+ break;
+
+ case 'f': /* Deprecated Hershey-style font change*/
+ case 'F': /* Deprecated Hershey-style font change*/
+ /* We implement an approximate response here so that
+ * reasonable results are obtained for unicode fonts,
+ * but this method is deprecated and the #<nnn> or
+ * #<command string> methods should be used instead
+ * to change unicode fonts in mid-string.
+ */
+ fci = PL_FCI_MARK;
+ if ( string[i + 2] == 'n' )
+ {
+ /* medium, upright, sans-serif */
+ plP_hex2fci( PL_FCI_SANS, PL_FCI_FAMILY, &fci );
+ }
+ else if ( string[i + 2] == 'r' )
+ {
+ /* medium, upright, serif */
+ plP_hex2fci( PL_FCI_SERIF, PL_FCI_FAMILY, &fci );
+ }
+ else if ( string[i + 2] == 'i' )
+ {
+ /* medium, italic, serif */
+ plP_hex2fci( PL_FCI_ITALIC, PL_FCI_STYLE, &fci );
+ plP_hex2fci( PL_FCI_SERIF, PL_FCI_FAMILY, &fci );
+ }
+ else if ( string[i + 2] == 's' )
+ {
+ /* medium, upright, script */
+ plP_hex2fci( PL_FCI_SCRIPT, PL_FCI_FAMILY, &fci );
+ }
+ else
+ fci = PL_FCI_IMPOSSIBLE;
+
+ if ( fci != PL_FCI_IMPOSSIBLE )
+ {
+ i += 2;
+ skip = 1;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ }
+ break;
+
+ case 'g': /* Greek font */
+ case 'G': /* Greek font */
+ /* Get the index in the lookup table
+ * 527 = upper case alpha displacement in Hershey Table
+ * 627 = lower case alpha displacement in Hershey Table
+ */
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ fcisave = fci;
+ plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
+
+ ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
+ if ( ig >= 0 )
+ {
+ if ( ig >= 24 )
+ ig = ig + 100 - 24;
+ idx = plhershey2unicode( ig + 527 );
+ i += 2;
+ skip = 1; /* skip is set if we have copied something
+ * into the unicode table */
+
+ args.n_char = \
+ (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
+ plP_esc( PLESC_TEXT_CHAR, &args );
+ }
+ else
+ {
+ /* Use "unknown" unicode character if string[i+2]
+ * is not in the Greek array.*/
+ i += 2;
+ skip = 1; /* skip is set if we have copied something
+ * into the unicode table */
+
+ args.n_char = \
+ (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
+ plP_esc( PLESC_TEXT_CHAR, &args );
+ }
+#ifdef PL_MOMENTARY_SYMBOL_FONT
+ fci = fcisave;
+
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
+ break;
+
+ case 'u':
+ args.n_ctrl_char = PLTEXT_SUPERSCRIPT;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ i += 1;
+ skip = 1;
+ break;
+
+ case 'd':
+ args.n_ctrl_char = PLTEXT_SUBSCRIPT;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ i += 1;
+ skip = 1;
+ break;
+ }
+ }
+
+ if ( skip == 0 )
+ {
+ PLUNICODE unichar = 0;
+#ifdef HAVE_LIBUNICODE
+ char * ptr = unicode_get_utf8( string + i, &unichar );
+#else
+ char * ptr = utf8_to_ucs4( string + i, &unichar );
+#endif
+ if ( ptr == NULL )
+ {
+ char buf[BUFFER_SIZE];
+ char tmpstring[31];
+ strncpy( tmpstring, string, 30 );
+ tmpstring[30] = '\0';
+ snprintf( buf, BUFFER_SIZE, "UTF-8 string is malformed: %s%s",
+ tmpstring, strlen( string ) > 30 ? "[...]" : "" );
+ plabort( buf );
+ return;
+ }
+ i += ptr - ( string + i ) - 1;
+
+ /* Search for escesc (an unescaped escape) in the input
+ * string and adjust unicode_buffer accordingly).
+ */
+ if ( string[i] == esc && string[i + 1] == esc )
+ {
+ ...
[truncated message content] |
|
From: <ai...@us...> - 2010-01-06 23:08:24
|
Revision: 10739
http://plplot.svn.sourceforge.net/plplot/?rev=10739&view=rev
Author: airwin
Date: 2010-01-06 23:08:17 +0000 (Wed, 06 Jan 2010)
Log Message:
-----------
Restore back to uncrustify comment style that somehow got changed by last
commit. These changes are only whitespace.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-01-06 21:33:22 UTC (rev 10738)
+++ trunk/src/plcore.c 2010-01-06 23:08:17 UTC (rev 10739)
@@ -95,33 +95,33 @@
#include <errno.h>
/*--------------------------------------------------------------------------*\
-* Driver Interface
-*
-* These routines are the low-level interface to the driver -- all calls to
-* driver functions must pass through here. For implementing driver-
-* specific functions, the escape function is provided. The command stream
-* gets duplicated to the plot buffer here.
-*
-* All functions that result in graphics actually being plotted (rather than
-* just a change of state) are filtered as necessary before being passed on.
-* The default settings do not require any filtering, i.e. PLplot physical
-* coordinates are the same as the device physical coordinates (currently
-* this can't be changed anyway), and a global view equal to the entire page
-* is used.
-*
-* The reason one wants to put view-specific filtering here is that if
-* enabled, the plot buffer should receive the unfiltered data stream. This
-* allows a specific view to be used from an interactive device (e.g. TCL/TK
-* driver) but be restored to the full view at any time merely by
-* reprocessing the contents of the plot buffer.
-*
-* The metafile, on the other hand, *should* be affected by changes in the
-* view, since this is a crucial editing capability. It is recommended that
-* the initial metafile be created without a restricted global view, and
-* modification of the view done on a per-plot basis as desired during
-* subsequent processing.
-*
-\*--------------------------------------------------------------------------*/
+ * Driver Interface
+ *
+ * These routines are the low-level interface to the driver -- all calls to
+ * driver functions must pass through here. For implementing driver-
+ * specific functions, the escape function is provided. The command stream
+ * gets duplicated to the plot buffer here.
+ *
+ * All functions that result in graphics actually being plotted (rather than
+ * just a change of state) are filtered as necessary before being passed on.
+ * The default settings do not require any filtering, i.e. PLplot physical
+ * coordinates are the same as the device physical coordinates (currently
+ * this can't be changed anyway), and a global view equal to the entire page
+ * is used.
+ *
+ * The reason one wants to put view-specific filtering here is that if
+ * enabled, the plot buffer should receive the unfiltered data stream. This
+ * allows a specific view to be used from an interactive device (e.g. TCL/TK
+ * driver) but be restored to the full view at any time merely by
+ * reprocessing the contents of the plot buffer.
+ *
+ * The metafile, on the other hand, *should* be affected by changes in the
+ * view, since this is a crucial editing capability. It is recommended that
+ * the initial metafile be created without a restricted global view, and
+ * modification of the view done on a per-plot basis as desired during
+ * subsequent processing.
+ *
+ \*--------------------------------------------------------------------------*/
enum { AT_BOP, DRAWING, AT_EOP };
@@ -333,8 +333,8 @@
}
/*--------------------------------------------------------------------------*\
-* Drawing commands.
-\*--------------------------------------------------------------------------*/
+ * Drawing commands.
+ \*--------------------------------------------------------------------------*/
/* Draw line between two points */
/* The plot buffer must be called first so it gets the unfiltered data */
@@ -506,17 +506,17 @@
*/
/*--------------------------------------------------------------------------*\
-* int text2num( char *text, char end, PLUNICODE *num)
-* char *text - pointer to the text to be parsed
-* char end - end character (i.e. ')' or ']' to stop parsing
-* PLUNICODE *num - pointer to an PLUNICODE to store the value
-*
-* Function takes a string, which can be either hex or decimal,
-* and converts it into an PLUNICODE, stopping at either a null,
-* or the character pointed to by 'end'. This implementation using
-* the C library strtoul replaces the original brain-dead version
-* and should be more robust to invalid control strings.
-\*--------------------------------------------------------------------------*/
+ * int text2num( char *text, char end, PLUNICODE *num)
+ * char *text - pointer to the text to be parsed
+ * char end - end character (i.e. ')' or ']' to stop parsing
+ * PLUNICODE *num - pointer to an PLUNICODE to store the value
+ *
+ * Function takes a string, which can be either hex or decimal,
+ * and converts it into an PLUNICODE, stopping at either a null,
+ * or the character pointed to by 'end'. This implementation using
+ * the C library strtoul replaces the original brain-dead version
+ * and should be more robust to invalid control strings.
+ \*--------------------------------------------------------------------------*/
int text2num( const char *text, char end, PLUNICODE *num )
{
@@ -535,22 +535,22 @@
}
/*--------------------------------------------------------------------------*\
-* int text2fci( char *text, unsigned char *hexdigit, unsigned char *hexpower)
-* char *text - pointer to the text to be parsed
-* unsigned char *hexdigit - pointer to hex value that is stored.
-* unsigned char *hexpower - pointer to hex power (left shift) that is stored.
-*
-* Function takes a pointer to a string, which is looked up in a table
-* to determine the corresponding FCI (font characterization integer)
-* hex digit value and hex power (left shift). All matched strings
-* start with "<" and end with the two characters "/>".
-* If the lookup succeeds, hexdigit and hexpower are set to the appropriate
-* values in the table, and the function returns the number of characters
-* in text that are consumed by the matching string in the table lookup.
-*
-* If the lookup fails, hexdigit is set to 0, hexpower is set to and
-* impossible value, and the function returns 0.
-\*--------------------------------------------------------------------------*/
+ * int text2fci( char *text, unsigned char *hexdigit, unsigned char *hexpower)
+ * char *text - pointer to the text to be parsed
+ * unsigned char *hexdigit - pointer to hex value that is stored.
+ * unsigned char *hexpower - pointer to hex power (left shift) that is stored.
+ *
+ * Function takes a pointer to a string, which is looked up in a table
+ * to determine the corresponding FCI (font characterization integer)
+ * hex digit value and hex power (left shift). All matched strings
+ * start with "<" and end with the two characters "/>".
+ * If the lookup succeeds, hexdigit and hexpower are set to the appropriate
+ * values in the table, and the function returns the number of characters
+ * in text that are consumed by the matching string in the table lookup.
+ *
+ * If the lookup fails, hexdigit is set to 0, hexpower is set to and
+ * impossible value, and the function returns 0.
+ \*--------------------------------------------------------------------------*/
int text2fci( const char *text, unsigned char *hexdigit, unsigned char *hexpower )
{
@@ -1058,7 +1058,7 @@
idx = plhershey2unicode( ig + 527 );
i += 2;
skip = 1; /* skip is set if we have copied something
- * into the unicode table */
+ * into the unicode table */
args.n_char = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
@@ -1337,24 +1337,24 @@
}
/*--------------------------------------------------------------------------*\
-* void difilt
-*
-* Driver interface filter -- passes all coordinates through a variety
-* of filters. These include filters to change :
-*
-* - mapping of meta to physical coordinates
-* - plot orientation
-* - window into plot (zooms)
-* - window into device (i.e set margins)
-*
-* The filters are applied in the order specified above. Because the
-* orientation change comes first, subsequent window specifications affect
-* the new coordinates (i.e. after a 90 degree flip, what was x is now y).
-* This is the only way that makes sense from a graphical interface
-* (e.g. TCL/TK driver).
-*
-* Where appropriate, the page clip limits are modified.
-\*--------------------------------------------------------------------------*/
+ * void difilt
+ *
+ * Driver interface filter -- passes all coordinates through a variety
+ * of filters. These include filters to change :
+ *
+ * - mapping of meta to physical coordinates
+ * - plot orientation
+ * - window into plot (zooms)
+ * - window into device (i.e set margins)
+ *
+ * The filters are applied in the order specified above. Because the
+ * orientation change comes first, subsequent window specifications affect
+ * the new coordinates (i.e. after a 90 degree flip, what was x is now y).
+ * This is the only way that makes sense from a graphical interface
+ * (e.g. TCL/TK driver).
+ *
+ * Where appropriate, the page clip limits are modified.
+ \*--------------------------------------------------------------------------*/
void
difilt( PLINT *xscl, PLINT *yscl, PLINT npts,
@@ -1488,11 +1488,11 @@
}
/*--------------------------------------------------------------------------*\
-* void difilt_clip
-*
-* This provides the transformed text clipping region for the benefit of
-* those drivers that render their own text.
-\*--------------------------------------------------------------------------*/
+ * void difilt_clip
+ *
+ * This provides the transformed text clipping region for the benefit of
+ * those drivers that render their own text.
+ \*--------------------------------------------------------------------------*/
void
difilt_clip( PLINT *x_coords, PLINT *y_coords )
@@ -1516,11 +1516,11 @@
/*--------------------------------------------------------------------------*\
-* void pldi_ini
-*
-* Updates driver interface, making sure everything is in order.
-* Even if filter is not being used, the defaults need to be set up.
-\*--------------------------------------------------------------------------*/
+ * void pldi_ini
+ *
+ * Updates driver interface, making sure everything is in order.
+ * Even if filter is not being used, the defaults need to be set up.
+ \*--------------------------------------------------------------------------*/
static void
setdef_diplt()
@@ -1572,13 +1572,13 @@
}
/*--------------------------------------------------------------------------*\
-* void pldid2pc
-*
-* Converts input values from relative device coordinates to relative plot
-* coordinates. This function must be called when selecting a plot window
-* from a display driver, since the coordinates chosen by the user are
-* necessarily device-specific.
-\*--------------------------------------------------------------------------*/
+ * void pldid2pc
+ *
+ * Converts input values from relative device coordinates to relative plot
+ * coordinates. This function must be called when selecting a plot window
+ * from a display driver, since the coordinates chosen by the user are
+ * necessarily device-specific.
+ \*--------------------------------------------------------------------------*/
void
pldid2pc( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
@@ -1620,11 +1620,11 @@
}
/*--------------------------------------------------------------------------*\
-* void pldip2dc
-*
-* Converts input values from relative plot coordinates to relative
-* device coordinates.
-\*--------------------------------------------------------------------------*/
+ * void pldip2dc
+ *
+ * Converts input values from relative plot coordinates to relative
+ * device coordinates.
+ \*--------------------------------------------------------------------------*/
void
pldip2dc( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
@@ -1666,10 +1666,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plsdiplt
-*
-* Set window into plot space
-\*--------------------------------------------------------------------------*/
+ * void plsdiplt
+ *
+ * Set window into plot space
+ \*--------------------------------------------------------------------------*/
void
c_plsdiplt( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax )
@@ -1690,10 +1690,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plsdiplz
-*
-* Set window into plot space incrementally (zoom)
-\*--------------------------------------------------------------------------*/
+ * void plsdiplz
+ *
+ * Set window into plot space incrementally (zoom)
+ \*--------------------------------------------------------------------------*/
void
c_plsdiplz( PLFLT xmin, PLFLT ymin, PLFLT xmax, PLFLT ymax )
@@ -1710,15 +1710,15 @@
}
/*--------------------------------------------------------------------------*\
-* void calc_diplt
-*
-* Calculate transformation coefficients to set window into plot space.
-*
-* Note: if driver has requested to handle these commands itself, we must
-* send the appropriate escape command. If the driver succeeds it will
-* cancel the filter operation. The command is deferred until this point
-* to ensure that the driver has been initialized.
-\*--------------------------------------------------------------------------*/
+ * void calc_diplt
+ *
+ * Calculate transformation coefficients to set window into plot space.
+ *
+ * Note: if driver has requested to handle these commands itself, we must
+ * send the appropriate escape command. If the driver succeeds it will
+ * cancel the filter operation. The command is deferred until this point
+ * to ensure that the driver has been initialized.
+ \*--------------------------------------------------------------------------*/
static void
calc_diplt( void )
@@ -1753,10 +1753,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plgdiplt
-*
-* Retrieve current window into plot space
-\*--------------------------------------------------------------------------*/
+ * void plgdiplt
+ *
+ * Retrieve current window into plot space
+ \*--------------------------------------------------------------------------*/
void
c_plgdiplt( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax )
@@ -1768,15 +1768,15 @@
}
/*--------------------------------------------------------------------------*\
-* void plsdidev
-*
-* Set window into device space using margin, aspect ratio, and
-* justification. If you want to just use the previous value for any of
-* these, just pass in the magic value PL_NOTSET.
-*
-* It is unlikely that one should ever need to change the aspect ratio
-* but it's in there for completeness.
-\*--------------------------------------------------------------------------*/
+ * void plsdidev
+ *
+ * Set window into device space using margin, aspect ratio, and
+ * justification. If you want to just use the previous value for any of
+ * these, just pass in the magic value PL_NOTSET.
+ *
+ * It is unlikely that one should ever need to change the aspect ratio
+ * but it's in there for completeness.
+ \*--------------------------------------------------------------------------*/
void
c_plsdidev( PLFLT mar, PLFLT aspect, PLFLT jx, PLFLT jy )
@@ -1798,11 +1798,11 @@
}
/*--------------------------------------------------------------------------*\
-* void calc_didev
-*
-* Calculate transformation coefficients to set window into device space.
-* Calculates relative window bounds and calls plsdidxy to finish the job.
-\*--------------------------------------------------------------------------*/
+ * void calc_didev
+ *
+ * Calculate transformation coefficients to set window into device space.
+ * Calculates relative window bounds and calls plsdidxy to finish the job.
+ \*--------------------------------------------------------------------------*/
static void
calc_didev( void )
@@ -1885,10 +1885,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plgdidev
-*
-* Retrieve current window into device space
-\*--------------------------------------------------------------------------*/
+ * void plgdidev
+ *
+ * Retrieve current window into device space
+ \*--------------------------------------------------------------------------*/
void
c_plgdidev( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy )
@@ -1900,10 +1900,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plsdiori
-*
-* Set plot orientation, specifying rotation in units of pi/2.
-\*--------------------------------------------------------------------------*/
+ * void plsdiori
+ *
+ * Set plot orientation, specifying rotation in units of pi/2.
+ \*--------------------------------------------------------------------------*/
void
c_plsdiori( PLFLT rot )
@@ -1921,11 +1921,11 @@
}
/*--------------------------------------------------------------------------*\
-* void calc_diori
-*
-* Calculate transformation coefficients to arbitrarily orient plot.
-* Preserve aspect ratios so the output doesn't suck.
-\*--------------------------------------------------------------------------*/
+ * void calc_diori
+ *
+ * Calculate transformation coefficients to arbitrarily orient plot.
+ * Preserve aspect ratios so the output doesn't suck.
+ \*--------------------------------------------------------------------------*/
static void
calc_diori( void )
@@ -2016,10 +2016,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plgdiori
-*
-* Get plot orientation
-\*--------------------------------------------------------------------------*/
+ * void plgdiori
+ *
+ * Get plot orientation
+ \*--------------------------------------------------------------------------*/
void
c_plgdiori( PLFLT *p_rot )
@@ -2028,13 +2028,13 @@
}
/*--------------------------------------------------------------------------*\
-* void plsdimap
-*
-* Set up transformation from metafile coordinates. The size of the plot is
-* scaled so as to preserve aspect ratio. This isn't intended to be a
-* general-purpose facility just yet (not sure why the user would need it,
-* for one).
-\*--------------------------------------------------------------------------*/
+ * void plsdimap
+ *
+ * Set up transformation from metafile coordinates. The size of the plot is
+ * scaled so as to preserve aspect ratio. This isn't intended to be a
+ * general-purpose facility just yet (not sure why the user would need it,
+ * for one).
+ \*--------------------------------------------------------------------------*/
void
c_plsdimap( PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax,
@@ -2052,13 +2052,13 @@
}
/*--------------------------------------------------------------------------*\
-* void calc_dimap
-*
-* Set up transformation from metafile coordinates. The size of the plot is
-* scaled so as to preserve aspect ratio. This isn't intended to be a
-* general-purpose facility just yet (not sure why the user would need it,
-* for one).
-\*--------------------------------------------------------------------------*/
+ * void calc_dimap
+ *
+ * Set up transformation from metafile coordinates. The size of the plot is
+ * scaled so as to preserve aspect ratio. This isn't intended to be a
+ * general-purpose facility just yet (not sure why the user would need it,
+ * for one).
+ \*--------------------------------------------------------------------------*/
static void
calc_dimap()
@@ -2101,10 +2101,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plflush()
-*
-* Flushes the output stream. Use sparingly, if at all.
-\*--------------------------------------------------------------------------*/
+ * void plflush()
+ *
+ * Flushes the output stream. Use sparingly, if at all.
+ \*--------------------------------------------------------------------------*/
void
c_plflush( void )
@@ -2124,16 +2124,16 @@
}
/*--------------------------------------------------------------------------*\
-* Startup routines.
-\*--------------------------------------------------------------------------*/
+ * Startup routines.
+ \*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*\
-* void pllib_init()
-*
-* Initialize library. Called internally by every startup routine.
-* Everything you want to always be initialized before plinit() is called
-* you should put here. E.g. dispatch table setup, rcfile read, etc.
-\*--------------------------------------------------------------------------*/
+ * void pllib_init()
+ *
+ * Initialize library. Called internally by every startup routine.
+ * Everything you want to always be initialized before plinit() is called
+ * you should put here. E.g. dispatch table setup, rcfile read, etc.
+ \*--------------------------------------------------------------------------*/
void
pllib_init()
@@ -2153,10 +2153,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plstar(nx, ny)
-*
-* Initialize PLplot, passing in the windows/page settings.
-\*--------------------------------------------------------------------------*/
+ * void plstar(nx, ny)
+ *
+ * Initialize PLplot, passing in the windows/page settings.
+ \*--------------------------------------------------------------------------*/
void
c_plstar( PLINT nx, PLINT ny )
@@ -2172,10 +2172,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plstart(devname, nx, ny)
-*
-* Initialize PLplot, passing the device name and windows/page settings.
-\*--------------------------------------------------------------------------*/
+ * void plstart(devname, nx, ny)
+ *
+ * Initialize PLplot, passing the device name and windows/page settings.
+ \*--------------------------------------------------------------------------*/
void
c_plstart( const char *devname, PLINT nx, PLINT ny )
@@ -2192,10 +2192,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plinit()
-*
-* Initializes PLplot, using preset or default options.
-\*--------------------------------------------------------------------------*/
+ * void plinit()
+ *
+ * Initializes PLplot, using preset or default options.
+ \*--------------------------------------------------------------------------*/
void
c_plinit( void )
@@ -2356,10 +2356,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plend()
-*
-* End a plotting session for all open streams.
-\*--------------------------------------------------------------------------*/
+ * void plend()
+ *
+ * End a plotting session for all open streams.
+ \*--------------------------------------------------------------------------*/
void
c_plend( void )
@@ -2411,12 +2411,12 @@
}
/*--------------------------------------------------------------------------*\
-* void plend1()
-*
-* End a plotting session for the current stream only. After the stream is
-* ended the memory associated with the stream's PLStream data structure is
-* freed (for stream > 0), and the stream counter is set to 0 (the default).
-\*--------------------------------------------------------------------------*/
+ * void plend1()
+ *
+ * End a plotting session for the current stream only. After the stream is
+ * ended the memory associated with the stream's PLStream data structure is
+ * freed (for stream > 0), and the stream counter is set to 0 (the default).
+ \*--------------------------------------------------------------------------*/
void
c_plend1( void )
@@ -2475,11 +2475,11 @@
}
/*--------------------------------------------------------------------------*\
-* void plsstrm
-*
-* Set stream number. If the data structure for a new stream is
-* unallocated, we allocate it here.
-\*--------------------------------------------------------------------------*/
+ * void plsstrm
+ *
+ * Set stream number. If the data structure for a new stream is
+ * unallocated, we allocate it here.
+ \*--------------------------------------------------------------------------*/
void
c_plsstrm( PLINT strm )
@@ -2507,10 +2507,10 @@
}
/*--------------------------------------------------------------------------*\
-* void plgstrm
-*
-* Get current stream number.
-\*--------------------------------------------------------------------------*/
+ * void plgstrm
+ *
+ * Get current stream number.
+ \*--------------------------------------------------------------------------*/
void
c_plgstrm( PLINT *p_strm )
@@ -2519,17 +2519,17 @@
}
/*--------------------------------------------------------------------------*\
-* void plmkstrm
-*
-* Creates a new stream and makes it the default. Differs from using
-* plsstrm(), in that a free stream number is found, and returned.
-*
-* Unfortunately, I /have/ to start at stream 1 and work upward, since
-* stream 0 is preallocated. One of the BIG flaws in the PLplot API is
-* that no initial, library-opening call is required. So stream 0 must be
-* preallocated, and there is no simple way of determining whether it is
-* already in use or not.
-\*--------------------------------------------------------------------------*/
+ * void plmkstrm
+ *
+ * Creates a new stream and makes it the default. Differs from using
+ * plsstrm(), in that a free stream number is found, and returned.
+ *
+ * Unfortunately, I /have/ to start at stream 1 and work upward, since
+ * stream 0 is preallocated. One of the BIG flaws in the PLplot API is
+ * that no initial, library-opening call is required. So stream 0 must be
+ * preallocated, and there is no simple way of determining whether it is
+ * already in use or not.
+ \*--------------------------------------------------------------------------*/
void
c_plmkstrm( PLINT *p_strm )
@@ -2556,20 +2556,20 @@
}
/*--------------------------------------------------------------------------*\
-* void plstrm_init
-*
-* Does required startup initialization of a stream. Should be called right
-* after creating one (for allocating extra memory, etc). Users shouldn't
-* need to call this directly.
-*
-* This function can be called multiple times for a given stream, in which
-* case only the first call produces any effect. For streams >= 1, which
-* are created dynamically, this is called by the routine that allocates
-* the stream. Stream 0, which is preallocated, is much harder to deal with
-* because any of a number of different calls may be the first call to the
-* library. This is handled by just calling plstrm_init() from every
-* function that might be called first. Sucks, but it should work.
-\*--------------------------------------------------------------------------*/
+ * void plstrm_init
+ *
+ * Does required startup initialization of a stream. Should be called right
+ * after creating one (for allocating extra memory, etc). Users shouldn't
+ * need to call this directly.
+ *
+ * This function can be called multiple times for a given stream, in which
+ * case only the first call produces any effect. For streams >= 1, which
+ * are created dynamically, this is called by the routine that allocates
+ * the stream. Stream 0, which is preallocated, is much harder to deal with
+ * because any of a number of different calls may be the first call to the
+ * library. This is handled by just calling plstrm_init() from every
+ * function that might be called first. Sucks, but it should work.
+ \*--------------------------------------------------------------------------*/
void
plstrm_init( void )
@@ -2589,10 +2589,10 @@
}
/*--------------------------------------------------------------------------*\
-* pl_cpcolor
-*
-* Utility to copy one PLColor to another.
-\*--------------------------------------------------------------------------*/
+ * pl_cpcolor
+ *
+ * Utility to copy one PLColor to another.
+ \*--------------------------------------------------------------------------*/
void
pl_cpcolor( PLColor *to, PLColor *from )
@@ -2604,18 +2604,18 @@
}
/*--------------------------------------------------------------------------*\
-* void plcpstrm
-*
-* Copies state parameters from the reference stream to the current stream.
-* Tell driver interface to map device coordinates unless flags == 1.
-*
-* This function is used for making save files of selected plots (e.g.
-* from the TK driver). After initializing, you can get a copy of the
-* current plot to the specified device by switching to this stream and
-* issuing a plcpstrm() and a plreplot(), with calls to plbop() and
-* pleop() as appropriate. The plot buffer must have previously been
-* enabled (done automatically by some display drivers, such as X).
-\*--------------------------------------------------------------------------*/
+ * void plcpstrm
+ *
+ * Copies state parameters from the reference stream to the current stream.
+ * Tell driver interface to map device coordinates unless flags == 1.
+ *
+ * This function is used for making save files of selected plots (e.g.
+ * from the TK driver). After initializing, you can get a copy of the
+ * current plot to the specified device by switching to this stream and
+ * issuing a plcpstrm() and a plreplot(), with calls to plbop() and
+ * pleop() as appropriate. The plot buffer ...
[truncated message content] |
|
From: <ai...@us...> - 2010-01-07 07:09:32
|
Revision: 10741
http://plplot.svn.sourceforge.net/plplot/?rev=10741&view=rev
Author: airwin
Date: 2010-01-07 07:09:26 +0000 (Thu, 07 Jan 2010)
Log Message:
-----------
If a device is not explicitly specified (e.g. via "-dev ..." on the
command line), the device given by the value of the PLPLOT_DEV
environment variable, if defined and non-empty, will be used.
Thanks to David MacMahon for this patch.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-01-07 00:53:13 UTC (rev 10740)
+++ trunk/src/plcore.c 2010-01-07 07:09:26 UTC (rev 10741)
@@ -3077,7 +3077,20 @@
{
int dev, i, count, length;
char response[80];
+ char * devname_env;
+/* If device name is not already specified, try to get it from environment */
+
+ if ( plsc->DevName[0] == '\0' )
+ {
+ devname_env = getenv( "PLPLOT_DEV" );
+ if ( devname_env )
+ {
+ strncpy( plsc->DevName, devname_env, sizeof ( plsc->DevName ) - 1 );
+ plsc->DevName[sizeof ( plsc->DevName ) - 1] = '\0';
+ }
+ }
+
/* Device name already specified. See if it is valid. */
if ( *( plsc->DevName ) != '\0' && *( plsc->DevName ) != '?' )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-04-23 17:07:59
|
Revision: 10932
http://plplot.svn.sourceforge.net/plplot/?rev=10932&view=rev
Author: airwin
Date: 2010-04-23 17:07:53 +0000 (Fri, 23 Apr 2010)
Log Message:
-----------
Permanantly remove the historical momentary change to symbol font for PLplot
text escape sequences (Hershey, hexadecimal, and Greek) for specifying
unicode. The original motivation of this momentary change was Type 1 fonts
used for our ps and pdf device drivers collect most mathematical symbols in
one "symbol" font, but I have plans to deal with that issue a different way
(if the ordinary Type 1 font lookup fails to get a hit for these device
drivers, then always check the Type 1 symbol font for a hit as a last
resort). Meanwhile, the removal of the built-in momentary change to
symbol fonts allows more consistent font results for our modern devices.
This change has been conditionally removed since revision 10623, but this
complete removal gets rid of lots of conditional code and thus makes our
code much more readable.
Revision Links:
--------------
http://plplot.svn.sourceforge.net/plplot/?rev=10623&view=rev
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-04-22 07:43:32 UTC (rev 10931)
+++ trunk/src/plcore.c 2010-04-23 17:07:53 UTC (rev 10932)
@@ -33,11 +33,6 @@
*/
#define DEBUG
-/* Disallow momentary change to symbol font for PLplot escape
- * sequences (Hershey, hexadecimal, and Greek) for specifying
- * unicode. */
-#undef PL_MOMENTARY_SYMBOL_FONT
-
#define NEED_PLDEBUG
#include "plcore.h"
@@ -621,7 +616,7 @@
if ( plsc->dev_unicode ) /* Does the device also understand unicode? */
{
PLINT ig;
- PLUNICODE fci, fcisave;
+ PLUNICODE fci;
unsigned char hexdigit, hexpower;
/* Now process the text string */
@@ -661,11 +656,6 @@
case '(': /* hershey code */
i += 2 + text2num( &string[i + 2], ')', &code );
idx = plhershey2unicode( code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- unicode_buffer[j++] = fci;
-#endif
unicode_buffer[j++] = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
@@ -678,21 +668,12 @@
* driver.
*/
if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc;
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
- unicode_buffer[j++] = fci;
-#endif
j--;
skip = 1;
break;
case '[': /* unicode */
i += 2 + text2num( &string[i + 2], ']', &code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- unicode_buffer[j++] = fci;
-#endif
unicode_buffer[j++] = code;
@@ -704,10 +685,6 @@
* driver.
*/
if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc;
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
- unicode_buffer[j++] = fci;
-#endif
j--;
skip = 1;
break;
@@ -798,11 +775,6 @@
* 527 = upper case alpha displacement in Hershey Table
* 627 = lower case alpha displacement in Hershey Table
*/
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- unicode_buffer[j++] = fci;
-#endif
ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
if ( ig >= 0 )
@@ -825,11 +797,6 @@
skip = 1; /* skip is set if we have copied something
* into the unicode table */
}
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
- unicode_buffer[j++] = fci;
-
-#endif
j--;
break;
}
@@ -897,49 +864,17 @@
case '(': /* hershey code */
i += 2 + text2num( &string[i + 2], ')', &code );
idx = plhershey2unicode( code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
args.n_char = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
plP_esc( PLESC_TEXT_CHAR, &args );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
skip = 1;
break;
case '[': /* unicode */
i += 2 + text2num( &string[i + 2], ']', &code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
-#endif
-
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
args.n_char = code;
plP_esc( PLESC_TEXT_CHAR, &args );
-
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
skip = 1;
break;
@@ -1041,15 +976,6 @@
* 527 = upper case alpha displacement in Hershey Table
* 627 = lower case alpha displacement in Hershey Table
*/
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
-
ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
if ( ig >= 0 )
{
@@ -1076,13 +1002,6 @@
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
plP_esc( PLESC_TEXT_CHAR, &args );
}
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
break;
case 'u':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-09-15 23:53:28
|
Revision: 11184
http://plplot.svn.sourceforge.net/plplot/?rev=11184&view=rev
Author: airwin
Date: 2010-09-15 23:53:22 +0000 (Wed, 15 Sep 2010)
Log Message:
-----------
Use pllsty rather than plstyl to intialize line style. This allows
storing the line style index in plsc->line_style.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-09-15 02:17:25 UTC (rev 11183)
+++ trunk/src/plcore.c 2010-09-15 23:53:22 UTC (rev 11184)
@@ -2179,7 +2179,7 @@
PLFLT def_arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 };
PLFLT def_arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 };
PLFLT lx, ly, xpmm_loc, ypmm_loc, aspect_old, aspect_new;
- PLINT mk = 0, sp = 0, inc = 0, del = 2000;
+ PLINT inc = 0, del = 2000;
pllib_init();
@@ -2299,7 +2299,7 @@
plgra();
plcol( 1 );
- plstyl( 0, &mk, &sp );
+ pllsty( 1 );
plpat( 1, &inc, &del );
plsvect( def_arrow_x, def_arrow_y, 6, 0 );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-10-08 17:54:29
|
Revision: 11251
http://plplot.svn.sourceforge.net/plplot/?rev=11251&view=rev
Author: airwin
Date: 2010-10-08 17:54:23 +0000 (Fri, 08 Oct 2010)
Log Message:
-----------
For unicode-aware devices follow what is done for the Hershey case
(pldeco in src/plsym.c) for epsilon, theta, and phi. This means the
#ge, #gh, and #gf escapes give users the Greek lunate epsilon, the
ordinary Greek lower case theta (as opposed to the Greek symbol theta
= script theta), and the Greek symbol phi for Unicode fonts just like
has occurred since the dawn of PLplot history (I checked 5.1.0) for
the Hershey font case.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-10-08 17:45:46 UTC (rev 11250)
+++ trunk/src/plcore.c 2010-10-08 17:54:23 UTC (rev 11251)
@@ -11,7 +11,7 @@
* Copyright (C) 2004, 2005 Rafael Laboissiere
* Copyright (C) 2004, 2006 Andrew Ross
* Copyright (C) 2004 Andrew Roach
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Alan W. Irwin
+ * Copyright (C) 2005-2010 Alan W. Irwin
* Copyright (C) 2005 Thomas J. Duck
*
* This file is part of PLplot.
@@ -804,7 +804,18 @@
{
if ( ig >= 24 )
ig = ig + 100 - 24;
- idx = plhershey2unicode( ig + 527 );
+ ig = ig + 527;
+ // Follow pldeco in plsym.c which for
+ // lower case epsilon, theta, and phi
+ // substitutes (684, 685, and 686) for
+ // (631, 634, and 647)
+ if ( ig == 631 )
+ ig = 684;
+ else if ( ig == 634 )
+ ig = 685;
+ else if ( ig == 647 )
+ ig = 686;
+ idx = plhershey2unicode( ig );
unicode_buffer[j++] = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
i += 2;
@@ -1004,7 +1015,18 @@
{
if ( ig >= 24 )
ig = ig + 100 - 24;
- idx = plhershey2unicode( ig + 527 );
+ ig = ig + 527;
+ // Follow pldeco in plsym.c which for
+ // lower case epsilon, theta, and phi
+ // substitutes (684, 685, and 686) for
+ // (631, 634, and 647)
+ if ( ig == 631 )
+ ig = 684;
+ else if ( ig == 634 )
+ ig = 685;
+ else if ( ig == 647 )
+ ig = 686;
+ idx = plhershey2unicode( ig );
i += 2;
skip = 1; /* skip is set if we have copied something
* into the unicode table */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2010-11-11 08:33:45
|
Revision: 11321
http://plplot.svn.sourceforge.net/plplot/?rev=11321&view=rev
Author: arjenmarkus
Date: 2010-11-11 08:33:39 +0000 (Thu, 11 Nov 2010)
Log Message:
-----------
Check the parsing of the .rc files to prevent the use of NULL pointers. Abort the program if no proper driver information is found.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-11-11 00:55:13 UTC (rev 11320)
+++ trunk/src/plcore.c 2010-11-11 08:33:39 UTC (rev 11321)
@@ -3008,6 +3008,12 @@
seqstr = strtok( 0, ":" );
tag = strtok( 0, "\n" );
+ if ( devnam == NULL || devdesc == NULL || devtype == NULL || driver == NULL ||
+ seqstr == NULL || tag == NULL )
+ {
+ continue; // Ill-formatted line, most probably not a valid driver information file
+ }
+
seq = atoi( seqstr );
n = npldrivers++;
@@ -3066,6 +3072,12 @@
#endif
+ if ( npldrivers == 0 )
+ {
+ npldynamicdevices = 0;
+ plexit( "No device drivers found - please check the environment variable PLPLOT_DRV_DIR" );
+ }
+
// Finally, we need to sort the list into presentation order, based on the
// sequence number in the dispatch ttable entries.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <hba...@us...> - 2011-07-05 17:03:58
|
Revision: 11788
http://plplot.svn.sourceforge.net/plplot/?rev=11788&view=rev
Author: hbabcock
Date: 2011-07-05 17:03:51 +0000 (Tue, 05 Jul 2011)
Log Message:
-----------
Fix yet another bug in the alternate unicode pathway which was the source of strange font choices in strings that contained more than one font.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2011-07-04 20:25:58 UTC (rev 11787)
+++ trunk/src/plcore.c 2011-07-05 17:03:51 UTC (rev 11788)
@@ -638,6 +638,7 @@
{
PLINT ig;
PLUNICODE fci;
+ PLUNICODE orig_fci;
unsigned char hexdigit, hexpower;
// Now process the text string
@@ -663,6 +664,7 @@
// Obtain FCI (font characterization integer) for start of
// string.
plgfci( &fci );
+ orig_fci = fci;
// Walk through the string, and convert
// some stuff to unicode on the fly
@@ -884,7 +886,7 @@
if ( plsc->alt_unicode )
{
- args.n_fci = fci;
+ args.n_fci = orig_fci;
plP_esc( PLESC_BEGIN_TEXT, &args );
for ( i = 0; i < len; i++ )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2011-07-06 02:23:22
|
Revision: 11794
http://plplot.svn.sourceforge.net/plplot/?rev=11794&view=rev
Author: airwin
Date: 2011-07-06 02:23:16 +0000 (Wed, 06 Jul 2011)
Log Message:
-----------
Style previous commit.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2011-07-06 02:20:57 UTC (rev 11793)
+++ trunk/src/plcore.c 2011-07-06 02:23:16 UTC (rev 11794)
@@ -664,7 +664,7 @@
// Obtain FCI (font characterization integer) for start of
// string.
plgfci( &fci );
- orig_fci = fci;
+ orig_fci = fci;
// Walk through the string, and convert
// some stuff to unicode on the fly
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2011-09-25 16:40:37
|
Revision: 11936
http://plplot.svn.sourceforge.net/plplot/?rev=11936&view=rev
Author: airwin
Date: 2011-09-25 16:40:30 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Allow plend to completely remove certain of our device drivers that do
not depend on any libraries other than libplplotd. This change restores clean
valgrind results for, e.g., -dev svg and -dev psc.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2011-09-25 16:09:38 UTC (rev 11935)
+++ trunk/src/plcore.c 2011-09-25 16:40:30 UTC (rev 11936)
@@ -3272,11 +3272,21 @@
driver->drvnam, drvspec );
driver->dlhand = lt_dlopenext( drvspec );
-
- // Mark all drivers resident to prevent problems
- // with atexit handlers / library reinitialisation such
- // as those seen with qt and cairo drivers.
- lt_dlmakeresident(driver->dlhand);
+
+ // A few of our drivers do not depend on other libraries. So
+ // allow them to be completely removed by plend to give clean
+ // valgrind results. However, the (large) remainder of our
+ // drivers do depend on other libraries so mark them resident
+ // to prevent problems with atexit handlers / library
+ // reinitialisation such as those seen with qt and cairo
+ // drivers.
+ if ( !( strcmp( driver->drvnam, "mem" ) == 0 ||
+ strcmp( driver->drvnam, "null" ) == 0 ||
+ strcmp( driver->drvnam, "plmeta" ) == 0 ||
+ strcmp( driver->drvnam, "ps" ) == 0 ||
+ strcmp( driver->drvnam, "svg" ) == 0 ||
+ strcmp( driver->drvnam, "xfig" ) == 0 ) )
+ lt_dlmakeresident( driver->dlhand );
}
// If it still isn't loaded, then we're doomed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sm...@us...> - 2009-05-01 15:12:00
|
Revision: 9869
http://plplot.svn.sourceforge.net/plplot/?rev=9869&view=rev
Author: smekal
Date: 2009-05-01 15:11:49 +0000 (Fri, 01 May 2009)
Log Message:
-----------
For Cygwin we don't need the path to the driver directory since all dlls must be either in the current path or be found in the PATH environment variable (it's still Win32).
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-05-01 15:11:24 UTC (rev 9868)
+++ trunk/src/plcore.c 2009-05-01 15:11:49 UTC (rev 9869)
@@ -2700,7 +2700,7 @@
if (!driver->dlhand)
{
char drvspec[ DRVSPEC_SIZE ];
-#ifdef LTDL_WIN32
+#if defined(LTDL_WIN32) || defined(__CYGWIN__)
snprintf( drvspec, DRVSPEC_SIZE, "%s", driver->drvnam );
#else
snprintf( drvspec, DRVSPEC_SIZE, "%s/%s", plGetDrvDir (), driver->drvnam );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2009-11-23 05:18:11
|
Revision: 10621
http://plplot.svn.sourceforge.net/plplot/?rev=10621&view=rev
Author: airwin
Date: 2009-11-23 05:18:03 +0000 (Mon, 23 Nov 2009)
Log Message:
-----------
Implement C preprocessor infrastructure for disallowing momentary change
to symbol fonts without actually disallowing that change.
For pls->alt_unicode true restore original font after switch to symbol font
for both Hershey and hexadecimal PLplot unicode encoding escape sequences.
This change fixes a font bug in the cairo device driver (currently the only
one to use pls->alt_unicode true).
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2009-11-21 22:47:39 UTC (rev 10620)
+++ trunk/src/plcore.c 2009-11-23 05:18:03 UTC (rev 10621)
@@ -33,6 +33,9 @@
*/
#define DEBUG
+/* Allow momentary change to symbol font for certain PLplot-specific
+ * escape-sequence encodings for unicode. */
+#define PL_MOMENTARY_SYMBOL_FONT
#define NEED_PLDEBUG
#include "plcore.h"
@@ -611,8 +614,9 @@
args.n_fci = fci;
plP_esc( PLESC_BEGIN_TEXT, &args );
}
- for ( j = i = 0; i < len; i++ ) /* Walk through the string, and convert
- * some stuff to unicode on the fly */
+ /* Walk through the string, and convert
+ * some stuff to unicode on the fly */
+ for ( j = i = 0; i < len; i++ )
{
skip = 0;
@@ -623,18 +627,21 @@
case '(': /* hershey code */
i += 2 + text2num( &string[i + 2], ')', &code );
idx = plhershey2unicode( code );
- /* momentarily switch to symbol font. */
+#ifdef PL_MOMENTARY_SYMBOL_FONT
fcisave = fci;
plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
unicode_buffer[j++] = fci;
+#endif
unicode_buffer[j++] = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
if ( plsc->alt_unicode )
{
+#ifdef PL_MOMENTARY_SYMBOL_FONT
args.n_fci = fci;
args.n_ctrl_char = PLTEXT_FONTCHANGE;
plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
args.n_char = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
plP_esc( PLESC_TEXT_CHAR, &args );
@@ -648,24 +655,37 @@
* driver.
*/
if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc;
+#ifdef PL_MOMENTARY_SYMBOL_FONT
fci = fcisave;
- unicode_buffer[j] = fci;
+ unicode_buffer[j++] = fci;
+
+ if ( plsc->alt_unicode )
+ {
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ }
+#endif
+ j--;
skip = 1;
break;
case '[': /* unicode */
i += 2 + text2num( &string[i + 2], ']', &code );
- /* momentarily switch to symbol font. */
+#ifdef PL_MOMENTARY_SYMBOL_FONT
fcisave = fci;
plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
unicode_buffer[j++] = fci;
+#endif
unicode_buffer[j++] = code;
if ( plsc->alt_unicode )
{
+#ifdef PL_MOMENTARY_SYMBOL_FONT
args.n_fci = fci;
args.n_ctrl_char = PLTEXT_FONTCHANGE;
plP_esc( PLESC_CONTROL_CHAR, &args );
+#endif
args.n_char = code;
plP_esc( PLESC_TEXT_CHAR, &args );
}
@@ -678,8 +698,18 @@
* driver.
*/
if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc;
+#ifdef PL_MOMENTARY_SYMBOL_FONT
fci = fcisave;
- unicode_buffer[j] = fci;
+ unicode_buffer[j++] = fci;
+
+ if ( plsc->alt_unicode )
+ {
+ args.n_fci = fci;
+ args.n_ctrl_char = PLTEXT_FONTCHANGE;
+ plP_esc( PLESC_CONTROL_CHAR, &args );
+ }
+#endif
+ j--;
skip = 1;
break;
@@ -724,7 +754,6 @@
}
}
}
-
else
{
i += text2fci( &string[i + 1], &hexdigit, &hexpower );
@@ -798,7 +827,7 @@
* 527 = upper case alpha displacement in Hershey Table
* 627 = lower case alpha displacement in Hershey Table
*/
- /* momentarily switch to symbol font. */
+#ifdef PL_MOMENTARY_SYMBOL_FONT
fcisave = fci;
plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
unicode_buffer[j++] = fci;
@@ -809,6 +838,7 @@
args.n_ctrl_char = PLTEXT_FONTCHANGE;
plP_esc( PLESC_CONTROL_CHAR, &args );
}
+#endif
ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
if ( ig >= 0 )
@@ -845,8 +875,9 @@
plP_esc( PLESC_TEXT_CHAR, &args );
}
}
+#ifdef PL_MOMENTARY_SYMBOL_FONT
fci = fcisave;
- unicode_buffer[j] = fci;
+ unicode_buffer[j++] = fci;
if ( plsc->alt_unicode )
{
@@ -854,6 +885,8 @@
args.n_ctrl_char = PLTEXT_FONTCHANGE;
plP_esc( PLESC_CONTROL_CHAR, &args );
}
+#endif
+ j--;
break;
case 'u':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2010-05-21 06:15:41
|
Revision: 11017
http://plplot.svn.sourceforge.net/plplot/?rev=11017&view=rev
Author: airwin
Date: 2010-05-21 06:15:35 +0000 (Fri, 21 May 2010)
Log Message:
-----------
Implement an experimental solution for long-standing parallelogram
issue, but then comment it out because of other issues (strange aspect ratios
for integral -ori values; characters with incorrect aspect ratios, and
severe cropping issues) it causes.
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-05-21 06:12:23 UTC (rev 11016)
+++ trunk/src/plcore.c 2010-05-21 06:15:35 UTC (rev 11017)
@@ -1897,8 +1897,17 @@
}
calc_didev();
-/* Compute scale factors */
+ // Compute scale factors for relative device coordinates. Only
+ // the aspect ratio of lx to ly matters. Note, plsc->phyxlen and
+ // plsc->phyylen are in PLplot core library coordinates and don't
+ // know anything about device coordinates which are likely to have
+ // a quite different aspect ratio. So to correct between the two
+ // coordinate systems must divide plsc->phyxlen/plsc->phyylen by
+ // plsc->aspori.
+ // N.B. comment out this correction because causes other issues.
+
+ //lx = plsc->phyxlen/plsc->aspori;
lx = plsc->phyxlen;
ly = plsc->phyylen;
@@ -2193,7 +2202,7 @@
aspect_new = plsc->aspect;
plsc->caspfactor = sqrt( aspect_old / aspect_new );
}
-/* Case of 90 deg rotations with -freeaspect (this is also how portraite
+/* Case of 90 deg rotations with -freeaspect (this is also how portrait
* mode is implemented for the drivers that honor -portrait). */
else if ( plsc->freeaspect && ABS( cos( plsc->diorot * PI / 2. ) ) <= 1.e-5 )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2010-11-10 07:56:02
|
Revision: 11314
http://plplot.svn.sourceforge.net/plplot/?rev=11314&view=rev
Author: arjenmarkus
Date: 2010-11-10 07:55:56 +0000 (Wed, 10 Nov 2010)
Log Message:
-----------
Solve the problem that under Visual Studio the function plInBuildTree() did not recognise that the
drive letter can be any case. This resulted in the inability of the examples to run without setting
PLPLOT_DRV_DIR and PLPLOT_LIB. (The build directory and the current directory are reported with
different cases for the drive letters)
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-11-10 04:28:54 UTC (rev 11313)
+++ trunk/src/plcore.c 2010-11-10 07:55:56 UTC (rev 11314)
@@ -2784,7 +2784,9 @@
}
else
{
- if ( strncmp( builddir, currdir, strlen( builddir ) ) == 0 )
+ // On Windows the first character is the drive letter - it is case-insensitive
+ if ( strncmp( builddir+1, currdir+1, strlen( builddir+1 ) ) == 0 &&
+ tolower( builddir[0] ) == tolower( currdir[0] ) )
{
inBuildTree = 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arj...@us...> - 2010-11-22 08:21:01
|
Revision: 11347
http://plplot.svn.sourceforge.net/plplot/?rev=11347&view=rev
Author: arjenmarkus
Date: 2010-11-22 08:20:55 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Correct typo in comment
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-11-22 07:39:17 UTC (rev 11346)
+++ trunk/src/plcore.c 2010-11-22 08:20:55 UTC (rev 11347)
@@ -3242,7 +3242,7 @@
// Note the device tag, and the driver index. Note that a given driver could
// supply multiple devices, each with a unique tag to distinguish the driver
-// entry points for the differnet supported devices.
+// entry points for the different supported devices.
tag = loadable_device_list[i].tag;
drvidx = loadable_device_list[i].drvidx;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|