date and time created 86/08/29 15:06:21 by sklower
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Sat, 30 Aug 1986 06:06:21 +0000 (22:06 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Sat, 30 Aug 1986 06:06:21 +0000 (22:06 -0800)
SCCS-vsn: lib/libplot/grn/erase.c 6.1
SCCS-vsn: lib/libplot/grn/grnplot.h 6.1

usr/src/lib/libplot/grn/erase.c [new file with mode: 0644]
usr/src/lib/libplot/grn/grnplot.h [new file with mode: 0644]

diff --git a/usr/src/lib/libplot/grn/erase.c b/usr/src/lib/libplot/grn/erase.c
new file mode 100644 (file)
index 0000000..c555758
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 1980, 1986 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)erase.c    6.1 (Berkeley) %G%";
+#endif not lint
+
+
+#include "grnplot.h"
+
+/*---------------------------------------------------------
+ *     This routine erases the screen.
+ *
+ *     Results:        None.
+ *     Side Effects:   A new grn file is begun
+ *     but: it is concatentated to the old one.
+ *---------------------------------------------------------
+ */
+erase()
+{
+       if (ingrnfile)
+       {
+               closepl();
+               fputs("multiple grn files in output must be separated by hand!\n",stderr);
+       }
+    printf("sungremlinfile\n0.00 0.00\n");
+    ingrnfile = 1;
+    invector = 0;
+    scale = 1;
+    curx = cury = xbot = ybot = 0;
+}
diff --git a/usr/src/lib/libplot/grn/grnplot.h b/usr/src/lib/libplot/grn/grnplot.h
new file mode 100644 (file)
index 0000000..7728661
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1980, 1986 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)grnplot.h   6.1 (Berkeley) %G%
+ *     modified to grnplot by Brad Rubenstein 8/29/86
+ */
+
+/*
+ * Given a plot file, produces a grn file
+ */
+
+#include <stdio.h>
+
+extern curx, cury;             /* Current screen position */
+extern int xbot, ybot;         /* Coordinates of screen lower-left corner */
+extern double scale;           /* The number of pixels per 2**12 units
+                                * of world coordinates.
+                                */
+extern int linestyle;
+extern int invector, ingrnfile;
+
+#define FONTSIZE 1
+#define FONTSTYLE 1
+#define DEFAULTLINE 5
+#define POINTSTRING "."
+
+/* The following variables describe the screen. */
+
+#define GRXMAX 512     /* Maximum x-coordinate of screen */
+#define GRYMAX 512     /* Maximum y-coordinate of screen */