FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot/term/hpgl.trm at master · gnuplot/gnuplot · GitHub
gnuplot
gnuplot
Repository navigation
Code
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot
/
term
/
hpgl.trm
Copy path
More file actions
More file actions
Latest commit
History
History
History
3402 lines (3179 loc) · 99.3 KB
Breadcrumbs
gnuplot
/
term
/
hpgl.trm
Copy path
File metadata and controls
3402 lines (3179 loc) · 99.3 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
/* Hello, Emacs, this is -*-C-*- */
/* GNUPLOT - hpgl.trm */
/*[
* Copyright 1990 - 1993, 1998, 2004, 2018
*
* 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.
]*/
/*
* This file is included by ../term.h.
*
* This terminal driver supports:
* hpgl, hp7550, hp7580b, HP Laserjet III
* hp7550 has been replaced by "hpgl 8 eject"
* hp7580b has been replaced by "hpgl 4"
* pcl5e/c compatible printers
*
* AUTHORS
* Colin Kelley, Thomas Williams, Russell Lang
*
* send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
*
*/
/*
*
* Modified for expanded HPGL/2 and PCL utilites
* Tom Swiler (tom@silica.mse.ufl.edu)
* Modified June 1995 Ian MacPhedran to support newterm format
* Modified October 1995 Ian MacPhedran to simplify HPGL terminals
* Modified January 96 by David Denholm and Emmanuel Bigler for cp850
* and iso international character sets
* Modified February 99 by Jeremy Brenes to give PCL5 terminal optional
* multi-pen support (6 pen default), a default 34" plotting width for
* use with large color plotters such as the HP Designjet 750C,
* various alternative plot sizes, and variable fontsizes;
* Also decreased the HPGL terminal's fixed fontsize to make it more
* reasonable when plots get scaled to 34"
* Modified July 99 by Jeremy Brenes to make extended plot area smaller;
* added solid/dashed lines option, additional font types, mixed fonts
* Modified November 99 by Jeremy Brenes to add a postscript pointtypes
* option, special purpose negative pointtypes, and a pointsize function
* Modified March 18 by Bastian Maerkisch: enhancements to the pcl5 driver:
* option parser more in line with current standards:
* terminal options in arbitrary order; common canvas size and font options
* remove monochrome/solid/dashed option
* change option defaults to 8 pens (PCL5c spec), letter size, and pspoints;
* filled polygons and filled boxes; palette and RGB colors;
* explicit vertical center alignment of text instead of relying on font
* metric guess; rotate text by arbitrary angles; request font "symbol set"
* according to current encoding; bold/italic font support; UTF-8 encoding;
* ignore case/spaces/underscores in font names; more (typical) fonts;
* permit some alternative font alias from non-HP vendors; enhanced text;
* variable line width; optional rounded line ends and joins;
* version 5 dashed lines, including custom dash types; optimized point
* symbols; linewidth/pointsize/fontscale options;
* make use of TBOOLEAN type; separate help texts for hpgl and pcl5;
*
*/
#define
HPGL
#define
PCL
#include
"driver.h"
#ifdef
TERM_REGISTER
register_term
(
hpgl
)
register_term
(
pcl5
)
#endif
/* TERM_REGISTER */
#ifdef
TERM_PROTO
TERM_PUBLIC
void
HPGL_options
(
void
);
TERM_PUBLIC
void
PCL_options
(
void
);
TERM_PUBLIC
void
HPGL_init
(
void
);
/* TERM_PUBLIC void HPGL2_init(void); */
TERM_PUBLIC
void
PCL_init
(
void
);
TERM_PUBLIC
void
HPGL_graphics
(
void
);
TERM_PUBLIC
void
HPGL2_graphics
(
void
);
TERM_PUBLIC
void
PCL_graphics
(
void
);
TERM_PUBLIC
void
HPGL_text
(
void
);
/* TERM_PUBLIC void HPGL2_text(void); */
TERM_PUBLIC
void
PCL_text
(
void
);
TERM_PUBLIC
void
HPGL_linetype
(
int
linetype
);
TERM_PUBLIC
void
HPGL2_linetype
(
int
linetype
);
TERM_PUBLIC
void
HPGL_put_text
(
unsigned
int
x
,
unsigned
int
y
,
const
char
*
str
);
TERM_PUBLIC
void
HPGL2_put_text
(
unsigned
int
x
,
unsigned
int
y
,
const
char
*
str
);
TERM_PUBLIC
void
HPGL_move
(
unsigned
int
x
,
unsigned
int
y
);
TERM_PUBLIC
void
HPGL_vector
(
unsigned
int
x
,
unsigned
int
y
);
TERM_PUBLIC
void
HPGL2_move
(
unsigned
int
x
,
unsigned
int
y
);
TERM_PUBLIC
void
HPGL2_vector
(
unsigned
int
x
,
unsigned
int
y
);
TERM_PUBLIC
void
HPGL2_encode
(
int
d
);
TERM_PUBLIC
int
HPGL_text_angle
(
float
ang
);
TERM_PUBLIC
int
HPGL2_text_angle
(
float
ang
);
TERM_PUBLIC
void
HPGL_reset
(
void
);
/* TERM_PUBLIC void HPGL2_reset(void); */
TERM_PUBLIC
void
PCL_reset
(
void
);
TERM_PUBLIC
int
HPGL2_justify_text
(
enum
JUSTIFY
just
);
TERM_PUBLIC
int
HPGL2_set_font
(
const
char
*
font
);
TERM_PUBLIC
void
HPGL2_point
(
unsigned
int
x
,
unsigned
int
y
,
int
number
);
TERM_PUBLIC
void
HPGL2_neg_point
(
unsigned
int
x
,
unsigned
int
y
,
int
number
);
TERM_PUBLIC
void
HPGL2_pointsize
(
double
size
);
TERM_PUBLIC
void
HPGL2_linewidth
(
double
linewidth
);
TERM_PUBLIC
void
HPGL2_fillbox
(
int
style
,
unsigned
int
x1
,
unsigned
int
y1
,
unsigned
int
width
,
unsigned
int
height
);
TERM_PUBLIC
void
HPGL2_filled_polygon
(
int
points
,
gpiPoint
*
corners
);
TERM_PUBLIC
void
HPGL2_set_color
(
t_colorspec
*
colorspec
);
TERM_PUBLIC
int
HPGL2_make_palette
(
t_sm_palette
*
palette
);
TERM_PUBLIC
void
HPGL2_enh_put_text
(
unsigned
int
x
,
unsigned
int
y
,
const
char
str
[]);
TERM_PUBLIC
void
HPGL2_enh_open
(
char
*
fontname
,
double
fontsize
,
double
base
,
TBOOLEAN
widthflag
,
TBOOLEAN
showflag
,
int
overprint
);
TERM_PUBLIC
void
HPGL2_enh_flush
(
void
);
#define
GOT_HPGL_PROTO
#endif
/* TERM_PROTO */
#ifndef
TERM_PROTO_ONLY
#ifdef
TERM_BODY
#ifndef
M_SQRT2
#define
M_SQRT2
1.41
#endif
/*
* The maximum plot size, in plotter units.
* Note that the actual size of larger plots may be limited by
* available printer memory.
*/
#define
HPGL_PUPI
1016
/* Plotter units per inch */
/* Letter */
#define
HPGL_XMAX_A
10000
#define
HPGL_YMAX_A
7500
/* Legal */
#define
HPGL_XMAX_B
13000
#define
HPGL_YMAX_B
7500
/* Noextended */
#define
HPGL_XMAX_C
45333
#define
HPGL_YMAX_C
34000
/* Extended */
#define
HPGL_XMAX_D
52000
#define
HPGL_YMAX_D
34000
/* A4 */
#define
HPGL_XMAX_E
10000
#define
HPGL_YMAX_E
7900
#define
HPGL_XMAX
HPGL_XMAX_A
#define
HPGL_YMAX
HPGL_YMAX_A
#define
PCL_XMAX
HPGL_XMAX_A
#define
PCL_YMAX
(HPGL_YMAX_A-60)
/*
* Tic sizes
*/
#define
HPGL_VTIC
(HPGL_YMAX/70)
#define
HPGL_HTIC
(HPGL_YMAX/70)
#define
PCL_VTIC
((HPGL_YMAX_C-60)/320)
#define
PCL_HTIC
((HPGL_YMAX_C-60)/320)
/*
* Font size for HPGL
*/
#define
HPGL_VCHAR
(HPGL_YMAX/100*8/10)
/* 0.8% */
#define
HPGL_HCHAR
(HPGL_XMAX/100*3/10)
/* 0.3% */
/*
* Font size for HPGL/2
*/
#define
HPGL2_DEF_POINT
12
/* Height of font */
#define
HPGL2_DEF_PITCH
(3 * 72 / (HPGL2_DEF_POINT * 2))
#define
HPGL2_VCHAR
((int) HPGL_PUPI * HPGL2_DEF_POINT / 72)
#define
HPGL2_HCHAR
(HPGL2_VCHAR * 2 / 3)
/*
* Number of available point types for HPGL/2
*/
#define
HPGL2_NUM_NOPSPOINTS
6;
/* for nopspoints option */
#define
HPGL2_NUM_PSPOINTS
75;
/* for pspoints option */
/*
* Control constants
*/
#define
DOWN
0
/* Pen is down */
#define
UP
1
/* Pen is up */
#define
UNKNOWN
-10
/* Unknown status for lots of things */
/*
* For Polyline Encoded, either use base 64 or base 32.
* Save space with base 64, but get 8-bit characters.
*/
#define
HPGL2_BASE64
1
#if
HPGL2_BASE64
#define
HPGL2_BITS
6
#define
HPGL2_LOW_OFFS
63
#define
HPGL2_HIGH_OFFS
191
#define
HPGL2_MASK
63
#else
#define
HPGL2_BITS
5
#define
HPGL2_LOW_OFFS
63
#define
HPGL2_HIGH_OFFS
95
#define
HPGL2_MASK
31
#endif
/*
* Local Prototypes
*/
static
void
HPGL2_put_text_here
(
const
char
*
str
,
TBOOLEAN
centeralign
);
static
int
HPGL2_set_font_size
(
const
char
*
font
,
double
size
);
static
int
HPGL2_map_encoding
(
void
);
static
void
HPGL2_end_poly
(
void
);
static
void
HPGL2_dot
(
int
x
,
int
y
);
static
void
HPGL2_diamond
(
int
x
,
int
y
,
int
htic
,
int
vtic
);
static
void
HPGL2_filled_diamond
(
int
x
,
int
y
,
int
htic
,
int
vtic
);
static
void
HPGL2_pentagon
(
int
x
,
int
y
,
int
htic
,
int
vtic
);
/*
* Data structures for options
*/
struct
HPGL2_font_str
{
const
char
*
compare
,
*
alt
,
*
name
;
int
symbol_set
,
spacing
;
double
pitch
,
height
;
int
posture
,
stroke_weight
,
italic
,
bold
;
int
typeface
;
};
struct
PCL_mode_str
{
const
char
*
name
,
*
command
;
unsigned
int
xmax
,
ymax
;
};
/*
* The default font goes first.
*/
static
struct
HPGL2_font_str
HPGL2_font_table
[]
=
{
{
"Un$ivers"
,
"Swiss 742$ SWC"
,
"univers"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
4148
},
{
"St$ick"
,
NULL
,
"stick"
,
277
,
0
,
HPGL2_DEF_PITCH
,
0.0
,
0
,
0
,
1
,
3
,
48
},
{
"Al$bertus"
,
"Flare$serif 821"
,
"albertus"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
1
,
0
,
4
,
4362
},
{
"An$tique_Olive"
,
"Inci$sed 901"
,
"antique_olive"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
4168
},
{
"Ar$ial"
,
"Swiss 721"
,
"arial"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
16602
},
{
"Av$ant Garde Gothic"
,
"Geom$etric 711"
,
"avant_garde_gothic"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
2
,
24607
},
{
"Bo$okman"
,
"Bookman SWA"
,
"bookman"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
-3
,
1
,
2
,
24623
},
{
"Zapf Ch$ancery"
,
"Chan$cery 801"
,
"zapf_chancery"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
1
,
0
,
1
,
0
,
45099
},
{
"Cl$arendon Condensed"
,
"Clarendon 701"
,
"clarendon"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
4
,
3
,
4
,
3
,
4140
},
{
"Cor$onet"
,
"Ribbon$ 131"
,
"coronet"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
1
,
0
,
1
,
0
,
4116
},
{
"Cou$rier"
,
"FixedPitch 810"
,
"courier"
,
277
,
0
,
HPGL2_DEF_PITCH
,
0.0
,
0
,
0
,
1
,
3
,
4099
},
{
"CourierPS"
,
"Courier SWA"
,
"courier"
,
277
,
0
,
HPGL2_DEF_PITCH
,
0.0
,
0
,
0
,
1
,
3
,
24579
},
{
"CG Ti$mes"
,
"Dutch 801$ SWA"
,
"cg_times"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
4101
},
{
"Ga$ramond Antiqua"
,
"Aldine 430"
,
"garamond_antigua"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
4197
},
{
"Helv$etica"
,
"Swiss$ SWA"
,
"helvetica"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
24580
},
{
"Helvetica N$arrow"
,
"SwissNarrow$ SWA"
,
"helvetica_narrow"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
4
,
0
,
5
,
3
,
24580
},
{
"Le$tter Gothic"
,
"FixedPitch 850"
,
"letter_gothic"
,
277
,
0
,
HPGL2_DEF_PITCH
,
0.0
,
0
,
0
,
1
,
3
,
4102
},
{
"Ma$rigold"
,
"Calli$graphic 401"
,
"marigold"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
0
,
0
,
4297
},
{
"New Cen$tury Schlbk"
,
"Cent$urySchbk"
,
"new_century_schlbk"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
24703
},
{
"CG O$mega"
,
"Zapf Humanist$ 601"
,
"cg_omega"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
4113
},
{
"Pa$latino"
,
"Zapf Callig$raphic 801"
,
"palatino"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
24591
},
{
"Ti$mes_New_Roman"
,
"Dutch 801$ SWM"
,
"times_new_roman"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
16901
},
{
"Times Ro$man"
,
"Dutch SWA"
,
"times_roman"
,
277
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
1
,
3
,
25093
},
{
"Zapf Di$ngbats"
,
"Ding$ Dings"
,
"zapf_dingbats"
,
460
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
0
,
0
,
45101
},
{
"Symbol$ Set"
,
NULL
,
"symbol"
,
621
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
0
,
0
,
4142
},
{
"Symbol PS"
,
"Symbol Set SWA"
,
"symbol_ps"
,
621
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
0
,
0
,
45358
},
{
"Tr$uetype_Symbols"
,
NULL
,
"truetype_symbols"
,
621
,
1
,
0.0
,
HPGL2_DEF_POINT
,
0
,
0
,
0
,
0
,
16686
},
{
"Wi$ngdings"
,
"More WingBats$ SWC"
,
"wingdings"
,
18540
,
1
,
0.0
,
HPGL2_DEF_POINT
,
1
,
0
,
1
,
0
,
31402
}
};
#define
HPGL2_FONTS
(sizeof(HPGL2_font_table) / sizeof (struct HPGL2_font_str))
static
struct
HPGL2_font_str
*
HPGL2_font
=
&
HPGL2_font_table
[
0
];
/*
* The default mode goes first. Landscape style plots are probably the
* most compatible with other HPGL devices.
*/
static
struct
PCL_mode_str
PCL_mode_table
[]
=
{
{
"landscape"
,
"\033&l1O"
},
{
"portrait"
,
"\033&l0O"
}
};
#define
PCL_MODES
(sizeof(PCL_mode_table) / sizeof (struct PCL_mode_str))
static
struct
PCL_mode_str
PCL_mode
=
{
NULL
,
NULL
,
PCL_XMAX
,
PCL_YMAX
};
/* encoding vector for cp850 , characters 128 (0200) -> 255 (0377) */
static
char
hpgl_cp_850
[
128
][
4
]
=
{
/* 0200 */
"\0164\017"
,
/* 0201 */
"\016O\017"
,
/* 0202 */
"\016E\017"
,
/* 0203 */
"\016@\017"
,
/* 0204 */
"\016L\017"
,
/* 0205 */
"\016H\017"
,
/* 0206 */
"\016T\017"
,
/* 0207 */
"\0165\017"
,
/* 0210 */
"\016A\017"
,
/* 0211 */
"\016M\017"
,
/* 0212 */
"\016I\017"
,
/* 0213 */
"\016]\017"
,
/* 0214 */
"\016Q\017"
,
/* 0215 */
"\016Y\017"
,
/* 0216 */
"\016X\017"
,
/* 0217 */
"\016P\017"
,
/* 0220 */
"\016\134\017"
,
/* 0221 */
"\016W\017"
,
/* 0222 */
"\016S\017"
,
/* 0223 */
"\016B\017"
,
/* 0224 */
"\016N\017"
,
/* 0225 */
"\016J\017"
,
/* 0226 */
"\016C\017"
,
/* 0227 */
"\016K\017"
,
/* 0230 */
"\016o\017"
,
/* 0231 */
"\016Z\017"
,
/* 0232 */
"\016[\017"
,
/* 0233 */
"\016V\017"
,
/* 0234 */
"\016;\017"
,
/* 0235 */
"\016R\017"
,
/* 0236 */
""
,
/* 0237 */
"\016>\017"
,
/* 0240 */
"\016D\017"
,
/* 0241 */
"\016U\017"
,
/* 0242 */
"\016F\017"
,
/* 0243 */
"\016G\017"
,
/* 0244 */
"\0167\017"
,
/* 0245 */
"\0166\017"
,
/* 0246 */
"\016y\017"
,
/* 0247 */
"\016z\017"
,
/* 0250 */
"\0169\017"
,
/* 0251 */
""
,
/* 0252 */
""
,
/* 0253 */
"\016x\017"
,
/* 0254 */
"\016w\017"
,
/* 0255 */
"\0168\017"
,
/* 0256 */
"\016{\017"
,
/* 0257 */
"\016}\017"
,
/* 0260 */
""
,
/* 0261 */
""
,
/* 0262 */
""
,
/* 0263 */
""
,
/* 0264 */
""
,
/* 0265 */
"\016`\017"
,
/* 0266 */
"\016\042\017"
,
/* 0267 */
"\016!\017"
,
/* 0270 */
""
,
/* 0271 */
""
,
/* 0272 */
""
,
/* 0273 */
""
,
/* 0274 */
""
,
/* 0275 */
"\016?\017"
,
/* 0276 */
"\016<\017"
,
/* 0277 */
""
,
/* 0300 */
""
,
/* 0301 */
""
,
/* 0302 */
""
,
/* 0303 */
""
,
/* 0304 */
""
,
/* 0305 */
""
,
/* 0306 */
"\016b\017"
,
/* 0307 */
"\016a\017"
,
/* 0310 */
""
,
/* 0311 */
""
,
/* 0312 */
""
,
/* 0313 */
""
,
/* 0314 */
""
,
/* 0315 */
""
,
/* 0316 */
""
,
/* 0317 */
"\016:\017"
,
/* 0320 */
"\016d\017"
,
/* 0321 */
"\016c\017"
,
/* 0322 */
"\016$\017"
,
/* 0323 */
"\016%\017"
,
/* 0324 */
"\016#\017"
,
/* 0325 */
""
,
/* 0326 */
"\016e\017"
,
/* 0327 */
"\016&\017"
,
/* 0330 */
"\016'\017"
,
/* 0331 */
""
,
/* 0332 */
""
,
/* 0333 */
""
,
/* 0334 */
""
,
/* 0335 */
""
,
/* 0336 */
"\016f\017"
,
/* 0337 */
""
,
/* 0340 */
"\016g\017"
,
/* 0341 */
"\016^\017"
,
/* 0342 */
"\016_\017"
,
/* 0343 */
"\016h\017"
,
/* 0344 */
"\016j\017"
,
/* 0345 */
"\016i\017"
,
/* 0346 */
""
,
/* 0347 */
"\016q\017"
,
/* 0350 */
"\016p\017"
,
/* 0351 */
"\016m\017"
,
/* 0352 */
"\016.\017"
,
/* 0353 */
"\016-\017"
,
/* 0354 */
""
,
/* 0355 */
""
,
/* 0356 */
"\0160\017"
,
/* 0357 */
"\016(\017"
,
/* 0360 */
"\016v\017"
,
/* 0361 */
"\016~\017"
,
/* 0362 */
""
,
/* 0363 */
""
,
/* 0364 */
""
,
/* 0365 */
"\016=\017"
,
/* 0366 */
""
,
/* 0367 */
""
,
/* 0370 */
"\016z\017"
,
/* 0371 */
"\016+\017"
,
/* 0372 */
""
,
/* 0373 */
""
,
/* 0374 */
""
,
/* 0375 */
""
,
/* 0376 */
""
,
/* 0377 */
""
};
/* encoding vector for iso-8859-1 , characters 128 (0200) -> 255 (0377) */
static
char
hpgl_iso_8859_1
[
128
][
4
]
=
{
/* 0200 */
""
,
/* 0201 */
""
,
/* 0202 */
""
,
/* 0203 */
""
,
/* 0204 */
""
,
/* 0205 */
""
,
/* 0206 */
""
,
/* 0207 */
""
,
/* 0210 */
""
,
/* 0211 */
""
,
/* 0212 */
""
,
/* 0213 */
""
,
/* 0214 */
""
,
/* 0215 */
""
,
/* 0216 */
""
,
/* 0217 */
""
,
/* 0220 */
""
,
/* 0221 */
"\016\017"
,
/* 0222 */
"\016\017"
,
/* 0223 */
""
,
/* 0224 */
""
,
/* 0225 */
""
,
/* 0226 */
""
,
/* 0227 */
""
,
/* 0230 */
""
,
/* 0231 */
""
,
/* 0232 */
""
,
/* 0233 */
""
,
/* 0234 */
""
,
/* 0235 */
""
,
/* 0236 */
""
,
/* 0237 */
""
,
/* 0240 */
""
,
/* 0241 */
"\0168\017"
,
/* 0242 */
"\0165\017"
,
/* 0243 */
"\016;\017"
,
/* 0244 */
"\016:\017"
,
/* 0245 */
"\016<\017"
,
/* 0246 */
"\017|\017"
,
/* 0247 */
"\016=\017"
,
/* 0250 */
"\016+\017"
,
/* 0251 */
""
,
/* 0252 */
"\016y\017"
,
/* 0253 */
"\016{\017"
,
/* 0254 */
""
,
/* 0255 */
""
,
/* 0256 */
""
,
/* 0257 */
"\0160\017"
,
/* 0260 */
"\016z\017"
,
/* 0261 */
"\016~\017"
,
/* 0262 */
""
,
/* 0263 */
""
,
/* 0264 */
""
,
/* 0265 */
""
,
/* 0266 */
""
,
/* 0267 */
""
,
/* 0270 */
""
,
/* 0271 */
""
,
/* 0272 */
"\016z\017"
,
/* 0273 */
"\016}\017"
,
/* 0274 */
"\016w\017"
,
/* 0275 */
"\016x\017"
,
/* 0276 */
""
,
/* 0277 */
"\0169\017"
,
/* 0300 */
"\016!\017"
,
/* 0301 */
"\016`\017"
,
/* 0302 */
"\016\042\017"
,
/* 0303 */
"\016a\017"
,
/* 0304 */
"\016X\017"
,
/* 0305 */
"\016P\017"
,
/* 0306 */
"\016S\017"
,
/* 0307 */
"\0164\017"
,
/* 0310 */
"\016#\017"
,
/* 0311 */
"\016\134\017"
,
/* 0312 */
"\016$\017"
,
/* 0313 */
"\016%\017"
,
/* 0314 */
"\016f\017"
,
/* 0315 */
"\016e\017"
,
/* 0316 */
"\016\046\017"
,
/* 0317 */
"\016'\017"
,
/* 0320 */
"\016c\017"
,
/* 0321 */
"\0166\017"
,
/* 0322 */
"\016h\017"
,
/* 0323 */
"\016g\017"
,
/* 0324 */
"\016_\017"
,
/* 0325 */
"\016i\017"
,
/* 0326 */
"\016Z\017"
,
/* 0327 */
""
,
/* 0330 */
"\016R\017"
,
/* 0331 */
"\016-\017"
,
/* 0332 */
"\016m\017"
,
/* 0333 */
"\016.\017"
,
/* 0334 */
"\016[\017"
,
/* 0335 */
""
,
/* 0336 */
"\016p\017"
,
/* 0337 */
"\016^\017"
,
/* 0340 */
"\016H\017"
,
/* 0341 */
"\016D\017"
,
/* 0342 */
"\016@\017"
,
/* 0343 */
"\016b\017"
,
/* 0344 */
"\016L\017"
,
/* 0345 */
"\016T\017"
,
/* 0346 */
"\016W\017"
,
/* 0347 */
"\0165\017"
,
/* 0350 */
"\016I\017"
,
/* 0351 */
"\016E\017"
,
/* 0352 */
"\016A\017"
,
/* 0353 */
"\016M\017"
,
/* 0354 */
"\016Y\017"
,
/* 0355 */
"\016U\017"
,
/* 0356 */
"\016Q\017"
,
/* 0357 */
"\016]\017"
,
/* 0360 */
"\016d\017"
,
/* 0361 */
"\0167\017"
,
/* 0362 */
"\016J\017"
,
/* 0363 */
"\016F\017"
,
/* 0364 */
"\016B\017"
,
/* 0365 */
"\016j\017"
,
/* 0366 */
"\016N\017"
,
/* 0367 */
""
,
/* 0370 */
"\016V\017"
,
/* 0371 */
"\016K\017"
,
/* 0372 */
"\016G\017"
,
/* 0373 */
"\016C\017"
,
/* 0374 */
"\016O\017"
,
/* 0375 */
""
,
/* 0376 */
"\016q\017"
,
/* 0377 */
"\016o\017"
};
/*
* Static variables to keep track of where we are, etc.
*/
static
int
HPGL_ang
=
0
;
static
int
HPGL_x
=
UNKNOWN
;
static
int
HPGL_y
=
UNKNOWN
;
static
int
HPGL_penstate
=
UNKNOWN
;
static
int
HPGL_pentype
;
static
double
HPGL_fontscale
=
1.0
;
/* pen */
static
int
HPGL2_pentype
=
LT_UNDEFINED
;
static
int
HPGL2_pen
=
1
;
/* (poly-) lines */
static
double
HPGL2_lw
=
0
;
static
TBOOLEAN
HPGL2_in_pe
=
FALSE;
static
TBOOLEAN
HPGL2_lost
;
/* point symbols */
static
double
HPGL2_psize
=
1.0
;
/* Default point size */
/* font/text */
static
int
HPGL2_font_num_current
=
0
;
/* current font */
static
double
HPGL2_point_size_current
=
0
;
/* current pointsize */
static
double
HPGL2_is_italic
=
FALSE;
static
double
HPGL2_is_bold
=
FALSE;
static
enum
JUSTIFY
HPGL2_justification
=
LEFT
;
/* enhanced text */
static
double
HPGL2_base
;
/* distance above initial baseline */
static
double
HPGL2_base_save
;
/* saved baseline for overprint=3/4 */
static
TBOOLEAN
HPGL2_sizeonly
;
/* first pass for right/center aligned text */
static
TBOOLEAN
HPGL2_opened_string
;
static
TBOOLEAN
HPGL2_show
;
static
int
HPGL2_overprint
;
static
TBOOLEAN
HPGL2_widthflag
;
static
float
HPGL2_enh_fontscale
=
1
;
/*
* The subroutines, grouped by function for different versions.
*/
static
int
HPGL_numpen
;
static
int
HPGL_eject
;
TERM_PUBLIC
void
HPGL_options
()
{
HPGL_numpen
=
6
;
/* default to six pens */
HPGL_eject
=
0
;
/* default to no eject */
HPGL_fontscale
=
1.0
;
while
(!
END_OF_COMMAND
) {
if
(
almost_equals
(
c_token
,
"eje$ct"
))
HPGL_eject
=
1
;
else
if
(
almost_equals
(
c_token
,
"fonts$cale"
)) {
c_token
++
;
HPGL_fontscale
=
real_expression
();
if
(
HPGL_fontscale
<=
0
)
HPGL_fontscale
=
1.0
;
}
else
if
(
isanumber
(
c_token
)) {
HPGL_numpen
=
(
int
)
real
(
&
token
[
c_token
].
l_val
);
if
(
HPGL_numpen
<=
0
) {
HPGL_numpen
=
6
;
int_error
(
c_token
,
"Number of pens must be positive"
);
}
}
else
int_error
(
c_token
,
"expecting \"eject\" or number of pens"
);
c_token
++
;
}
sprintf
(
term_options
,
"%d pens %s"
,
HPGL_numpen
,
HPGL_eject
?
"eject"
:
"noeject"
);
if
(
HPGL_fontscale
!=
1.0
)
sprintf
(
&
term_options
[
strlen
(
term_options
)],
" fontscale %.2f"
,
HPGL_fontscale
);
}
static
int
PCL_landscape
=
TRUE;
static
int
HPGL2_numpen
=
8
;
/* default to 8 pen color */
static
TBOOLEAN
HPGL2_pspointset
=
TRUE;
/* default to PS point types */
static
int
HPGL2_font_num
=
0
;
/* font from options */
static
double
HPGL2_point_size
=
HPGL2_DEF_POINT
;
/* pointsize from options */
static
char
*
PCL_dim
=
"letter"
;
/* default plotting dimensions */
static
char
PCL_dim_buf
[
256
];
static
float
HPGL2_fontscale
=
1.
;
static
float
HPGL2_pointscale
=
1.
;
static
float
HPGL2_linewidth_scale
=
1.
;
static
TBOOLEAN
HPGL2_rounded
=
FALSE;
enum
PCL_id
{
HPGL2_COLOR
,
HPGL2_FONT
,
HPGL2_SIZE
,
HPGL2_ENHANCED
,
HPGL2_NOENHANCED
,
HPGL2_NOPSPOINTS
,
HPGL2_PSPOINTS
,
HPGL2_ROUNDED
,
HPGL2_NOROUNDED
,
HPGL2_LINEWIDTH
,
HPGL2_POINTSIZE
,
HPGL2_FONTSCALE
,
PCL_PORTRAIT
,
PCL_LANDSCAPE
,
PCL_EXTENDED
,
PCL_NOEXTENDED
,
PCL_LEGAL
,
PCL_LETTER
,
PCL_A4
,
PCL_INVALID
};
static
struct
gen_table
PCL_opts
[]
=
{
{
"col$ors"
,
HPGL2_COLOR
},
{
"col$ours"
,
HPGL2_COLOR
},
{
"font"
,
HPGL2_FONT
},
{
"n$opspoints"
,
HPGL2_NOPSPOINTS
},
{
"psp$oints"
,
HPGL2_PSPOINTS
},
{
"butt"
,
HPGL2_NOROUNDED
},
{
"rou$nded"
,
HPGL2_ROUNDED
},
{
"lw"
,
HPGL2_LINEWIDTH
},
{
"linew$idth"
,
HPGL2_LINEWIDTH
},
{
"ps"
,
HPGL2_POINTSIZE
},
{
"points$ize"
,
HPGL2_POINTSIZE
},
{
"fs"
,
HPGL2_FONTSCALE
},
{
"fonts$cale"
,
HPGL2_FONTSCALE
},
{
"po$rtrait"
,
PCL_PORTRAIT
},
{
"la$ndscape"
,
PCL_LANDSCAPE
},
{
"size"
,
HPGL2_SIZE
},
{
"enh$anced"
,
HPGL2_ENHANCED
},
{
"noenh$anced"
,
HPGL2_NOENHANCED
},
{
NULL
,
PCL_INVALID
}
};
static
struct
gen_table
PCL_size_opts
[]
=
{
{
"ext$ended"
,
PCL_EXTENDED
},
{
"noext$ended"
,
PCL_NOEXTENDED
},
{
"leg$al"
,
PCL_LEGAL
},
{
"let$ter"
,
PCL_LETTER
},
{
"a4"
,
PCL_A4
},
{
NULL
,
PCL_INVALID
}
};
static
TBOOLEAN
almost_equal_string
(
const
char
*
test
,
const
char
*
str
)
{
int
i
,
j
;
int
after
=
0
;
int
start
=
0
;
int
length
=
strlen
(
test
);
if
(
test
==
NULL
||
str
==
NULL
)
return
FALSE;
for
(
i
=
0
,
j
=
0
;
i
<
length
+
after
;
i
++
,
j
++
) {
/* ignore spaces and underscores */
while
(
str
[
i
]
==
' '
||
str
[
i
]
==
'_'
||
str
[
i
]
==
'-'
)
i
++
;
while
(
test
[
start
+
j
]
==
' '
||
test
[
start
+
j
]
==
'_'
||
test
[
start
+
j
]
==
'-'
)
j
++
;
if
(
toupper
(
str
[
i
])
!=
toupper
(
test
[
start
+
j
])) {
if
(
str
[
i
]
!=
'$'
) {
return
FALSE;
}
else
{
after
=
1
;
start
--
;
/* back up token ptr */
}
}
}
/* i now beyond end of test string */
return
(
after
||
str
[
i
]
==
'$'
||
str
[
i
]
==
NUL
);
}
TERM_PUBLIC
void
PCL_options
()
{
int
i
;
if
(
PCL_mode
.
name
==
NULL
)
PCL_mode
.
name
=
PCL_mode_table
[
0
].
name
;
while
(!
END_OF_COMMAND
) {
switch
(
lookup_table
(
PCL_opts
,
c_token
)) {
case
HPGL2_COLOR
:
c_token
++
;
HPGL2_numpen
=
END_OF_COMMAND
?
8
:
int_expression
();
if
(
HPGL2_numpen
<
2
) {
HPGL2_numpen
=
8
;
int_error
(
c_token
,
"Number of pens must be larger than two."
);
}
break
;
case
HPGL2_FONT
: {
char
*
s
;
c_token
++
;
if
(
isstringvalue
(
c_token
)
&&
(
s
=
try_to_get_string
())) {
double
fontsize
;
char
*
comma
=
strrchr
(
s
,
','
);
if
((
comma
!=
NULL
)
&&
(
sscanf
(
comma
+
1
,
"%lf"
,
&
fontsize
)
==
1
)) {
HPGL2_point_size
=
fontsize
;
*
comma
=
'\0'
;
}
else
{
HPGL2_point_size
=
HPGL2_DEF_POINT
;
}
HPGL2_point_size_current
=
HPGL2_point_size
;
if
(
*
s
!=
NUL
) {
for
(
i
=
0
;
i
<
HPGL2_FONTS
&&
!
almost_equal_string
(
s
,
HPGL2_font_table
[
i
].
compare
)
&&
!
almost_equal_string
(
s
,
HPGL2_font_table
[
i
].
alt
);
i
++
);
if
(
i
<
HPGL2_FONTS
) {
HPGL2_font
=
&
HPGL2_font_table
[
i
];
HPGL2_font_num_current
=
HPGL2_font_num
=
i
;
}
else
{
int_error
(
c_token
,
"expecting font: stick, cg_times, univers, zapf_dingbats, antique_olive,\n\tarial, courier, garamond_antigua, letter_gothic, cg_omega, albertus,\ntimes_new_roman, clarendon, coronet, marigold, truetype_symbols, or wingdings"
);
}
}
if
(
HPGL2_font
->
spacing
)
HPGL2_font
->
height
=
HPGL2_point_size
;
else
HPGL2_font
->
pitch
=
72
*
3
/ (
HPGL2_point_size
*
2
);
}
else
{
int_error
(
c_token
,
"expecting font string"
);
}
break
;
}
case
HPGL2_NOPSPOINTS
:
c_token
++
;
HPGL2_pspointset
=
FALSE;
break
;
case
HPGL2_PSPOINTS
:
c_token
++
;
HPGL2_pspointset
=
TRUE;
break
;
case
HPGL2_ROUNDED
:
c_token
++
;
HPGL2_rounded
=
TRUE;
break
;
case
HPGL2_NOROUNDED
:
c_token
++
;
HPGL2_rounded
=
FALSE;
break
;
case
HPGL2_LINEWIDTH
:
c_token
++
;
HPGL2_linewidth_scale
=
real_expression
();
if
(
HPGL2_linewidth_scale
<=
0
)
HPGL2_linewidth_scale
=
1.
;
break
;
break
;
case
HPGL2_POINTSIZE
:
c_token
++
;
HPGL2_pointscale
=
real_expression
();
if
(
HPGL2_pointscale
<=
0
)
HPGL2_pointscale
=
1.
;
break
;
case
HPGL2_FONTSCALE
:
c_token
++
;
HPGL2_fontscale
=
real_expression
();
if
(
HPGL2_fontscale
<=
0
)
HPGL2_fontscale
=
1.
;
break
;
case
HPGL2_ENHANCED
:
c_token
++
;
term
->
flags
|=
TERM_ENHANCED_TEXT
;
term
->
put_text
=
HPGL2_enh_put_text
;
break
;
case
HPGL2_NOENHANCED
:
c_token
++
;
term
->
flags
&= ~
TERM_ENHANCED_TEXT
;
term
->
put_text
=
HPGL2_put_text
;
break
;
case
PCL_LANDSCAPE
:
c_token
++
;
PCL_landscape
=
TRUE;
PCL_mode
.
name
=
PCL_mode_table
[
0
].
name
;
break
;
case
PCL_PORTRAIT
:
c_token
++
;
PCL_landscape
=
FALSE;
PCL_mode
.
name
=
PCL_mode_table
[
1
].
name
;
break
;
case
HPGL2_SIZE
:
c_token
++
;
if
(
END_OF_COMMAND
) {
int_error
(
c_token
,
"size argument expected"
);
}
else
switch
(
lookup_table
(
PCL_size_opts
,
c_token
)) {
case
PCL_EXTENDED
:
PCL_mode
.
xmax
=
(
HPGL_XMAX_D
);
PCL_mode
.
ymax
=
(
HPGL_YMAX_D
-
60
);
PCL_dim
=
"extended"
;
c_token
++
;
break
;
case
PCL_NOEXTENDED
:
PCL_mode
.
xmax
=
(
HPGL_XMAX_C
);
PCL_mode
.
ymax
=
(
HPGL_YMAX_C
-
60
);
PCL_dim
=
"noextended"
;
c_token
++
;
break
;
case
PCL_LEGAL
:
PCL_mode
.
xmax
=
(
HPGL_XMAX_B
);
PCL_mode
.
ymax
=
(
HPGL_YMAX_B
-
60
);
PCL_dim
=
"legal"
;
c_token
++
;
break
;
case
PCL_LETTER
:
PCL_mode
.
xmax
=
(
HPGL_XMAX_A
);
PCL_mode
.
ymax
=
(
HPGL_YMAX_A
-
60
);
PCL_dim
=
"letter"
;
c_token
++
;
break
;
case
PCL_A4
:
PCL_mode
.
xmax
=
(
HPGL_XMAX_E
);
PCL_mode
.
ymax
=
(
HPGL_YMAX_E
-
60
);
PCL_dim
=
"a4"
;
c_token
++
;
break
;
default
: {
/* no known abbreviation */
float
xmax
,
ymax
;
size_units
explicit_units
;
char
*
unit
=
"in"
;
float
scale
=
1
;
explicit_units
=
parse_term_size
(
&
xmax
,
&
ymax
,
INCHES
);
PCL_mode
.
xmax
=
xmax
/
gp_resolution
*
HPGL_PUPI
;
PCL_mode
.
ymax
=
ymax
/
gp_resolution
*
HPGL_PUPI
;
if
(
xmax
<=
0
)
PCL_mode
.
xmax
=
PCL_XMAX
;
if
(
ymax
<=
0
)
PCL_mode
.
ymax
=
PCL_YMAX
;
switch
(
explicit_units
) {
case
CM
:
scale
=
2.54f
;
unit
=
"cm"
;
break
;
/*
case MM:
scale = 25.4f;
unit = "mm";
break;
*/
case
INCHES
:
default
:
break
;
}
sprintf
(
PCL_dim_buf
,
"%.2f%s, %.2f%s"
,
PCL_mode
.
xmax
/
HPGL_PUPI
/
scale
,
unit
,
PCL_mode
.
ymax
/
HPGL_PUPI
/
scale
,
unit
);
PCL_dim
=
PCL_dim_buf
;
}
}
break
;
default
:
int_error
(
c_token
,
"unrecognized terminal option"
);
break
;
}
}
sprintf
(
term_options
,
"%senhanced %s size %s "
"%s %d "
"font \"%s, %.1f\" "
"%s %s "
"linewidth %.1f pointsize %.1f fontscale %.1f"
,
(
term
->
flags
&
TERM_ENHANCED_TEXT
) ?
""
:
"no"
,
PCL_mode
.
name
,
PCL_dim
,
"color"
,
HPGL2_numpen
,
HPGL2_font
->
name
,
HPGL2_point_size
,
HPGL2_pspointset
?
"pspoints"
:
"nopspoints"
,
HPGL2_rounded
?
"rounded"
:
"butt"
,
HPGL2_linewidth_scale
,
HPGL2_pointscale
,
HPGL2_fontscale
);
}
TERM_PUBLIC
void
HPGL_init
()
{
}
/* void HPGL2_init ()
{
} */
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL