date and time created 85/09/21 15:05:57 by sam
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Sun, 22 Sep 1985 06:05:57 +0000 (22:05 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Sun, 22 Sep 1985 06:05:57 +0000 (22:05 -0800)
SCCS-vsn: lib/libplot/imagen/scale.c 5.1

usr/src/lib/libplot/imagen/scale.c [new file with mode: 0644]

diff --git a/usr/src/lib/libplot/imagen/scale.c b/usr/src/lib/libplot/imagen/scale.c
new file mode 100644 (file)
index 0000000..dac60f3
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1985 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[] = "@(#)scale.c    5.1 (Berkeley) %G%";
+#endif not lint
+
+extern float scalex;
+extern float scaley;
+extern int scaleflag;
+scale(i,x,y)
+char i;
+float x,y;
+{
+       switch(i) {
+       default:
+               return;
+       case 'c':
+               x *= 2.54;
+               y *= 2.54;
+       case 'i':
+               x /= 200;
+               y /= 200;
+       case 'u':
+               scalex = 1/x;
+               scaley = 1/y;
+       }
+       scaleflag = 1;
+}