FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot-old/src/show.c at axis_branch_base · gnuplot/gnuplot-old · GitHub
gnuplot
gnuplot-old
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot-old
/
src
/
show.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
2142 lines (1907 loc) · 48.4 KB
Breadcrumbs
gnuplot-old
/
src
/
show.c
Copy path
File metadata and controls
2142 lines (1907 loc) · 48.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef
lint
static
char
*
RCSid
() {
return
RCSid
(
"$Id: show.c,v 1.39.2.5 2000/10/18 16:30:01 broeker Exp $"
); }
#endif
/* GNUPLOT - show.c */
/*[
* Copyright 1986 - 1993, 1998 Thomas Williams, Colin Kelley
*
* Permission to use, copy, and distribute this software and its
* documentation for any purpose with or without fee is hereby granted,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*
* Permission to modify the software is granted, but not the right to
* distribute the complete modified source code. Modifications are to
* be distributed as patches to the released version. Permission to
* distribute binaries produced by compiling modified sources is granted,
* provided you
* 1. distribute the corresponding source modifications from the
* released version in the form of a patch file along with the binaries,
* 2. add special version identification to distinguish your version
* in addition to the base release version number,
* 3. provide your name and address as the primary contact for the
* support of your modified version, and
* 4. retain our contact information in regard to use of the base
* software.
* Permission to distribute the released version of the source code along
* with corresponding source modifications in the form of a patch file is
* granted with same provisions 2 through 4 for binary distributions.
*
* This software is provided "as is" without express or implied warranty
* to the extent permitted by applicable law.
]*/
/*
* 19 September 1992 Lawrence Crowl (crowl@cs.orst.edu)
* Added user-specified bases for log scaling.
*/
#include
"setshow.h"
#include
"alloc.h"
#include
"axis.h"
#include
"command.h"
#include
"contour.h"
#include
"datafile.h"
#include
"eval.h"
#include
"gp_time.h"
#include
"graphics.h"
#include
"hidden3d.h"
#include
"parse.h"
#include
"plot2d.h"
#include
"plot3d.h"
#include
"tables.h"
#include
"util.h"
#include
"term_api.h"
#include
"variable.h"
#include
"version.h"
#ifdef
USE_MOUSE
# include
"mouse.h"
#endif
#include
<ctype.h>
/******** Local functions ********/
static
void
show_at
__PROTO
((
void
));
static
void
disp_at
__PROTO
((
struct
at_type
*
,
int
));
static
void
show_all
__PROTO
((
void
));
static
void
show_autoscale
__PROTO
((
void
));
static
void
show_bars
__PROTO
((
void
));
static
void
show_border
__PROTO
((
void
));
static
void
show_boxwidth
__PROTO
((
void
));
static
void
show_clip
__PROTO
((
void
));
static
void
show_contour
__PROTO
((
void
));
static
void
show_dgrid3d
__PROTO
((
void
));
static
void
show_label_contours
__PROTO
((
void
));
static
void
show_mapping
__PROTO
((
void
));
static
void
show_dummy
__PROTO
((
void
));
static
void
show_format
__PROTO
((
void
));
static
void
show_styles
__PROTO
((
const
char
*
name
,
enum
PLOT_STYLE
style
));
static
void
show_style
__PROTO
((
void
));
static
void
show_grid
__PROTO
((
void
));
static
void
show_zeroaxis
__PROTO
((
AXIS_INDEX
));
static
void
show_label
__PROTO
((
int
tag
));
static
void
show_keytitle
__PROTO
((
void
));
static
void
show_key
__PROTO
((
void
));
static
void
show_logscale
__PROTO
((
void
));
static
void
show_offsets
__PROTO
((
void
));
static
void
show_margin
__PROTO
((
void
));
static
void
show_output
__PROTO
((
void
));
static
void
show_parametric
__PROTO
((
void
));
static
void
show_pointsize
__PROTO
((
void
));
static
void
show_encoding
__PROTO
((
void
));
static
void
show_polar
__PROTO
((
void
));
static
void
show_angles
__PROTO
((
void
));
static
void
show_samples
__PROTO
((
void
));
static
void
show_isosamples
__PROTO
((
void
));
static
void
show_view
__PROTO
((
void
));
static
void
show_surface
__PROTO
((
void
));
static
void
show_hidden3d
__PROTO
((
void
));
#if
defined(
HAVE_LIBREADLINE
)
&&
defined(
GNUPLOT_HISTORY
)
static
void
show_historysize
__PROTO
((
void
));
#endif
static
void
show_size
__PROTO
((
void
));
static
void
show_origin
__PROTO
((
void
));
static
void
show_term
__PROTO
((
void
));
static
void
show_tics
__PROTO
((
TBOOLEAN
showx
,
TBOOLEAN
showy
,
TBOOLEAN
showz
,
TBOOLEAN
showx2
,
TBOOLEAN
showy2
));
static
void
show_mtics
__PROTO
((
AXIS_INDEX
));
static
void
show_timestamp
__PROTO
((
void
));
static
void
show_range
__PROTO
((
AXIS_INDEX
axis
));
static
void
show_xyzlabel
__PROTO
((
const
char
*
name
,
const
char
*
suffix
,
label_struct
*
label
));
static
void
show_title
__PROTO
((
void
));
static
void
show_axislabel
__PROTO
((
AXIS_INDEX
));
static
void
show_data_is_timedate
__PROTO
((
AXIS_INDEX
));
static
void
show_timefmt
__PROTO
((
void
));
static
void
show_locale
__PROTO
((
void
));
static
void
show_loadpath
__PROTO
((
void
));
static
void
show_zero
__PROTO
((
void
));
static
void
show_missing
__PROTO
((
void
));
#ifdef
USE_MOUSE
static
void
show_mouse
__PROTO
((
void
));
#endif
static
void
show_plot
__PROTO
((
void
));
static
void
show_variables
__PROTO
((
void
));
static
void
show_linestyle
__PROTO
((
int
tag
));
static
void
show_arrow
__PROTO
((
int
tag
));
static
void
show_ticdef
__PROTO
((
AXIS_INDEX
));
static
void
show_position
__PROTO
((
struct
position
*
pos
));
static
void
show_functions
__PROTO
((
void
));
static
int
var_show_all
=
0
;
/* following code segment appears over and over again */
#define
SHOW_NUM_OR_TIME
(
x
,
axis
) SAVE_NUM_OR_TIME(stderr, x, axis)
#define
SHOW_ALL_NL
{ if (!var_show_all) (void) putc('\n',stderr); }
/******* The 'show' command *******/
void
show_command
()
{
/* show at is undocumented/hidden... */
static
char
GPFAR
showmess
[]
=
"valid set options: [] = choose one, {} means optional\n\n\
\t'all', 'angles', 'arrow', 'autoscale', 'bars', 'border',\n\
\t'boxwidth', 'clip', 'cntrparam', 'contour', 'dgrid3d', 'dummy',\n\
\t'encoding', 'format', 'functions', 'grid', 'hidden', 'isosamples',\n\
\t'key', 'label', 'loadpath', 'locale', 'logscale', 'mapping',\n\
\t'margin', 'missing', 'offsets', 'origin', 'output', 'plot',\n\
\t'parametric', 'pointsize', 'polar', '[rtuv]range', 'samples',\n\
\t'size', 'style', 'terminal', 'tics', 'timestamp', 'timefmt', 'title',\n\
\t'variables', 'version', 'view', '[xyz]{2}label', '[xyz]{2}range',\n\
\t'{m}[xyz]{2}tics', '[xyz]{2}[md]tics', '[xyz]{2}zeroaxis', '[xyz]data',\n\
\t'zero', 'zeroaxis'"
;
int
token_found
;
struct
value
a
;
int
tag
=
0
;
c_token
++
;
token_found
=
lookup_table
(
&
set_tbl
[
0
],
c_token
);
/* rationalize c_token advancement stuff a bit: */
if
(
token_found
!=
S_INVALID
)
c_token
++
;
switch
(
token_found
) {
case
S_ACTIONTABLE
:
show_at
();
break
;
case
S_ALL
:
show_all
();
break
;
case
S_VERSION
:
show_version
(
stderr
);
break
;
case
S_AUTOSCALE
:
show_autoscale
();
break
;
case
S_BARS
:
show_bars
();
break
;
case
S_BORDER
:
show_border
();
break
;
case
S_BOXWIDTH
:
show_boxwidth
();
break
;
case
S_CLIP
:
show_clip
();
break
;
case
S_CLABEL
:
/* contour labels are shown with 'show contour' */
case
S_CONTOUR
:
case
S_CNTRPARAM
:
show_contour
();
break
;
case
S_DGRID3D
:
show_dgrid3d
();
break
;
case
S_MAPPING
:
show_mapping
();
break
;
case
S_DUMMY
:
show_dummy
();
break
;
case
S_FORMAT
:
show_format
();
break
;
case
S_FUNCTIONS
:
show_functions
();
break
;
case
S_GRID
:
show_grid
();
break
;
case
S_XZEROAXIS
:
show_zeroaxis
(
FIRST_X_AXIS
);
break
;
case
S_ZEROAXIS
:
show_zeroaxis
(
FIRST_X_AXIS
);
/* FALLTHROUGH */
case
S_YZEROAXIS
:
show_zeroaxis
(
FIRST_Y_AXIS
);
break
;
#define
CHECK_TAG_GT_ZERO
\
if (!END_OF_COMMAND) { \
tag = real(const_express(&a)); \
if (tag <= 0) \
int_error(c_token, "tag must be > zero"); \
} \
(void) putc('\n',stderr);
case
S_LABEL
:
CHECK_TAG_GT_ZERO
;
show_label
(
tag
);
break
;
case
S_ARROW
:
CHECK_TAG_GT_ZERO
;
show_arrow
(
tag
);
break
;
#ifdef
BACKWARDS_COMPATIBLE
case
S_LINESTYLE
:
CHECK_TAG_GT_ZERO
;
show_linestyle
(
tag
);
break
;
#endif
case
S_KEYTITLE
:
show_keytitle
();
break
;
case
S_KEY
:
show_key
();
break
;
case
S_LOGSCALE
:
show_logscale
();
break
;
case
S_OFFSETS
:
show_offsets
();
break
;
case
S_MARGIN
:
show_margin
();
break
;
case
S_OUTPUT
:
show_output
();
break
;
case
S_PARAMETRIC
:
show_parametric
();
break
;
case
S_POINTSIZE
:
show_pointsize
();
break
;
case
S_ENCODING
:
show_encoding
();
break
;
case
S_POLAR
:
show_polar
();
break
;
case
S_ANGLES
:
show_angles
();
break
;
case
S_SAMPLES
:
show_samples
();
break
;
case
S_ISOSAMPLES
:
show_isosamples
();
break
;
case
S_VIEW
:
show_view
();
break
;
case
S_STYLE
:
show_style
();
break
;
case
S_SURFACE
:
show_surface
();
break
;
case
S_HIDDEN3D
:
show_hidden3d
();
break
;
#if
defined(
HAVE_LIBREADLINE
)
&&
defined(
GNUPLOT_HISTORY
)
case
S_HISTORYSIZE
:
show_historysize
();
break
;
#endif
case
S_SIZE
:
show_size
();
break
;
case
S_ORIGIN
:
show_origin
();
break
;
case
S_TERMINAL
:
show_term
();
break
;
case
S_TICS
:
show_tics
(TRUE, TRUE, TRUE, TRUE, TRUE);
break
;
case
S_MXTICS
:
show_mtics
(
FIRST_X_AXIS
);
break
;
case
S_MYTICS
:
show_mtics
(
FIRST_Y_AXIS
);
break
;
case
S_MZTICS
:
show_mtics
(
FIRST_Z_AXIS
);
break
;
case
S_MX2TICS
:
show_mtics
(
SECOND_X_AXIS
);
break
;
case
S_MY2TICS
:
show_mtics
(
SECOND_Y_AXIS
);
break
;
case
S_TIMESTAMP
:
show_timestamp
();
break
;
case
S_RRANGE
:
show_range
(
R_AXIS
);
break
;
case
S_TRANGE
:
show_range
(
T_AXIS
);
break
;
case
S_URANGE
:
show_range
(
U_AXIS
);
break
;
case
S_VRANGE
:
show_range
(
V_AXIS
);
break
;
case
S_XRANGE
:
show_range
(
FIRST_X_AXIS
);
break
;
case
S_YRANGE
:
show_range
(
FIRST_Y_AXIS
);
break
;
case
S_X2RANGE
:
show_range
(
SECOND_X_AXIS
);
break
;
case
S_Y2RANGE
:
show_range
(
SECOND_Y_AXIS
);
break
;
case
S_ZRANGE
:
show_range
(
FIRST_Z_AXIS
);
break
;
case
S_TITLE
:
show_title
();
break
;
case
S_XLABEL
:
show_axislabel
(
FIRST_X_AXIS
);
break
;
case
S_YLABEL
:
show_axislabel
(
FIRST_Y_AXIS
);
break
;
case
S_ZLABEL
:
show_axislabel
(
FIRST_Z_AXIS
);
break
;
case
S_X2LABEL
:
show_axislabel
(
SECOND_X_AXIS
);
break
;
case
S_Y2LABEL
:
show_axislabel
(
SECOND_Y_AXIS
);
break
;
case
S_XDATA
:
show_data_is_timedate
(
FIRST_X_AXIS
);
break
;
case
S_YDATA
:
show_data_is_timedate
(
FIRST_Y_AXIS
);
break
;
case
S_X2DATA
:
show_data_is_timedate
(
SECOND_X_AXIS
);
break
;
case
S_Y2DATA
:
show_data_is_timedate
(
SECOND_Y_AXIS
);
break
;
case
S_ZDATA
:
show_data_is_timedate
(
FIRST_Z_AXIS
);
break
;
case
S_TIMEFMT
:
show_timefmt
();
break
;
case
S_LOCALE
:
show_locale
();
break
;
case
S_LOADPATH
:
show_loadpath
();
break
;
case
S_ZERO
:
show_zero
();
break
;
case
S_MISSING
:
show_missing
();
break
;
#ifdef
USE_MOUSE
case
S_MOUSE
:
show_mouse
();
break
;
#endif
case
S_PLOT
:
show_plot
();
break
;
case
S_VARIABLES
:
show_variables
();
break
;
/* FIXME: get rid of S_*DTICS, S_*MTICS cases */
case
S_XTICS
:
case
S_XDTICS
:
case
S_XMTICS
:
show_tics
(TRUE, FALSE, FALSE, TRUE, FALSE);
break
;
case
S_YTICS
:
case
S_YDTICS
:
case
S_YMTICS
:
show_tics
(FALSE, TRUE, FALSE, FALSE, TRUE);
break
;
case
S_ZTICS
:
case
S_ZDTICS
:
case
S_ZMTICS
:
show_tics
(FALSE, FALSE, TRUE, FALSE, FALSE);
break
;
case
S_X2TICS
:
case
S_X2DTICS
:
case
S_X2MTICS
:
show_tics
(FALSE, FALSE, FALSE, TRUE, FALSE);
break
;
case
S_Y2TICS
:
case
S_Y2DTICS
:
case
S_Y2MTICS
:
show_tics
(FALSE, FALSE, FALSE, FALSE, TRUE);
break
;
case
S_INVALID
:
int_error
(
c_token
,
showmess
);
default
:
int_error
(
c_token
,
"internal parser error -- report as a bug"
);
}
screen_ok
=
FALSE;
(
void
)
putc
(
'\n'
,
stderr
);
}
/* process 'show actiontable|at' command
* not documented
*/
static
void
show_at
()
{
(
void
)
putc
(
'\n'
,
stderr
);
disp_at
(
temp_at
(),
0
);
c_token
++
;
}
/* called by show_at() */
static
void
disp_at
(
curr_at
,
level
)
struct
at_type
*
curr_at
;
int
level
;
{
register
int
i
,
j
;
register
union
argument
*
arg
;
for
(
i
=
0
;
i
<
curr_at
->
a_count
;
i
++
) {
(
void
)
putc
(
'\t'
,
stderr
);
for
(
j
=
0
;
j
<
level
;
j
++
)
(
void
)
putc
(
' '
,
stderr
);
/* indent */
/* print name of instruction */
fputs
(
ft
[(
int
) (
curr_at
->
actions
[
i
].
index
)].
f_name
,
stderr
);
arg
=
&
(
curr_at
->
actions
[
i
].
arg
);
/* now print optional argument */
switch
(
curr_at
->
actions
[
i
].
index
) {
case
PUSH
:
fprintf
(
stderr
,
" %s\n"
,
arg
->
udv_arg
->
udv_name
);
break
;
case
PUSHC
:
(
void
)
putc
(
' '
,
stderr
);
disp_value
(
stderr
,
&
(
arg
->
v_arg
));
(
void
)
putc
(
'\n'
,
stderr
);
break
;
case
PUSHD1
:
fprintf
(
stderr
,
" %c dummy\n"
,
arg
->
udf_arg
->
udf_name
[
0
]);
break
;
case
PUSHD2
:
fprintf
(
stderr
,
" %c dummy\n"
,
arg
->
udf_arg
->
udf_name
[
1
]);
break
;
case
CALL
:
fprintf
(
stderr
,
" %s"
,
arg
->
udf_arg
->
udf_name
);
if
(
level
<
6
) {
if
(
arg
->
udf_arg
->
at
) {
(
void
)
putc
(
'\n'
,
stderr
);
disp_at
(
arg
->
udf_arg
->
at
,
level
+
2
);
/* recurse! */
}
else
fputs
(
" (undefined)\n"
,
stderr
);
}
else
(
void
)
putc
(
'\n'
,
stderr
);
break
;
case
CALLN
:
fprintf
(
stderr
,
" %s"
,
arg
->
udf_arg
->
udf_name
);
if
(
level
<
6
) {
if
(
arg
->
udf_arg
->
at
) {
(
void
)
putc
(
'\n'
,
stderr
);
disp_at
(
arg
->
udf_arg
->
at
,
level
+
2
);
/* recurse! */
}
else
fputs
(
" (undefined)\n"
,
stderr
);
}
else
(
void
)
putc
(
'\n'
,
stderr
);
break
;
case
JUMP
:
case
JUMPZ
:
case
JUMPNZ
:
case
JTERN
:
fprintf
(
stderr
,
" +%d\n"
,
arg
->
j_arg
);
break
;
case
DOLLARS
:
fprintf
(
stderr
,
" %d\n"
,
arg
->
v_arg
.
v
.
int_val
);
break
;
default
:
(
void
)
putc
(
'\n'
,
stderr
);
}
}
}
/* process 'show all' command */
static
void
show_all
()
{
var_show_all
=
1
;
show_version
(
stderr
);
show_autoscale
();
show_bars
();
show_border
();
show_boxwidth
();
show_clip
();
show_label_contours
();
show_contour
();
show_dgrid3d
();
show_mapping
();
show_dummy
();
show_format
();
show_style
();
/*
show_styles("data",data_style);
show_styles("functions",func_style);
*/
show_grid
();
show_zeroaxis
(
FIRST_X_AXIS
);
show_zeroaxis
(
FIRST_Y_AXIS
);
show_label
(
0
);
show_arrow
(
0
);
/*
show_linestyle(0);
*/
show_keytitle
();
show_key
();
show_logscale
();
show_offsets
();
show_margin
();
show_output
();
show_parametric
();
show_pointsize
();
show_encoding
();
show_polar
();
show_angles
();
show_samples
();
show_isosamples
();
show_view
();
show_surface
();
show_hidden3d
();
#if
defined(
HAVE_LIBREADLINE
)
&&
defined(
GNUPLOT_HISTORY
)
show_historysize
();
#endif
show_size
();
show_origin
();
show_term
();
show_tics
(TRUE,TRUE,TRUE,TRUE,TRUE);
show_mtics
(
FIRST_X_AXIS
);
show_mtics
(
FIRST_Y_AXIS
);
show_mtics
(
FIRST_Z_AXIS
);
show_mtics
(
SECOND_X_AXIS
);
show_mtics
(
SECOND_Y_AXIS
);
show_xyzlabel
(
""
,
"time"
,
&
timelabel
);
if
(
parametric
||
polar
) {
if
(!
is_3d_plot
)
show_range
(
T_AXIS
);
else
{
show_range
(
U_AXIS
);
show_range
(
V_AXIS
);
}
}
show_range
(
FIRST_X_AXIS
);
show_range
(
FIRST_Y_AXIS
);
show_range
(
SECOND_X_AXIS
);
show_range
(
SECOND_Y_AXIS
);
show_range
(
FIRST_Z_AXIS
);
show_title
();
show_axislabel
(
FIRST_X_AXIS
);
show_axislabel
(
FIRST_Y_AXIS
);
show_axislabel
(
FIRST_Z_AXIS
);
show_axislabel
(
SECOND_X_AXIS
);
show_axislabel
(
SECOND_Y_AXIS
);
show_data_is_timedate
(
FIRST_X_AXIS
);
show_data_is_timedate
(
FIRST_Y_AXIS
);
show_data_is_timedate
(
SECOND_X_AXIS
);
show_data_is_timedate
(
SECOND_Y_AXIS
);
show_data_is_timedate
(
FIRST_Z_AXIS
);
show_timefmt
();
show_loadpath
();
show_locale
();
show_zero
();
show_missing
();
#ifdef
USE_MOUSE
show_mouse
();
#endif
show_plot
();
show_variables
();
show_functions
();
var_show_all
=
0
;
}
/* process 'show version' command */
void
show_version
(
fp
)
FILE
*
fp
;
{
/* If printed to a file, we prefix everything with
* a hash mark to comment out the version information.
*/
char
prefix
[
6
];
/* "# " */
char
*
p
=
prefix
;
prefix
[
0
]
=
'#'
;
prefix
[
1
]
=
prefix
[
2
]
=
prefix
[
3
]
=
prefix
[
4
]
=
' '
;
prefix
[
5
]
=
NUL
;
if
(
fp
==
stderr
) {
/* No hash mark - let p point to the trailing '\0' */
p
+=
sizeof
(
prefix
)
-
1
;
}
else
{
#ifdef
BINDIR
# ifdef
X11
fprintf
(
fp
,
"#!%s/gnuplot -persist\n#\n"
,
BINDIR
);
# else
fprintf
(
fp
,
"#!%s/gnuplot\n#\n"
,
BINDIR
);
# endif
/* not X11 */
#endif
/* BINDIR */
}
fprintf
(
fp
,
"%s\n\
%s\t%s\n\
%s\tVersion %s patchlevel %s\n\
%s\tlast modified %s\n\
%s\tSystem: %s %s\n\
%s\n\
%s\t%s\n\
%s\tThomas Williams, Colin Kelley and many others\n\
%s\n\
%s\tThis is a pre-version of gnuplot 4.0. Please refer to the documentation\n\
%s\tfor command syntax changes. The old syntax will be accepted throughout\n\
%s\tthe 4.0 series, but all save files use the new syntax.\n\
%s\n\
%s\tType `help` to access the on-line reference manual\n\
%s\tThe gnuplot FAQ is available from\n\
%s\t\t%s\n\
%s\n\
%s\tSend comments and requests for help to <%s>\n\
%s\tSend bugs, suggestions and mods to <%s>\n\
%s\n"
,
p
,
/* empty line */
p
,
PROGRAM
,
p
,
gnuplot_version
,
gnuplot_patchlevel
,
p
,
gnuplot_date
,
p
,
os_name
,
os_rel
,
p
,
/* empty line */
p
,
gnuplot_copyright
,
p
,
/* authors */
p
,
/* empty line */
p
,
/* 4.0 info */
p
,
/* 4.0 info */
p
,
/* 4.0 info */
p
,
/* empty line */
p
,
/* Type `help` */
p
,
/* FAQ is at */
p
,
faq_location
,
p
,
/* empty line */
p
,
help_email
,
p
,
bug_email
,
p
);
/* empty line */
/* show version long */
if
(
almost_equals
(
c_token
,
"l$ong"
)) {
char
*
helpfile
=
NULL
;
c_token
++
;
fputs
(
"Compile options:\n"
,
stderr
);
{
/* The following code could be a lot simpler if
* it wasn't for Borland's broken compiler ...
*/
const
char
*
rdline
,
*
gnu_rdline
,
*
libgd
,
*
libpng
,
*
linuxvga
,
*
nocwdrc
,
*
x11
,
*
use_mouse
,
*
unixplot
,
*
gnugraph
;
rdline
=
#ifdef
READLINE
"+READLINE "
#else
"-READLINE "
#endif
,
gnu_rdline
=
#ifdef
HAVE_LIBREADLINE
"+LIBREADLINE "
# ifdef
GNUPLOT_HISTORY
"+HISTORY "
#else
"-HISTORY "
# endif
#else
"-LIBREADLINE "
#endif
,
libgd
=
#ifdef
HAVE_LIBGD
"+LIBGD "
#else
"-LIBGD "
#endif
,
libpng
=
#ifdef
HAVE_LIBPNG
"+LIBPNG "
#else
"-LIBPNG "
#endif
,
linuxvga
=
#ifdef
LINUXVGA
"+LINUXVGA "
#else
""
#endif
,
nocwdrc
=
#ifdef
NOCWDRC
"+NOCWDRC "
#else
"-NOCWDRC "
#endif
,
x11
=
#ifdef
X11
"+X11 "
#else
""
#endif
,
use_mouse
=
#ifdef
USE_MOUSE
"+USE_MOUSE "
#else
""
#endif
,
unixplot
=
#ifdef
UNIXPLOT
"+UNIXPLOT "
#else
""
#endif
,
gnugraph
=
#ifdef
GNUGRAPH
"+GNUGRAPH "
#else
""
#endif
;
fprintf
(
stderr
,
"%s%s%s%s%s%s%s%s%s%s\n\n"
,
rdline
,
gnu_rdline
,
libgd
,
libpng
,
linuxvga
,
nocwdrc
,
x11
,
use_mouse
,
unixplot
,
gnugraph
);
}
if
((
helpfile
=
getenv
(
"GNUHELP"
))
==
NULL
) {
#if
defined(
ATARI
)
||
defined(
MTOS
)
if
((
helpfile
=
user_gnuplotpath
)
==
NULL
) {
helpfile
=
HELPFILE
;
}
#else
helpfile
=
HELPFILE
;
#endif
}
fprintf
(
stderr
,
"\
HELPFILE = \"%s\"\n\
CONTACT = <%s>\n\
HELPMAIL = <%s>\n"
,
helpfile
,
bug_email
,
help_email
);
}
}
/* process 'show autoscale' command */
static
void
show_autoscale
()
{
SHOW_ALL_NL
;
#define
SHOW_AUTOSCALE
(
axis
) \
fprintf(stderr, "\t%s: %s%s%s, ", \
axis_defaults[axis].name, \
(axis_array[axis].set_autoscale) ? "ON" : "OFF", \
(axis_array[axis].set_autoscale == 1) ? " (min)" : "", \
(axis_array[axis].set_autoscale == 2) ? " (max)" : "");
fputs
(
"\tautoscaling is "
,
stderr
);
if
(
parametric
) {
if
(
is_3d_plot
) {
SHOW_AUTOSCALE
(
T_AXIS
);
}
else
{
SHOW_AUTOSCALE
(
U_AXIS
);
SHOW_AUTOSCALE
(
V_AXIS
);
}
}
else
putc
(
'\t'
,
stderr
);
if
(
polar
) {
SHOW_AUTOSCALE
(
R_AXIS
)
}
SHOW_AUTOSCALE
(
FIRST_X_AXIS
);
SHOW_AUTOSCALE
(
FIRST_Y_AXIS
);
SHOW_AUTOSCALE
(
SECOND_X_AXIS
);
SHOW_AUTOSCALE
(
SECOND_Y_AXIS
);
SHOW_AUTOSCALE
(
FIRST_Z_AXIS
);
#undef
SHOW_AUTOSCALE
}
/* process 'show bars' command */
static
void
show_bars
()
{
SHOW_ALL_NL
;
/* I really like this: "terrorbars" ;-) */
if
(
bar_size
>
0.0
)
fprintf
(
stderr
,
"\terrorbars are plotted with bars of size %f\n"
,
bar_size
);
else
fputs
(
"\terrors are plotted without bars\n"
,
stderr
);
}
/* process 'show border' command */
static
void
show_border
()
{
SHOW_ALL_NL
;
fprintf
(
stderr
,
"\tborder is %sdrawn %d\n"
,
draw_border
?
""
:
"not "
,
draw_border
);
/* HBB 980609: added facilities to specify border linestyle */
fprintf
(
stderr
,
"\tBorder drawn with linetype %d, linewidth %.3f\n"
,
border_lp
.
l_type
+
1
,
border_lp
.
l_width
);
}
/* process 'show boxwidth' command */
static
void
show_boxwidth
()
{
SHOW_ALL_NL
;
if
(
boxwidth
<
0.0
)
fputs
(
"\tboxwidth is auto\n"
,
stderr
);
else
fprintf
(
stderr
,
"\tboxwidth is %g\n"
,
boxwidth
);
}
/* process 'show boxwidth' command */
static
void
show_clip
()
{
SHOW_ALL_NL
;
fprintf
(
stderr
,
"\tpoint clip is %s\n"
, (
clip_points
) ?
"ON"
:
"OFF"
);
if
(
clip_lines1
)
fputs
(
"\tdrawing and clipping lines between inrange and outrange points\n"
,
stderr
);
else
fputs
(
"\tnot drawing lines between inrange and outrange points\n"
,
stderr
);
if
(
clip_lines2
)
fputs
(
"\tdrawing and clipping lines between two outrange points\n"
,
stderr
);
else
fputs
(
"\tnot drawing lines between two outrange points\n"
,
stderr
);
}
/* process 'show cntrparam|contour' commands */
static
void
show_contour
()
{
SHOW_ALL_NL
;
fprintf
(
stderr
,
"\tcontour for surfaces are %s"
,
(
draw_contour
) ?
"drawn"
:
"not drawn\n"
);
if
(
draw_contour
) {
fprintf
(
stderr
,
" in %d levels on "
,
contour_levels
);
switch
(
draw_contour
) {
case
CONTOUR_BASE
:
fputs
(
"grid base\n"
,
stderr
);
break
;
case
CONTOUR_SRF
:
fputs
(
"surface\n"
,
stderr
);
break
;
case
CONTOUR_BOTH
:
fputs
(
"grid base and surface\n"
,
stderr
);
break
;
case
CONTOUR_NONE
:
/* should not happen --- be easy: don't complain... */
break
;
}
switch
(
contour_kind
) {
case
CONTOUR_KIND_LINEAR
:
fputs
(
"\t\tas linear segments\n"
,
stderr
);
break
;
case
CONTOUR_KIND_CUBIC_SPL
:
fprintf
(
stderr
,
"\t\tas cubic spline interpolation segments with %d pts\n"
,
contour_pts
);
break
;
case
CONTOUR_KIND_BSPLINE
:
fprintf
(
stderr
,
"\t\tas bspline approximation segments of order %d with %d pts\n"
,
contour_order
,
contour_pts
);
break
;
}
switch
(
contour_levels_kind
) {
case
LEVELS_AUTO
:
fprintf
(
stderr
,
"\t\tapprox. %d automatic levels\n"
,
contour_levels
);
break
;
case
LEVELS_DISCRETE
:
{
int
i
;
fprintf
(
stderr
,
"\t\t%d discrete levels at "
,
contour_levels
);
fprintf
(
stderr
,
"%g"
,
contour_levels_list
[
0
]);
for
(
i
=
1
;
i
<
contour_levels
;
i
++
)
fprintf
(
stderr
,
",%g "
,
contour_levels_list
[
i
]);
putc
(
'\n'
,
stderr
);
break
;
}
case
LEVELS_INCREMENTAL
:
fprintf
(
stderr
,
"\t\t%d incremental levels starting at %g, step %g, end %g\n"
,
contour_levels
,
contour_levels_list
[
0
],
contour_levels_list
[
1
],
contour_levels_list
[
0
]
+
(
contour_levels
-
1
)
*
contour_levels_list
[
1
]);
/* contour-levels counts both ends */
break
;
}
/* fprintf(stderr,"\t\tcontour line types are %s\n", label_contours ? "varied" : "all the same"); */
show_label_contours
();
}
}
/* called by show_contour() */
static
void
show_label_contours
()
{
if
(
label_contours
)
fprintf
(
stderr
,
"\tcontour line types are varied & labeled with format '%s'\n"
,
contour_format
);
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL