You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
388 lines
15 KiB
Diff
388 lines
15 KiB
Diff
--- examples/d/Makefile.examples.in.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/Makefile.examples.in 2019-08-12 14:25:35.000000000 +0900
|
|
@@ -26,7 +26,7 @@
|
|
EXEEXT = @EXEEXT@
|
|
|
|
PKG_CONFIG_ENV = @PKG_CONFIG_ENV@
|
|
-install_tree_d_RPATHCMD = @install_tree_d_RPATHCMD@
|
|
+install_tree_d_RPATHCMD =
|
|
|
|
EXECUTABLES_list = \
|
|
x00d$(EXEEXT) \
|
|
@@ -45,7 +45,6 @@
|
|
x13d$(EXEEXT) \
|
|
x14d$(EXEEXT) \
|
|
x15d$(EXEEXT) \
|
|
- x16d$(EXEEXT) \
|
|
x17d$(EXEEXT) \
|
|
x18d$(EXEEXT) \
|
|
x19d$(EXEEXT) \
|
|
@@ -69,10 +68,10 @@
|
|
rm -f $(EXECUTABLES_list) *.o
|
|
|
|
.d.o:
|
|
- $(DC) $< -c -o $@ $(shell $(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags plplot-d)
|
|
+ $(DC) $< -c -of=$@ $(shell $(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags plplot-d)
|
|
|
|
# target_link_libraries(x${STRING_INDEX}d plplotdmd plplot ${MATH_LIB})
|
|
.o$(EXEEXT):
|
|
- $(DC) $< -o $@ $(install_tree_d_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --libs plplot-d plplot) @MATH_LIB@
|
|
+ $(DC) $< -of=$@ $(install_tree_d_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --libs plplot-d) @MATH_LIB@
|
|
|
|
.SUFFIXES: .d .o $(EXEEXT)
|
|
--- examples/d/x01d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x01d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -222,11 +222,13 @@
|
|
// xor mode enable erasing a line/point/text by replotting it again
|
|
// it does not work in double buffering mode, however
|
|
|
|
+/*
|
|
if ( do_test && test_xor )
|
|
{
|
|
writefln( "The -xor command line option can only be exercised if your "
|
|
"system\nhas usleep(), which does not seem to happen." );
|
|
}
|
|
+*/
|
|
}
|
|
|
|
public void plot2()
|
|
@@ -294,4 +296,4 @@
|
|
plcol0( 4 );
|
|
plline( x, y );
|
|
}
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
--- examples/d/x08d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x08d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -24,7 +24,7 @@
|
|
import plplot;
|
|
import std.string;
|
|
import std.math;
|
|
-import std.c.stdlib;
|
|
+import core.stdc.stdlib;
|
|
|
|
//--------------------------------------------------------------------------
|
|
// cmap1_init1
|
|
@@ -92,7 +92,7 @@
|
|
PLFLT[] alt = [ 60.0, 40.0 ];
|
|
PLFLT[] az = [ 30.0, -30.0 ];
|
|
|
|
- string title[] = [ "#frPLplot Example 8 - Alt=60, Az=30",
|
|
+ string[] title = [ "#frPLplot Example 8 - Alt=60, Az=30",
|
|
"#frPLplot Example 8 - Alt=40, Az=-30" ];
|
|
|
|
// Parse and process command line arguments
|
|
--- examples/d/x11d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x11d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -57,7 +57,7 @@
|
|
PLFLT[] alt = [ 33.0, 17.0 ];
|
|
PLFLT[] az = [ 24.0, 115.0 ];
|
|
|
|
- string title[] = [ "#frPLplot Example 11 - Alt=33, Az=24, Opt=3",
|
|
+ string[] title = [ "#frPLplot Example 11 - Alt=33, Az=24, Opt=3",
|
|
"#frPLplot Example 11 - Alt=17, Az=115, Opt=3" ];
|
|
|
|
PLFLT xx, yy;
|
|
--- examples/d/x15d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x15d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -145,10 +145,10 @@
|
|
//--------------------------------------------------------------------------
|
|
public void plot2( PLFLT[][] z )
|
|
{
|
|
- static PLINT nlin[10] = [ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ];
|
|
- static PLINT inc[10][2] = [ [450, 0], [-450, 0], [0, 0], [900, 0], [300, 0],
|
|
+ static PLINT[10] nlin = [ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ];
|
|
+ static PLINT[2][10] inc = [ [450, 0], [-450, 0], [0, 0], [900, 0], [300, 0],
|
|
[450, -450], [0, 900], [0, 450], [450, -450], [0, 900] ];
|
|
- static PLINT del[10][2] = [ [2000, 2000], [2000, 2000], [2000, 2000],
|
|
+ static PLINT[2][10] del = [ [2000, 2000], [2000, 2000], [2000, 2000],
|
|
[2000, 2000], [2000, 2000], [2000, 2000],
|
|
[2000, 2000], [2000, 2000], [4000, 4000],
|
|
[4000, 2000] ];
|
|
@@ -191,11 +191,11 @@
|
|
//--------------------------------------------------------------------------
|
|
public void plot3()
|
|
{
|
|
- static PLFLT xx[2][5] = [ [-1.0, 1.0, 1.0, -1.0, -1.0],
|
|
+ static PLFLT[5][2] xx = [ [-1.0, 1.0, 1.0, -1.0, -1.0],
|
|
[-1.0, 1.0, 1.0, -1.0, -1.0] ];
|
|
- static PLFLT yy[2][5] = [ [1.0, 1.0, 0.0, 0.0, 1.0],
|
|
+ static PLFLT[5][2] yy = [ [1.0, 1.0, 0.0, 0.0, 1.0],
|
|
[-1.0, -1.0, 0.0, 0.0, -1.0] ];
|
|
- static PLFLT zz[2][5] = [ [0.0, 0.0, 1.0, 1.0, 0.0],
|
|
+ static PLFLT[5][2] zz = [ [0.0, 0.0, 1.0, 1.0, 0.0],
|
|
[0.0, 0.0, 1.0, 1.0, 0.0] ];
|
|
|
|
pladv( 0 );
|
|
--- examples/d/x17d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x17d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -4,7 +4,7 @@
|
|
import std.string;
|
|
import std.math;
|
|
import std.stdio;
|
|
-import std.c.stdlib;
|
|
+import core.stdc.stdlib;
|
|
import plplot;
|
|
|
|
|
|
--- examples/d/x18d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x18d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -6,9 +6,9 @@
|
|
|
|
import plplot;
|
|
|
|
-int opt[] = [ 1, 0, 1, 0 ];
|
|
-PLFLT alt[] = [ 20.0, 35.0, 50.0, 65.0 ];
|
|
-PLFLT az[] = [ 30.0, 40.0, 50.0, 60.0 ];
|
|
+int[] opt = [ 1, 0, 1, 0 ];
|
|
+PLFLT[] alt = [ 20.0, 35.0, 50.0, 65.0 ];
|
|
+PLFLT[] az = [ 30.0, 40.0, 50.0, 60.0 ];
|
|
|
|
//--------------------------------------------------------------------------
|
|
// main
|
|
@@ -81,7 +81,7 @@
|
|
|
|
void test_poly( int k )
|
|
{
|
|
- PLINT draw[][] = [ [ 1, 1, 1, 1 ],
|
|
+ PLINT[][] draw = [ [ 1, 1, 1, 1 ],
|
|
[ 1, 0, 1, 0 ],
|
|
[ 0, 1, 0, 1 ],
|
|
[ 1, 1, 0, 0 ] ];
|
|
--- examples/d/x19d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x19d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -4,7 +4,7 @@
|
|
|
|
import std.math;
|
|
import std.string;
|
|
-import std.c.string;
|
|
+import core.stdc.string;
|
|
|
|
import plplot;
|
|
|
|
@@ -110,14 +110,14 @@
|
|
|
|
//variables for the shapelib example
|
|
const PLINT nbeachareas = 2;
|
|
- const PLINT beachareas[] = [ 23, 24 ];
|
|
+ const PLINT[] beachareas = [ 23, 24 ];
|
|
const nwoodlandareas = 94;
|
|
- PLINT woodlandareas[94];
|
|
+ PLINT[94] woodlandareas;
|
|
const PLINT nshingleareas = 22;
|
|
- const PLINT shingleareas[] = [ 0, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 217, 2424, 2425, 2426, 2427, 2428, 2491, 2577 ];
|
|
+ const PLINT[] shingleareas = [ 0, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 217, 2424, 2425, 2426, 2427, 2428, 2491, 2577 ];
|
|
const PLINT ncragareas = 2024;
|
|
- PLINT cragareas[2024];
|
|
- const PLINT majorroads[] = [ 33, 48, 71, 83, 89, 90, 101, 102, 111 ];
|
|
+ PLINT[2024] cragareas;
|
|
+ const PLINT[] majorroads = [ 33, 48, 71, 83, 89, 90, 101, 102, 111 ];
|
|
|
|
plinit();
|
|
|
|
@@ -173,8 +173,8 @@
|
|
// Show Baltimore, MD on the map
|
|
plcol0( 2 );
|
|
plssym( 0.0, 2.0 );
|
|
- PLFLT x[1] = -76.6125;
|
|
- PLFLT y[1] = 39.2902778;
|
|
+ PLFLT[1] x = -76.6125;
|
|
+ PLFLT[1] y = 39.2902778;
|
|
plpoin( x, y, 18 );
|
|
plssym( 0.0, 1.0 );
|
|
plptex( -76.6125, 43.0, 0.0, 0.0, 0.0, "Baltimore, MD" );
|
|
--- examples/d/x23d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x23d.d 2019-08-12 14:21:52.000000000 +0900
|
|
@@ -320,30 +320,30 @@
|
|
if ( page == 11 )
|
|
{
|
|
plsfci( fci[i] );
|
|
- text = format( "Page 12, %s, %s, %s: The quick brown fox jumps over the lazy dog",
|
|
+ text = format( "Page 12, %s, %s, %s: " ~ "The quick brown fox jumps over the lazy dog",
|
|
family[family_index], style[style_index], weight[weight_index] );
|
|
}
|
|
else if ( page == 12 )
|
|
{
|
|
plsfont( family_index, style_index, weight_index );
|
|
- text = format( "Page 13, %s, %s, %s: The quick brown fox jumps over the lazy dog",
|
|
+ text = format( "Page 13, %s, %s, %s: " ~ "The quick brown fox jumps over the lazy dog",
|
|
family[family_index], style[style_index], weight[weight_index] );
|
|
}
|
|
else if ( page == 13 )
|
|
{
|
|
- text = format( "Page 14, %s, %s, %s: #<0x%x>The quick brown fox jumps over the lazy dog",
|
|
+ text = format( "Page 14, %s, %s, %s: #<0x%x>" ~ "The quick brown fox jumps over the lazy dog",
|
|
family[family_index], style[style_index], weight[weight_index], fci[i] );
|
|
}
|
|
else if ( page == 14 )
|
|
{
|
|
- text = format( "Page 15, %s, %s, %s: #<0x%1x0>#<0x%1x1>#<0x%1x2>"
|
|
+ text = format( "Page 15, %s, %s, %s: #<0x%1x0>#<0x%1x1>#<0x%1x2>" ~
|
|
"The quick brown fox jumps over the lazy dog",
|
|
family[family_index], style[style_index], weight[weight_index],
|
|
family_index, style_index, weight_index );
|
|
}
|
|
else if ( page == 15 )
|
|
{
|
|
- text = format( "Page 16, %s, %s, %s: #<%s/>#<%s/>#<%s/>"
|
|
+ text = format( "Page 16, %s, %s, %s: #<%s/>#<%s/>#<%s/>" ~
|
|
"The quick brown fox jumps over the lazy dog",
|
|
family[family_index], style[style_index], weight[weight_index],
|
|
family[family_index], style[style_index], weight[weight_index] );
|
|
--- examples/d/x33d.d.orig 2019-06-02 08:24:33.000000000 +0900
|
|
+++ examples/d/x33d.d 2019-08-12 15:13:03.000000000 +0900
|
|
@@ -30,7 +30,7 @@
|
|
import std.math;
|
|
import std.string;
|
|
|
|
-static PLINT position_options[16] = [
|
|
+static PLINT[16] position_options = [
|
|
PL_POSITION_LEFT | PL_POSITION_TOP | PL_POSITION_OUTSIDE,
|
|
PL_POSITION_TOP | PL_POSITION_OUTSIDE,
|
|
PL_POSITION_RIGHT | PL_POSITION_TOP | PL_POSITION_OUTSIDE,
|
|
@@ -50,7 +50,7 @@
|
|
];
|
|
|
|
// Pick 5 arbitrary UTF-8 symbols useful for plotting points (✠✚✱✪✽✺✰✴✦).
|
|
-static string special_symbols[5] = [
|
|
+static string[5] special_symbols = [
|
|
"✰",
|
|
"✴",
|
|
"✱",
|
|
@@ -62,13 +62,13 @@
|
|
|
|
// Colorbar type options
|
|
const int COLORBAR_KINDS = 4;
|
|
-static PLINT colorbar_option_kinds[COLORBAR_KINDS] = [
|
|
+static PLINT[COLORBAR_KINDS] colorbar_option_kinds = [
|
|
PL_COLORBAR_SHADE,
|
|
PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL,
|
|
PL_COLORBAR_IMAGE,
|
|
PL_COLORBAR_GRADIENT
|
|
];
|
|
-static string colorbar_option_kind_labels[COLORBAR_KINDS] = [
|
|
+static string[COLORBAR_KINDS] colorbar_option_kind_labels = [
|
|
"Shade colorbars",
|
|
"Shade colorbars with custom labels",
|
|
"Image colorbars",
|
|
@@ -77,13 +77,13 @@
|
|
|
|
// Which side of the page are we positioned relative to?
|
|
const int COLORBAR_POSITIONS = 4;
|
|
-static PLINT colorbar_position_options[COLORBAR_POSITIONS] = [
|
|
+static PLINT[COLORBAR_POSITIONS] colorbar_position_options = [
|
|
PL_POSITION_LEFT,
|
|
PL_POSITION_RIGHT,
|
|
PL_POSITION_TOP,
|
|
PL_POSITION_BOTTOM
|
|
];
|
|
-static string colorbar_position_option_labels[COLORBAR_POSITIONS] = [
|
|
+static string[COLORBAR_POSITIONS] colorbar_position_option_labels = [
|
|
"Left",
|
|
"Right",
|
|
"Top",
|
|
@@ -92,13 +92,13 @@
|
|
|
|
// Colorbar label positioning options
|
|
const int COLORBAR_LABELS = 4;
|
|
-static PLINT colorbar_label_options[COLORBAR_LABELS] = [
|
|
+static PLINT[COLORBAR_LABELS] colorbar_label_options = [
|
|
PL_COLORBAR_LABEL_LEFT,
|
|
PL_COLORBAR_LABEL_RIGHT,
|
|
PL_COLORBAR_LABEL_TOP,
|
|
PL_COLORBAR_LABEL_BOTTOM
|
|
];
|
|
-static string colorbar_label_option_labels[COLORBAR_LABELS] = [
|
|
+static string[COLORBAR_LABELS] colorbar_label_option_labels = [
|
|
"Label left",
|
|
"Label right",
|
|
"Label top",
|
|
@@ -107,13 +107,13 @@
|
|
|
|
// Colorbar cap options
|
|
const int COLORBAR_CAPS = 4;
|
|
-static PLINT colorbar_cap_options[COLORBAR_CAPS] = [
|
|
+static PLINT[COLORBAR_CAPS] colorbar_cap_options = [
|
|
PL_COLORBAR_CAP_NONE,
|
|
PL_COLORBAR_CAP_LOW,
|
|
PL_COLORBAR_CAP_HIGH,
|
|
PL_COLORBAR_CAP_LOW | PL_COLORBAR_CAP_HIGH
|
|
];
|
|
-static string colorbar_cap_option_labels[COLORBAR_CAPS] = [
|
|
+static string[COLORBAR_CAPS] colorbar_cap_option_labels = [
|
|
"No caps",
|
|
"Low cap",
|
|
"High cap",
|
|
@@ -128,18 +128,18 @@
|
|
// Parameters for the colorbars on this page
|
|
PLINT position_i, position, opt;
|
|
PLFLT x, y, x_length, y_length;
|
|
- PLFLT ticks[1] = [ 0.0 ];
|
|
- PLINT sub_ticks[1] = [ 0 ];
|
|
+ PLFLT[1] ticks = [ 0.0 ];
|
|
+ PLINT[1] sub_ticks = [ 0 ];
|
|
PLFLT low_cap_color, high_cap_color;
|
|
PLINT vertical, ifn;
|
|
PLINT n_axes = 1;
|
|
string[] axis_opts;
|
|
PLINT n_labels = 1;
|
|
- PLINT label_opts[1] = [ 0 ];
|
|
+ PLINT[1] label_opts = [ 0 ];
|
|
string[] label;
|
|
string title;
|
|
PLFLT colorbar_width, colorbar_height;
|
|
- PLINT n_values_array[1];
|
|
+ PLINT[1] n_values_array;
|
|
PLFLT[][] values_array;
|
|
|
|
axis_opts.length = 1;
|
|
@@ -282,20 +282,20 @@
|
|
int i, k;
|
|
PLINT opt;
|
|
PLINT nlegend, nturn;
|
|
- PLINT opt_array[MAX_NLEGEND];
|
|
- PLINT text_colors[MAX_NLEGEND];
|
|
- PLINT box_colors[MAX_NLEGEND];
|
|
- PLINT box_patterns[MAX_NLEGEND];
|
|
- PLFLT box_scales[MAX_NLEGEND];
|
|
- PLFLT box_line_widths[MAX_NLEGEND];
|
|
- PLINT line_colors[MAX_NLEGEND];
|
|
- PLINT line_styles[MAX_NLEGEND];
|
|
- PLFLT line_widths[MAX_NLEGEND];
|
|
- PLINT symbol_numbers[MAX_NLEGEND];
|
|
- PLINT symbol_colors[MAX_NLEGEND];
|
|
- PLFLT symbol_scales[MAX_NLEGEND];
|
|
- string text[MAX_NLEGEND];
|
|
- string symbols[MAX_NLEGEND];
|
|
+ PLINT[MAX_NLEGEND] opt_array;
|
|
+ PLINT[MAX_NLEGEND] text_colors;
|
|
+ PLINT[MAX_NLEGEND] box_colors;
|
|
+ PLINT[MAX_NLEGEND] box_patterns;
|
|
+ PLFLT[MAX_NLEGEND] box_scales;
|
|
+ PLFLT[MAX_NLEGEND] box_line_widths;
|
|
+ PLINT[MAX_NLEGEND] line_colors;
|
|
+ PLINT[MAX_NLEGEND] line_styles;
|
|
+ PLFLT[MAX_NLEGEND] line_widths;
|
|
+ PLINT[MAX_NLEGEND] symbol_numbers;
|
|
+ PLINT[MAX_NLEGEND] symbol_colors;
|
|
+ PLFLT[MAX_NLEGEND] symbol_scales;
|
|
+ string[MAX_NLEGEND] text;
|
|
+ string[MAX_NLEGEND] symbols;
|
|
PLFLT legend_width, legend_height, x, y, xstart, ystart;
|
|
PLFLT max_height, text_scale;
|
|
PLINT position, opt_base, nrow, ncolumn;
|
|
@@ -822,9 +822,9 @@
|
|
if ( colorbar )
|
|
{
|
|
// Color bar examples
|
|
- PLFLT values_small[2] = [ -1.0e-20, 1.0e-20 ];
|
|
- PLFLT values_uneven[9] = [ -1.0e-20, 2.0e-20, 2.6e-20, 3.4e-20, 6.0e-20, 7.0e-20, 8.0e-20, 9.0e-20, 10.0e-20 ];
|
|
- PLFLT values_even[9] = [ -2.0e-20, -1.0e-20, 0.0e-20, 1.0e-20, 2.0e-20, 3.0e-20, 4.0e-20, 5.0e-20, 6.0e-20 ];
|
|
+ PLFLT[2] values_small = [ -1.0e-20, 1.0e-20 ];
|
|
+ PLFLT[9] values_uneven = [ -1.0e-20, 2.0e-20, 2.6e-20, 3.4e-20, 6.0e-20, 7.0e-20, 8.0e-20, 9.0e-20, 10.0e-20 ];
|
|
+ PLFLT[9] values_even = [ -2.0e-20, -1.0e-20, 0.0e-20, 1.0e-20, 2.0e-20, 3.0e-20, 4.0e-20, 5.0e-20, 6.0e-20 ];
|
|
|
|
// Use unsaturated green background colour to contrast with black caps.
|
|
plscolbg( 70, 185, 70 );
|