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

VMS build support updated for HP C V7.1-015 + OpenVMS Alpha V8.3 · gnuplot/gnuplot@8655ef9 · GitHub

Repository navigation

Commit 8655ef9

Browse files
authored andcommitted
VMS build support updated for HP C V7.1-015 + OpenVMS Alpha V8.3
1 parent afe486f commit 8655ef9

10 files changed

Lines changed: 65 additions & 25 deletions

File tree

‎ChangeLog‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2013-12-22 Erik Olofsen <olofsen@users.sf.net>
2+
3+
* configure.vms src/command.c src/hidden3d.c src/stdfn.c src/stdfn.h
4+
src/syscfg.h src/term.c src/term.h term/tek.trm:
5+
6+
Update VMS build support. Tested using HP C V7.1-015 OpenVMS Alpha V8.3
7+
on an AlphaServer DS10.
8+
19
2013-12-21 Ethan A Merritt <merritt@u.washington.edu>
210

311
* configure.in: automake 1.14 wants an option subdir-objects

‎configure.vms‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ $HAVEMAKETOOL:
149149
$ !
150150
$ ! Check if the system has DECWindows.
151151
$ !
152-
$ DECW = F$TRNLNM("DECW$INCLUDE") .NES. ""
152+
$ ! DECW = F$TRNLNM("DECW$INCLUDE") .NES. ""
153+
$ DECW = 0
153154
$ !
154155
$ ! Get the architecture.
155156
$ !
@@ -237,6 +238,7 @@ $ X_DISPLAY_MISSING = 0
237238
$ time_t = 0
238239
$ HAVE_ATEXIT = DECC
239240
$ HAVE_BCOPY = DECC
241+
$ HAVE__BOOL = DECC
240242
$ HAVE_BZERO = DECC
241243
$ HAVE_DOPRNT = 0
242244
$ HAVE_ERF = DPML
@@ -266,6 +268,7 @@ $ HAVE_STRERROR = DECC
266268
$ HAVE_STRICMP = 0
267269
$ HAVE_STRNCASECMP = __CRTL_VER .GE. 70000000
268270
$ HAVE_STRNICMP = 0
271+
$ HAVE_STRNLEN = DECC
269272
$ HAVE_STRRCHR = DECC
270273
$ HAVE_STRSTR = DECC
271274
$ HAVE_SYSINFO = 0
@@ -295,6 +298,7 @@ $ HAVE_SYS_TYPES_H = DECC
295298
$ HAVE_SYS_UTSNAME_H = __CRTL_VER .GE. 70000000
296299
$ HAVE_TERMIOS_H = 0
297300
$ HAVE_TIME_H = DECC
301+
$ HAVE_TIME_T_IN_TIME_H = DECC
298302
$ HAVE_UNISTD_H = DECC
299303
$ HAVE_VALUES_H = 0
300304
$ HAVE_LIBM = DECC
@@ -374,7 +378,8 @@ $ OTHERTERM = "[-.term]impcodes.h [-.term]object.h gplt_x11.c"
374378
$ !
375379
$ ! Define CFLAGS.
376380
$ !
377-
$ CFLAGS = "/DEFINE=(NO_GIH,HAVE_CONFIG_H,''RTL')/INCLUDE=[-]"
381+
$ CFLAGS = "/FLOAT=IEEE/IEEE_MODE=UNDERFLOW_TO_ZERO/DEFINE=(HAVE_CONFIG_H,''RTL')/INCLUDE=[-]"
382+
$ ! CFLAGS = "/DEFINE=(HAVE_CONFIG_H,''RTL')/INCLUDE=[-]"
378383
$ IF (DECC) THEN CFLAGS = CFLAGS + "/PREFIX=ALL"
379384
$ !
380385
$ ! Write the make file.
@@ -434,7 +439,7 @@ $ IF (RTL .EQS. "VAXCRTL") THEN -
434439
WRITE MAKE "CRTL_SHARE = ,SYS$DISK:[]VAXC.OPT/OPT"
435440
$ IF (RTL .NES. "VAXCRTL") THEN WRITE MAKE "CRTL_SHARE ="
436441
$ WRITE MAKE "CFLAGS = ", CFLAGS
437-
$ WRITE MAKE "TERMFLAGS = /INCLUDE=([-],[-.TERM])"
442+
$ WRITE MAKE "TERMFLAGS = /INCLUDE=([-],[-.TERM],[-.TERM.POSTSCRIPT],[-.SRC])"
438443
$ WRITE MAKE ""
439444
$ WRITE MAKE "OBJS = \"
440445
$ N = 0
@@ -480,7 +485,7 @@ gnuplot.$(X) : $(OBJS)
480485

481486
gnuplot_x11.$(X) : gplt_x11.$(O) stdfn.$(O)
482487
link /executable=gnuplot_x11.$(X) \
483-
gplt_x11.$(O),stdfn.$(O),x11.opt/option$(EXTRALIB)$(CRTL_SHARE)
488+
gplt_x11.$(O),stdfn.$(O),version.$(O),x11.opt/option$(EXTRALIB)$(CRTL_SHARE)
484489

485490
gplt_x11.$(O) : gplt_x11.c
486491
$(CC) $(CFLAGS) $(X11FLAGS) $<
@@ -565,7 +570,7 @@ $ IF (RTL .EQS. "VAXCRTL") THEN -
565570
WRITE MAKE "$ CRTL_SHARE = "",SYS$DISK:[]VAXC.OPT/OPT"""
566571
$ IF (RTL .NES. "VAXCRTL") THEN WRITE MAKE "$ CRTL_SHARE = """""
567572
$ WRITE MAKE "$ CFLAGS = ""''CFLAGS'"""
568-
$ WRITE MAKE "$ TERMFLAGS = ""/INCLUDE=([-],[-.TERM])"""
573+
$ WRITE MAKE "$ TERMFLAGS = ""/INCLUDE=([-],[-.TERM],[-.TERM.POSTSCRIPT],[-.SRC])"""
569574
$ IF (VAXC .AND. DECW) THEN WRITE MAKE "$ define/nolog x11 decw$include"
570575
$ IF (VAXC .AND. DECW) THEN WRITE MAKE "$ define/nolog sys sys$library"
571576
$ WRITE MAKE "$ set verify"
@@ -602,8 +607,9 @@ $ WRITE MAKE "$ run [-.src]bf_test.exe"
602607
$ WRITE MAKE "$ cd [-.src]"
603608
$ IF (DECW) THEN WRITE MAKE "$ cc 'CFLAGS' gplt_x11.c"
604609
$ IF (DECW) THEN WRITE MAKE "$ cc 'CFLAGS' stdfn.c"
610+
$ IF (DECW) THEN WRITE MAKE "$ cc 'CFLAGS' version.c"
605611
$ IF (DECW) THEN WRITE MAKE "$ link /executable=gnuplot_x11.exe -"
606-
$ IF (DECW) THEN WRITE MAKE " gplt_x11.obj,stdfn.obj -"
612+
$ IF (DECW) THEN WRITE MAKE " gplt_x11.obj,stdfn.obj,version.obj -"
607613
$ IF (DECW) THEN WRITE MAKE " 'EXTRALIB' 'CTRL_SHARE',x11.opt/option"
608614
$ COPY SYS$INPUT: MAKE
609615
$ DECK

‎src/command.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef lint
2-
static char *RCSid() { return RCSid("$Id: command.c,v 1.271 2013/12/15 01:46:10 sfeam Exp $"); }
2+
static char *RCSid() { return RCSid("$Id: command.c,v 1.272 2013/12/17 00:49:52 sfeam Exp $"); }
33
#endif
44

55
/* GNUPLOT - command.c */
@@ -2498,13 +2498,15 @@ help_command()
24982498
}
24992499
}
25002500
#else /* !_Windows */
2501+
#ifndef VMS
25012502
void
25022503
help_command()
25032504
{
25042505
while (!(END_OF_COMMAND))
25052506
c_token++;
25062507
fputs("This gnuplot was not built with inline help\n", stderr);
25072508
}
2509+
#endif /* VMS */
25082510
#endif /* _Windows */
25092511
#endif /* NO_GIH */
25102512

‎src/hidden3d.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef lint
2-
static char *RCSid() { return RCSid("$Id: hidden3d.c,v 1.95 2013/09/25 22:21:27 sfeam Exp $"); }
2+
static char *RCSid() { return RCSid("$Id: hidden3d.c,v 1.96 2013/09/26 22:45:33 sfeam Exp $"); }
33
#endif
44

55
/* GNUPLOT - hidden3d.c */
@@ -722,7 +722,7 @@ intersect_line_plane(p_vertex v1, p_vertex v2, t_plane p)
722722
return 0;
723723
else {
724724
double denominator = p[0]*(v1->x - v2->x) + p[1]*(v1->y - v2->y) + p[2]*(v1->z - v2->z);
725-
return numerator/denominator;
725+
return (denominator==0 ? (numerator>0?VERYLARGE:-VERYLARGE) : numerator/denominator);
726726
}
727727
}
728728

@@ -737,7 +737,7 @@ intersect_line_line(p_vertex v1, p_vertex v2, p_vertex w1, p_vertex w2)
737737
return 0;
738738
else {
739739
double denominator = (w2->y - w1->y)*(v2->x - v1->x) - (w2->x - w1->x)*(v2->y - v1->y);
740-
return numerator/denominator;
740+
return (denominator==0 ? (numerator>0?VERYLARGE:-VERYLARGE) : numerator/denominator);
741741
}
742742
}
743743

‎src/stdfn.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef lint
2-
static char *RCSid() { return RCSid("$Id: stdfn.c,v 1.26 2013/05/22 19:19:38 sfeam Exp $"); }
2+
static char *RCSid() { return RCSid("$Id: stdfn.c,v 1.27 2013/10/25 04:45:22 sfeam Exp $"); }
33
#endif
44

55
/* GNUPLOT - stdfn.c */
@@ -412,7 +412,7 @@ static void debug_exit_handler(void)
412412
{
413413
if (exit_handlers) {
414414
fprintf(stderr, "Gnuplot not exited using gp_exit(). Exit handlers may"
415-
"not work correctly!\n");
415+
" not work correctly!\n");
416416
gp_exit_cleanup();
417417
}
418418
}

‎src/stdfn.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: stdfn.h,v 1.42 2013/09/26 21:24:21 sfeam Exp $
2+
* $Id: stdfn.h,v 1.43 2013/10/25 04:45:22 sfeam Exp $
33
*/
44

55
/* GNUPLOT - stdfn.h */
@@ -542,6 +542,7 @@ void rewinddir __PROTO((DIR *));
542542
* may or may not end with a "directory separation" character.
543543
* Path must not be NULL, but can be empty
544544
*/
545+
#ifndef VMS
545546
#define PATH_CONCAT(path,file) \
546547
{ char *p = path; \
547548
p += strlen(path); \
@@ -551,6 +552,9 @@ void rewinddir __PROTO((DIR *));
551552
} \
552553
strcat (path, file); \
553554
}
555+
#else
556+
#define PATH_CONCAT(path,file) strcat(path,file)
557+
#endif
554558

555559
#ifndef inrange
556560
# define inrange(z,min,max) \

‎src/syscfg.h‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: syscfg.h,v 1.50 2013/06/27 20:03:41 sfeam Exp $
2+
* $Id: syscfg.h,v 1.51 2013/10/25 03:17:34 sfeam Exp $
33
*/
44

55
/* GNUPLOT - syscfg.h */
@@ -83,7 +83,7 @@
8383
# ifndef VMS
8484
# define VMS
8585
# endif
86-
# define HOME "sys$login:"
86+
# define HOME "sys$login"
8787
# define PLOTRC "gnuplot.ini"
8888
# ifdef NO_GIH
8989
/* for show version long */
@@ -162,7 +162,11 @@
162162
#endif
163163

164164
#ifndef HELPFILE
165+
#ifndef VMS
165166
# define HELPFILE "docs/gnuplot.gih"
167+
#else
168+
# define HELPFILE "sys$login:gnuplot.gih"
169+
#endif
166170
#endif
167171

168172
#ifndef HOME

‎src/term.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef lint
2-
static char *RCSid() { return RCSid("$Id: term.c,v 1.268 2013/10/23 19:28:37 sfeam Exp $"); }
2+
static char *RCSid() { return RCSid("$Id: term.c,v 1.269 2013/10/25 03:10:28 sfeam Exp $"); }
33
#endif
44

55
/* GNUPLOT - term.c */
@@ -2243,8 +2243,10 @@ vms_init()
22432243
/* Save terminal characteristics in old_char_buf and
22442244
initialise cur_char_buf to current settings. */
22452245
int i;
2246+
#ifdef X11
22462247
if (getenv("DECW$DISPLAY"))
22472248
return ("x11");
2249+
#endif
22482250
atexit(vms_reset);
22492251
sys$assign(&sysoutput_desc, &chan, 0, 0);
22502252
sys$qiow(0, chan, IO$_SENSEMODE, 0, 0, 0, old_char_buf, 12, 0, 0, 0, 0);

‎src/term.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: term.h,v 1.61 2013/09/20 20:39:20 sfeam Exp $
2+
* $Id: term.h,v 1.62 2013/10/25 03:10:28 sfeam Exp $
33
*/
44

55
/* GNUPLOT - term.h */
@@ -203,7 +203,9 @@
203203
/* # include "gpic.trm" */
204204

205205
/* REGIS graphics language */
206-
/* # include "regis.trm" */
206+
#ifdef VMS
207+
# include "regis.trm"
208+
#endif
207209

208210
/* Tektronix 4106, 4107, 4109 and 420x terminals */
209211
# include "t410x.trm"

‎term/tek.trm‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Hello, Emacs, this is -*-C-*-
2-
* $Id: tek.trm,v 1.21 2013/12/12 20:49:44 sfeam Exp $
2+
* $Id: tek.trm,v 1.22 2013/12/12 21:00:00 sfeam Exp $
33
*
44
*/
55

@@ -652,7 +652,7 @@ SIXEL_init()
652652
ypixels *= ysize;
653653
}
654654

655-
b_makebitmap(xpixels, ypixels, SIXEL_NCOL);
655+
b_makebitmap(xpixels, ypixels, 5);
656656

657657
if (SIXEL_mode != 0)
658658
b_setlinetype(0); /* solid lines */
@@ -671,7 +671,7 @@ SIXEL_reset()
671671
TERM_PUBLIC void
672672
SIXEL_text()
673673
{
674-
int i, j, k, l, ic, n, pr;
674+
int i, j, k, l, ic, n, pr, no;
675675
char c, pc;
676676

677677
/* initialization to Sixel mode and pixel aspect ratio,
@@ -688,6 +688,7 @@ SIXEL_text()
688688

689689
for (j=b_ysize-6; j>=0; j-=6) {
690690
for (k=1; k<=SIXEL_NCOL; k++) {
691+
no = 0; /* for finite line records (VMS) */
691692
pr = 0;
692693
pc = '\0';
693694
n = 0;
@@ -705,18 +706,26 @@ SIXEL_text()
705706
if (n>0 && pr==0) {
706707
pr++;
707708
if (n<b_xsize-1 || pc!='?' || k==1) { /* do not output empty lines */
708-
fprintf(gpoutfile,"#%d",k-1);
709+
no += fprintf(gpoutfile,"#%d",k-1);
709710
pr++;
710711
}
711712
}
712713
if (pr==2) {
713714
if (i==b_xsize-1 && c==pc) n++;
714715
if (n>3) {
715-
fprintf(gpoutfile,"!%d%c",n,pc);
716+
no += fprintf(gpoutfile,"!%d%c",n,pc);
716717
} else {
717718
for (l=1; l<=n; l++) fputc(pc,gpoutfile);
719+
no += n;
720+
}
721+
if (i==b_xsize-1 && c!=pc) {
722+
fputc(c,gpoutfile);
723+
no++;
724+
}
725+
if (no>70 && i<b_xsize-1) {
726+
fprintf(gpoutfile,"\n");
727+
no = 0;
718728
}
719-
if (i==b_xsize-1 && c!=pc) fputc(c,gpoutfile);
720729
}
721730
n = 1;
722731
}
@@ -732,8 +741,11 @@ SIXEL_text()
732741

733742
/* get out of Sixel mode */
734743

744+
#ifndef VMS
735745
fputs("\033\\\n",gpoutfile);
736-
746+
#else
747+
fputs("\033\\\n\n",gpoutfile);
748+
#endif
737749
(void) fflush(gpoutfile); /* finish the graphics */
738750
}
739751

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL