diff -C 2 -N --recursive gnuplot/command.c gnuplot.neu/command.c *** gnuplot/command.c Thu Sep 16 06:59:44 1993 --- gnuplot.neu/command.c Sat Feb 05 21:21:34 1994 *************** *** 122,126 **** --- 122,131 ---- #ifdef AMIGA_SC_6_1 #include + #include + #include + #include "term/amigawin.h" void sleep(); + extern void UpdateVars(void); + extern struct MsgPort *RexxPort; #endif /* AMIGA_SC_6_1 */ *************** *** 479,482 **** --- 484,490 ---- if( strcmp(term_tbl[term].name, "pm" )!=0 || stime >=0 ) #endif + #ifdef AMIGA_SC_6_1 + if( strcmp(term_tbl[term].name, "amigawindow" ) != 0 || stime >=0 ) + #endif (void) fprintf(stderr, "%s", buf); text = 1; *************** *** 502,506 **** } #else ! (void) fgets(buf, MAX_LINE_LEN, stdin); /* Hold until CR hit. */ #endif /*OS2*/ --- 510,522 ---- } #else ! #ifdef AMIGA_SC_6_1 ! if (strcmp(term_tbl[term].name, "amigawindow") == 0 && stime < 0) ! { ! SendMsg(PAUSE, buf); ! } ! else ! fgets(buf, MAX_LINE_LEN, stdin); ! #else ! (void) fgets(buf, MAX_LINE_LEN, stdin); /* Hold until CR hit. */ #endif /*OS2*/ *************** *** 934,937 **** --- 950,957 ---- udv->udv_undef = FALSE; } + #if defined(AMIGA_SC_6_1) + if (interactive && (strcmp(term_tbl[term].name, "amigawindow") == 0)) + UpdateVars(); + #endif } *************** *** 4145,4148 **** --- 4165,4173 ---- char *prompt; { + #ifdef AMIGA_SC_6_1 + char *s; + BOOL io; + struct RexxMsg *Msg; + #endif int start = 0; TBOOLEAN more = FALSE; *************** *** 4161,4164 **** --- 4186,4212 ---- : fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin)) == (char *) NULL) { + #else + #ifdef AMIGA_SC_6_1 + io = FALSE; + while (!io) + { + if (WaitForChar(Input(), 100000L)) + { + s = fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin); + io = TRUE; + } + else if (Msg = (struct RexxMsg *)GetMsg(RexxPort)) + { + if (IsRexxMsg(Msg)) + { + strcpy(input_line, Msg->rm_Args[0]); + fprintf(stderr, "%s\n", input_line); + s = ""; + io = TRUE; + } + ReplyMsg(Msg); + } + } + if (s == (char *)NULL) { #else if (fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin) diff -C 2 -N --recursive gnuplot/linkopt.amg gnuplot.neu/linkopt.amg *** gnuplot/linkopt.amg Wed May 12 04:21:50 1993 --- gnuplot.neu/linkopt.amg Sun Jan 30 21:47:40 1994 *************** *** 4,7 **** setshow.o specfun.o standard.o term.o util.o version.o TO gnuplot ! LIB LIB:scmieee.lib LIB:scnb.lib STRIPDEBUG --- 4,7 ---- setshow.o specfun.o standard.o term.o util.o version.o TO gnuplot ! LIB LIB:scmieee.lib LIB:scnb.lib LIB:debug.lib LIB:amiga.lib STRIPDEBUG diff -C 2 -N --recursive gnuplot/makefile.amg gnuplot.neu/Makefile.amg *** gnuplot/makefile.amg Thu Sep 16 06:59:48 1993 --- gnuplot.neu/Makefile.amg Sun Jan 30 21:47:39 1994 *************** *** 13,16 **** --- 13,17 ---- OFLAGS = OPT OPTGO OPTPEEP NOOPTINL NOOPTINLOCAL + #OFLAGS = DEBUG=SF CODE=FAR DEFS = DEF=AMIGA_SC_6_1 DEF=MEMCPY COPTS = DATA=FAR MATH=IEEE IGN=84+85+88+94+100+154+161+217+304 *************** *** 30,34 **** CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \ term/bigfig.trm term/cgi.trm term/corel.trm \ ! term/djsvga.trm term/dumb.trm \ term/dxf.trm term/dxy.trm \ term/debug.trm term/eepic.trm term/epson.trm term/excl.trm \ --- 31,35 ---- CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \ term/bigfig.trm term/cgi.trm term/corel.trm \ ! term/djsvga.trm term/dumb.trm term/amigawin.trm term/amigawin.h\ term/dxf.trm term/dxy.trm \ term/debug.trm term/eepic.trm term/epson.trm term/excl.trm \ diff -C 2 -N --recursive gnuplot/plot.c gnuplot.neu/plot.c *** gnuplot/plot.c Thu Sep 16 06:59:50 1993 --- gnuplot.neu/plot.c Tue Nov 16 00:17:36 1993 *************** *** 72,75 **** --- 72,80 ---- #ifdef AMIGA_SC_6_1 #include + #include + #include + + struct Library *RexxSysBase; + struct MsgPort *RexxPort; #endif *************** *** 267,270 **** --- 272,278 ---- char **argv; { + char cwd[MAX_ID_LEN]; + + getcwd(cwd, MAX_ID_LEN); #ifdef XPG3_LOCALE (void) setlocale(LC_CTYPE, ""); *************** *** 304,307 **** --- 312,318 ---- if (IsInteractive(Input()) == DOSTRUE) interactive = TRUE; else interactive = FALSE; + RexxPort = NULL; + if (RexxSysBase = OpenLibrary("rexxsyslib.library", 36)) + RexxPort = CreatePort("REXXPLOT", 0); #else #if defined(__MSC__) && defined(_Windows) *************** *** 379,382 **** --- 390,400 ---- vms_reset(); #endif + #ifdef AMIGA_SC_6_1 + if (RexxPort) DeletePort(RexxPort); + if (RexxSysBase) CloseLibrary(RexxSysBase); + #endif + + chdir(cwd); + return(IO_SUCCESS); } diff -C 2 -N --recursive gnuplot/setshow.c gnuplot.neu/setshow.c *** gnuplot/setshow.c Thu Sep 16 06:59:52 1993 --- gnuplot.neu/setshow.c Mon Jan 31 08:09:17 1994 *************** *** 200,203 **** --- 200,208 ---- #endif #endif + #if defined(AMIGA_SC_6_1) + #include + #include "term/amigawin.h" + struct SetVar SetVars; + #endif #if defined(unix) || defined(PIPES) *************** *** 213,216 **** --- 218,222 ---- extern char replot_line[]; extern struct udvt_entry *first_udv; + extern struct udft_entry *first_udf; extern TBOOLEAN is_3d_plot; *************** *** 252,255 **** --- 258,326 ---- static TBOOLEAN show_one(), show_two(); + #if defined(AMIGA_SC_6_1) + void UpdateVars(void) + { + SetVars.xmin = xmin; + SetVars.xmax = xmax; + SetVars.ymin = ymin; + SetVars.ymax = ymax; + SetVars.zmin = zmin; + SetVars.zmax = zmax; + SetVars.rmin = rmin; + SetVars.rmax = rmax; + SetVars.tmin = tmin; + SetVars.tmax = tmax; + SetVars.umin = umin; + SetVars.umax = umax; + SetVars.vmin = vmin; + SetVars.vmax = vmax; + SetVars.autox = autoscale_x; + SetVars.autoy = autoscale_y; + SetVars.autoz = autoscale_z; + SetVars.autor = autoscale_r; + SetVars.autot = autoscale_t; + SetVars.autou = autoscale_u; + SetVars.autov = autoscale_v; + SetVars.contour = draw_contour; + SetVars.hidden3d = hidden3d; + SetVars.surface = draw_surface; + SetVars.mapping = mapping3d; + SetVars.rotx = surface_rot_x; + SetVars.rotz = surface_rot_z; + SetVars.scale = surface_scale; + SetVars.zscale = surface_zscale; + SetVars.logx = is_log_x; + SetVars.logy = is_log_y; + SetVars.logz = is_log_z; + SetVars.basex = base_log_x; + SetVars.basey = base_log_y; + SetVars.basez = base_log_z; + SetVars.datastyle = data_style; + SetVars.functionstyle = func_style; + SetVars.title = title; + SetVars.title_xoff = title_xoffset; + SetVars.title_yoff = title_yoffset; + SetVars.xlabel = xlabel; + SetVars.xlabel_xoff = xlabel_xoffset; + SetVars.xlabel_yoff = xlabel_yoffset; + SetVars.ylabel = ylabel; + SetVars.ylabel_xoff = ylabel_xoffset; + SetVars.ylabel_yoff = ylabel_yoffset; + SetVars.zlabel = zlabel; + SetVars.zlabel_xoff = zlabel_xoffset; + SetVars.zlabel_yoff = zlabel_yoffset; + SetVars.replot = replot_line; + SetVars.parametric = parametric; + SetVars.polar = polar; + SetVars.grid = grid; + SetVars.border = draw_border; + SetVars.xzeroaxis = xzeroaxis; + SetVars.yzeroaxis = yzeroaxis; + SetVars.user_variables = first_udv; + SetVars.user_functions = first_udf; + + SendMsg(SETVAR, &SetVars); + } + /******** The 'set' command ********/ void *************** *** 273,276 **** --- 344,351 ---- if (!set_one() && !set_two() && !set_three()) int_error(setmess, c_token); + #if defined(AMIGA_SC_6_1) + else if (interactive && (strcmp(term_tbl[term].name, "amigawindow") == 0)) + UpdateVars(); + #endif } diff -C 2 -N --recursive gnuplot/term/amiga.trm gnuplot.neu/term/amiga.trm *** gnuplot/term/amiga.trm Thu Sep 16 07:00:02 1993 --- gnuplot.neu/term/amiga.trm Sun Oct 24 23:30:34 1993 *************** *** 55,61 **** --- 55,64 ---- #else /* You will have to use the Kickstart 2.0 header files for this to compile */ + #include + #include #include #include #include + #include #include #include *************** *** 102,106 **** static WORD AMIGA_cwd,AMIGA_cht,AMIGA_bsl,AMIGA_vadj; static struct TagItem AMIGA_ScrTagList[] = { ! {SA_Overscan,OSCAN_TEXT},{TAG_DONE,0} }; --- 105,111 ---- static WORD AMIGA_cwd,AMIGA_cht,AMIGA_bsl,AMIGA_vadj; static struct TagItem AMIGA_ScrTagList[] = { ! {SA_Overscan,OSCAN_TEXT}, ! {SA_LikeWorkbench, TRUE}, ! {TAG_DONE,0} }; diff -C 2 -N --recursive gnuplot/term/amigawin.h gnuplot.neu/term/amigawin.h *** gnuplot/term/amigawin.h Thu Jan 01 01:00:00 1970 --- gnuplot.neu/term/amigawin.h Sun Jan 30 23:46:06 1994 *************** *** 0 **** --- 1,59 ---- + #define GNUPORT "GnuPlot.Port" + #define GNUREPLY "GnuPlot.Reply" + + #define RESOLUTION 1024 + + enum GnuPlotCom + { + RESET, SET_GRAPHICS, SET_TEXT, PAUSE, SETVAR + }; + + struct GnuPlotCommand + { + enum GnuPlotCom gpc_com; + void *gpc_arg; + int gpc_ncommands; + struct PlotCommand *gpc_commands; + }; + + enum PlotCom + { + LINETYP, MOVE, VECTOR, PUT_TEXT, JUSTIFY, TEXT_ANGLE + }; + + struct PlotCommand + { + enum PlotCom pc_com; + int pc_arg1, pc_arg2; + char *pc_argstr; + }; + + struct PlotMessage + { + struct Message PlotMsg; + struct GnuPlotCommand PlotCom; + }; + + struct SetVar + { + double xmin, xmax, ymin, ymax, zmin, zmax, rmin, rmax, tmin, tmax, umin, umax, vmin, vmax; + BOOL autox, autoy, autoz, autor, autot, autou, autov; + double basex, basey, basez; + BOOL logx, logy, logz; + BOOL hidden3d, surface; + double rotx, rotz, scale, zscale; + int contour; + int functionstyle, datastyle; + char *title, *xlabel, *ylabel, *zlabel; + int title_xoff, title_yoff, xlabel_xoff, xlabel_yoff, ylabel_xoff, ylabel_yoff, + zlabel_xoff, zlabel_yoff; + char *replot; + BOOL parametric, polar, grid, border, xzeroaxis, yzeroaxis; + int mapping; + struct udvt_entry *user_variables; + struct udft_entry *user_functions; + }; + + + extern void SendMsg(enum GnuPlotCom, char *); + extern void UpdateVars(void); diff -C 2 -N --recursive gnuplot/term/amigawin.trm gnuplot.neu/term/amigawin.trm *** gnuplot/term/amigawin.trm Thu Jan 01 01:00:00 1970 --- gnuplot.neu/term/amigawin.trm Sun Jan 16 09:38:16 1994 *************** *** 0 **** --- 1,200 ---- + /* + * $Id: debug.trm%v 3.38.2.70 1993/02/08 02:17:40 woo Exp woo $ + * + */ + + /* GNUPLOT - debug.trm */ + /* + * Copyright (C) 1990 + * + * 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 modified code. Modifications are to be distributed + * as patches to released version. + * + * This software is provided "as is" without express or implied warranty. + * + * This file is included by ../term.c. + * + * This terminal driver supports: + * DEBUG + * + * AUTHORS + * luecken@udel.edu + * + * send your comments or suggestions to (luecken@udel.edu). + * + */ + + #include "amigawin.h" + + #define AMIWIN_XMAX RESOLUTION + #define AMIWIN_YMAX RESOLUTION + + #define AMIWIN_XLAST (AMIWIN_XMAX - 1) + #define AMIWIN_YLAST (AMIWIN_XMAX - 1) + + /* Assume a character size of 1, or a 7 x 10 grid. */ + #define AMIWIN_VCHAR (AMIWIN_YMAX/25) + #define AMIWIN_HCHAR (AMIWIN_XMAX/80) + #define AMIWIN_VTIC (AMIWIN_YMAX/80) + #define AMIWIN_HTIC (AMIWIN_XMAX/80) + + static struct MsgPort *GnuPort = NULL; + static struct MsgPort *GnuReply = NULL; + static struct PlotMessage *PlotMsg = NULL; + static struct PlotCommand *commands = NULL; + static int ncommands = 0; + static int ncalloc = 0; + static BOOL OutOfMemory = FALSE; + + + void SendMsg(enum GnuPlotCom com, char *str) + { + if (PlotMsg && GnuReply) + { + PlotMsg->PlotMsg.mn_Node.ln_Type = NT_MESSAGE; + PlotMsg->PlotMsg.mn_Length = sizeof(struct PlotMessage); + PlotMsg->PlotMsg.mn_ReplyPort = GnuReply; + PlotMsg->PlotCom.gpc_com = com; + PlotMsg->PlotCom.gpc_arg = str; + PlotMsg->PlotCom.gpc_ncommands = ncommands; + PlotMsg->PlotCom.gpc_commands = commands; + if (GnuPort) + { + PutMsg(GnuPort, PlotMsg); + WaitPort(GnuReply); + GetMsg(GnuReply); + } + } + } + + AMIWIN_init() + { + GnuReply = CreatePort(GNUREPLY, 0); + if ((GnuPort = FindPort(GNUPORT)) == NULL) + { + char FileName[108], s[108]; + + NameFromLock(GetProgramDir(), s, 108); + AddPart(s, "WinPlot", 108); + sprintf(FileName, "\"%s\"", s); + SystemTags(FileName, + SYS_Asynch, TRUE, + SYS_Input, NULL, + SYS_Output, NULL, + TAG_END); + while ((GnuPort = FindPort(GNUPORT)) == NULL) + Delay(10); + } + PlotMsg = AllocMem(sizeof(struct PlotMessage), MEMF_PUBLIC|MEMF_CLEAR); + } + + AMIWIN_text() + { + SendMsg(SET_TEXT, NULL); + } + + AMIWIN_graphics() + { + int i; + + if (commands) + { + for(i=0; i= ncalloc) + { + ncalloc += 100; + if (commands) + { + struct PlotCommand *newcommands = NULL; + + newcommands = realloc(commands, ncalloc * sizeof(struct PlotCommand)); + if (newcommands) + commands = newcommands; + else + { + ncalloc -= 100; + OutOfMemory = TRUE; + fprintf(stderr, "Warning: out of memory in SetPlotCommand() !!\n"); + + return; + } + } + else + commands = malloc(ncalloc * sizeof(struct PlotCommand)); + } + commands[ncommands].pc_com = com; + commands[ncommands].pc_arg1 = arg1; + commands[ncommands].pc_arg2 = arg2; + if (str) + { + commands[ncommands].pc_argstr = malloc(strlen(str)+1); + strcpy(commands[ncommands].pc_argstr, str); + } + else commands[ncommands].pc_argstr = NULL; + + ncommands++; + } + } + + AMIWIN_linetype(int linetype) + { + SetPlotCommand(LINETYP, linetype, 0, NULL); + } + + AMIWIN_move(int x, int y) + { + SetPlotCommand(MOVE, x, y, NULL); + } + + AMIWIN_vector(int x, int y) + { + SetPlotCommand(VECTOR, x, y, NULL); + } + + AMIWIN_put_text(int x, int y, char *str) + { + SetPlotCommand(PUT_TEXT, x, y, str); + } + + AMIWIN_reset() + { + SendMsg(RESET, NULL); + if (GnuReply) DeletePort(GnuReply); + GnuReply = NULL; + if (PlotMsg) FreeMem(PlotMsg, sizeof(struct PlotMessage)); + PlotMsg = NULL; + } + + AMIWIN_text_angle(int ang) + { + SetPlotCommand(TEXT_ANGLE, ang, 0, NULL); + return TRUE; + } + + AMIWIN_justify_text(int mode) + { + SetPlotCommand(JUSTIFY, mode, 0, NULL); + return TRUE; + } diff -C 2 -N --recursive gnuplot/term.c gnuplot.neu/term.c *** gnuplot/term.c Thu Sep 16 06:59:54 1993 --- gnuplot.neu/term.c Wed Oct 20 08:05:43 1993 *************** *** 606,609 **** --- 606,612 ---- #endif /* AMIGASCREEN */ + #ifdef AMIGAWINDOW + #include "term/amigawin.trm" + #endif /* AMIGAWINDOW */ /* Dummy functions for unavailable features */ *************** *** 668,672 **** #ifdef AMIGASCREEN ! ,{"amiga", "Amiga Custom Screen", AMIGA_XMAX, AMIGA_YMAX, AMIGA_VCHAR, AMIGA_HCHAR, AMIGA_VTIC, AMIGA_HTIC, options_null, AMIGA_init, AMIGA_reset, --- 671,675 ---- #ifdef AMIGASCREEN ! ,{"amigascreen", "Amiga Custom Screen", AMIGA_XMAX, AMIGA_YMAX, AMIGA_VCHAR, AMIGA_HCHAR, AMIGA_VTIC, AMIGA_HTIC, options_null, AMIGA_init, AMIGA_reset, *************** *** 676,679 **** --- 679,691 ---- #endif + #ifdef AMIGAWINDOW + ,{"amigawindow", "Amiga Window", + AMIWIN_XMAX, AMIWIN_YMAX, AMIWIN_VCHAR, AMIWIN_HCHAR, + AMIWIN_VTIC, AMIWIN_HTIC, options_null, AMIWIN_init, AMIWIN_reset, + AMIWIN_text, null_scale, AMIWIN_graphics, AMIWIN_move, AMIWIN_vector, + AMIWIN_linetype, AMIWIN_put_text, AMIWIN_text_angle, + AMIWIN_justify_text, do_point, do_arrow} + #endif + #ifdef ATARI ,{"atari", "Atari ST/TT", *************** *** 1701,1706 **** #endif /* x11 */ ! #ifdef AMIGASCREEN ! term_name = "amiga"; #endif --- 1713,1721 ---- #endif /* x11 */ ! #ifdef AMIGASCREEN ! term_name = "amigascreen"; ! #endif ! #ifdef AMIGAWINDOW ! term_name = "amigawindow"; #endif diff -C 2 -N --recursive gnuplot/term.h gnuplot.neu/term.h *** gnuplot/term.h Thu Sep 16 06:59:54 1993 --- gnuplot.neu/term.h Wed Oct 20 08:05:41 1993 *************** *** 62,65 **** --- 62,69 ---- */ + #if defined(AMIGA_SC_6_1) && defined(_DEBUG) + #define DEBUG + #endif + /* These terminals are not relevant for MSDOS, OS2, MS-Windows, ATARI or Amiga */ #if !defined(MSDOS) && !defined(OS2) && !defined(_Windows) && !defined(ATARI) && !defined(AMIGA_SC_6_1) && !defined(AMIGA_AC_5) *************** *** 139,142 **** --- 143,147 ---- #if defined(AMIGA_SC_6_1) || defined(AMIGA_AC_5) #define AMIGASCREEN /* Amiga custom screen */ + #define AMIGAWINDOW /* Amiga MUI version */ #undef AIFM #undef DXF