--- /dev/null
+# 1 "space.c"
+
+
+
+
+
+
+
+static char sccsid[] = "@(#)space.c 5.2 (Berkeley) 4/30/85";
+
+
+
+
+# 1 "./aed.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 1 "/usr/include/stdio.h"
+
+
+
+
+
+
+
+
+
+
+extern struct _iobuf {
+ int _cnt;
+ char *_ptr;
+ char *_base;
+ int _bufsiz;
+ short _flag;
+ char _file;
+} _iob[];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+struct _iobuf *fopen();
+struct _iobuf *fdopen();
+struct _iobuf *freopen();
+struct _iobuf *popen();
+long ftell();
+char *fgets();
+char *gets();
+
+# 14 "./aed.h"
+
+# 1 "/usr/include/sgtty.h"
+
+
+
+
+# 1 "/usr/include/sys/ioctl.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 17 "/usr/include/sys/ioctl.h"
+
+
+# 1 "/usr/include/sys/ttychars.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+struct ttychars {
+ char tc_erase;
+ char tc_kill;
+ char tc_intrc;
+ char tc_quitc;
+ char tc_startc;
+ char tc_stopc;
+ char tc_eofc;
+ char tc_brkc;
+ char tc_suspc;
+ char tc_dsuspc;
+ char tc_rprntc;
+ char tc_flushc;
+ char tc_werasc;
+ char tc_lnextc;
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 19 "/usr/include/sys/ioctl.h"
+
+# 1 "/usr/include/sys/ttydev.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 50 "/usr/include/sys/ttydev.h"
+
+
+# 20 "/usr/include/sys/ioctl.h"
+
+
+struct tchars {
+ char t_intrc;
+ char t_quitc;
+ char t_startc;
+ char t_stopc;
+ char t_eofc;
+ char t_brkc;
+};
+struct ltchars {
+ char t_suspc;
+ char t_dsuspc;
+ char t_rprntc;
+ char t_flushc;
+ char t_werasc;
+ char t_lnextc;
+};
+
+
+
+
+
+
+
+struct sgttyb {
+ char sg_ispeed;
+ char sg_ospeed;
+ char sg_erase;
+ char sg_kill;
+ short sg_flags;
+};
+
+
+
+
+
+
+
+
+
+
+struct winsize {
+ unsigned short ws_row;
+ unsigned short ws_col;
+ unsigned short ws_xpixel;
+ unsigned short ws_ypixel;
+};
+
+
+
+
+struct ttysize {
+ unsigned short ts_lines;
+ unsigned short ts_cols;
+ unsigned short ts_xxx;
+ unsigned short ts_yyy;
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 101 "/usr/include/sys/ioctl.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 5 "/usr/include/sgtty.h"
+
+# 15 "./aed.h"
+
+extern char dbuf[1024];
+extern struct sgttyb sgttyb;
+extern curx, cury;
+extern int xbot, ybot;
+extern int scale;
+
+
+
+
+
+
+
+# 13 "space.c"
+
+
+
+
+
+
+
+
+
+
+
+
+space(x0, y0, x1, y1)
+int x0, y0, x1, y1;
+{
+ int xscale, yscale, xsize, ysize;
+ xscale = (511 <<12)/(x1-x0);
+ yscale = (482 <<12)/(y1-y0);
+ if (xscale > yscale) scale = yscale;
+ else scale = xscale;
+ scale = (scale*9)/10 - 1;
+ if (scale<1) scale = 1;
+ xsize = (2048*511 )/scale + 1;
+ xbot = (x1+x0)/2 - xsize;
+ ysize = (2048*482 )/scale + 1;
+ ybot = (y1+y0)/2 - ysize;
+}