Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!linus!decvax!harpo!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.sources Subject: Window library changes (now version 1.05) Message-ID: <1115@umcp-cs.UUCP> Date: Sun, 24-Jul-83 07:40:59 EDT Article-I.D.: umcp-cs.1115 Posted: Sun Jul 24 07:40:59 1983 Date-Received: Sun, 24-Jul-83 16:09:19 EDT Organization: Univ. of Maryland, Computer Science Dept. Lines: 758 Well, here's a new set of fixes and fixed files for the window package. There's also a man 3 page at the end. This set of changes marks version 1.05 of the Maryland Window Library. - Chris : Run this shell script with "sh" not "csh" PATH=:/bin:/usr/bin:/usr/ucb export PATH all=FALSE if [ $1x = -ax ]; then all=TRUE fi cat <<'eof' | tee CHANGE Changes to make to the documentation: The SetReal macro was incorrect. The capital Es should be capital Os, ie w->IXE should read w->IXO. In the alphabetical list of functions (appendix 2), Wretroline was missing the third argument "inwin", and Wsetmargins listed had its arguments listed in the wrong order. The correct order is Wsetmargins(w,inxorg,inyorg,inxext,inyext). Other changes to make: Set the version number in open.c to 1.05 and the release date to 24-Jul-1983. Apply the diff -c listing for display.c. Notes: There is a new, hopefully more coherent, README. There is a man page. eof /bin/chmod 644 CHANGE /bin/echo -n ' '; /bin/ls -ld CHANGE /bin/echo 'Extracting read.c' sed 's/^X//' <<'//go.sysin dd *' >read.c #include "win.h" X/* Copyright (c) 1983 University of Maryland Computer Science Department */ X/* Read back from window at cursor, and advance cursor */ X/* If charonly set returns only char (not mode< w_winbuf + (w -> w_cursor.row + w -> IYO) * w -> OXE + w -> w_cursor.col + w -> IXO; int rv; if (!winonly && (c -> Mode & WBUF)) c = w -> w_bcursor; rv = charonly ? c -> Char : c -> ch_all; w -> w_cursor.col++; w -> w_bcursor++; if (w -> w_cursor.col >= w -> IXE) { w -> w_cursor.col = 0; w -> w_cursor.row++; if (w -> w_cursor.row >= w -> IYE) w -> w_cursor.row = 0; WFixCursor (w); } if ((w -> w_status & WCURSOR) == 0) w -> w_status |= WDUMP; return rv; } //go.sysin dd * made=TRUE if [ $made = TRUE ]; then /bin/chmod 644 read.c /bin/echo -n ' '; /bin/ls -ld read.c fi /bin/echo 'Extracting suspend.c' sed 's/^X//' <<'//go.sysin dd *' >suspend.c #include "win.h" #include X/* Copyright (c) 1983 University of Maryland Computer Science Department */ int (*sigset())(); X/* Suspend window system (called on ^Z) */ X/* NOTE: if SigMagic is not set user must make sure that SIGTSTP does what he wants */ Wsuspend () { int (*oldtstp) (), (*oldint) (); static nest, restart; /* Dont want to recurse */ if (nest) return restart++, 0; nest = 1; top: if (SigMagic) { /* Then save signal definitions */ sigrelse (SIGTSTP); sigrelse (SIGINT); /* Make sure they arent held */ /* NOTE: if sigrelse calls Wsuspend "nest" gets us back */ oldtstp = sigset (SIGTSTP, SIG_IGN); oldint = sigset (SIGINT, SIG_IGN); } restart = 0; Wcleanup (); /* If SigMagic, resets sigs to SIG_DFL */ kill (0, SIGTSTP); /* SCREECHing halt */ if (SigMagic) { sighold (SIGTSTP); sighold (SIGINT); /* Hold these for Winit to do its stuff, */ sigset (SIGTSTP, oldtstp); sigset (SIGINT, oldint);/* putting them back where they were */ } /* (void) */ Winit (1, 1); /* (void) breaks some compilers */ if (SigMagic) { sigrelse (SIGTSTP); sigrelse (SIGINT); if (restart) /* If TSTP signal occurred during Winit */ goto top; /* Note: the oldxxx=sigset() is OK because we have already restored the settings */ Wrefresh (); if (restart) /* If the Wrefresh was suspended */ goto top; } return nest = 0; } //go.sysin dd * made=TRUE if [ $made = TRUE ]; then /bin/chmod 644 suspend.c /bin/echo -n ' '; /bin/ls -ld suspend.c fi /bin/echo 'Extracting win.h' sed 's/^X//' <<'//go.sysin dd *' >win.h X/* Copyright (c) 1983 University of Maryland Computer Science Department */ #define NBPB 8 /* Number of bits per byte */ union chr { struct { char ch; /* NOTE: this is known to be low byte */ char mode; } ch_two; short ch_all; }; X/* ch_all is set to ' ' or (' '|(WBUF<