From - Wed Aug 7 08:35:16 1996 Received: from pelleas.netcom.net.uk (pelleas.netcom.net.uk [194.42.224.145]) by horten.vingmed.no (8.6.9/8.6.9) with ESMTP id RAA26440 for ; Tue, 6 Aug 1996 17:19:11 +0200 Received: (from majordom@localhost) by pelleas.netcom.net.uk (8.7.4/8.7.3) id QAA24906 for xbeeb-outgoing; Tue, 6 Aug 1996 16:21:09 +0100 (BST) Received: from gatekeeper.corp.netcom.net.uk (firewall-user@gatekeeper.corp.netcom.net.uk [194.42.224.25]) by pelleas.netcom.net.uk (8.7.4/8.7.3) with SMTP id QAA24879 for ; Tue, 6 Aug 1996 16:21:06 +0100 (BST) Received: by gatekeeper.corp.netcom.net.uk; id QAA20698; Tue, 6 Aug 1996 16:21:03 +0100 Received: from Netcom by gatekeeper.corp.netcom.net.uk via smap (V3.1) id xma020684; Tue, 6 Aug 96 16:20:33 +0100 From: James Fidell Message-Id: <199608061520.QAA03220@corp.netcom.net.uk> Subject: [Xbeeb] patch-0.3.3 To: xbeeb@netcom.net.uk Date: Tue, 6 Aug 1996 16:20:31 +0100 (BST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-xbeeb@netcom.net.uk Precedence: bulk X-UIDL: 76cc6de93b3777bb2d2b077c04e0395f Status: RO X-Mozilla-Status: 0001 diff -N -r -c xbeeb-0.3.2/doc/Changes xbeeb-0.3.3/doc/Changes *** xbeeb-0.3.2/doc/Changes Mon Mar 18 22:51:43 1996 --- xbeeb-0.3.3/doc/Changes Mon Mar 18 23:34:41 1996 *************** *** 473,475 **** --- 473,483 ---- condition is true. Patch created for v0.3.2 + + + o Mon Mar 18 23:33:55 GMT 1996 + + Corrections for compilation errors under HPUX and for Robert Schmidt's + Win32/eXceed port. + + Patch created for v0.3.3 diff -N -r -c xbeeb-0.3.2/src/6502.c xbeeb-0.3.3/src/6502.c *** xbeeb-0.3.2/src/6502.c Mon Mar 18 22:42:12 1996 --- xbeeb-0.3.3/src/6502.c Mon Mar 18 22:56:19 1996 *************** *** 4513,4519 **** break; } #endif /* R65C02 */ ! #endif M6502 case op_INY : Disassemble1 ( "INY\n" ); RegisterY++; --- 4513,4519 ---- break; } #endif /* R65C02 */ ! #endif /* M6502 */ case op_INY : Disassemble1 ( "INY\n" ); RegisterY++; diff -N -r -c xbeeb-0.3.2/src/Beeb.c xbeeb-0.3.3/src/Beeb.c *** xbeeb-0.3.2/src/Beeb.c Thu Mar 14 21:58:48 1996 --- xbeeb-0.3.3/src/Beeb.c Mon Mar 18 23:19:16 1996 *************** *** 58,63 **** --- 58,64 ---- #include "VideoUla.h" #include "Options.h" #include "Sound.h" + #include "Perms.h" #ifdef EMUL_FS #include "EFS.h" *************** *** 512,518 **** } } ! if (( fd = open ( InputBuffer, O_WRONLY | O_TRUNC | O_CREAT, 0644 )) < 0 ) { fprintf ( stderr, "Couldn't create snapshot file\n" ); FatalError(); --- 513,520 ---- } } ! if (( fd = open ( InputBuffer, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY, ! 0644 )) < 0 ) { fprintf ( stderr, "Couldn't create snapshot file\n" ); FatalError(); *************** *** 651,657 **** * Try locally first, then prepend the snapshot directory. */ ! if (( fd = open ( SnapName, O_RDONLY )) < 0 ) { if (( l + strlen ( XBEEBSNAPS )) <= PATH_MAX ) { --- 653,659 ---- * Try locally first, then prepend the snapshot directory. */ ! if (( fd = open ( SnapName, O_RDONLY | O_BINARY )) < 0 ) { if (( l + strlen ( XBEEBSNAPS )) <= PATH_MAX ) { diff -N -r -c xbeeb-0.3.2/src/EFS.c xbeeb-0.3.3/src/EFS.c *** xbeeb-0.3.2/src/EFS.c Thu Mar 14 21:58:49 1996 --- xbeeb-0.3.3/src/EFS.c Mon Mar 18 23:36:45 1996 *************** *** 39,44 **** --- 39,45 ---- #include "Config.h" #include "Beeb.h" #include "Sheila.h" + #include "Perms.h" #ifdef EMUL_FS *************** *** 52,58 **** #include "EFS.h" #include "Memory.h" ! static int LoadFile ( char*, int, int, int* ); static int SaveFile ( char*, unsigned int, unsigned int, unsigned int, unsigned int ); static short FindFile ( char* ); --- 53,59 ---- #include "EFS.h" #include "Memory.h" ! static int LoadFile ( char*, int, int, unsigned int* ); static int SaveFile ( char*, unsigned int, unsigned int, unsigned int, unsigned int ); static short FindFile ( char* ); *************** *** 866,872 **** static int ! LoadFile ( char *fname, int got_address, int address, int *pExe ) { char fullname [ PATH_MAX ]; short found = -1; --- 867,873 ---- static int ! LoadFile ( char *fname, int got_address, int address, unsigned int *pExe ) { char fullname [ PATH_MAX ]; short found = -1; *************** *** 905,911 **** ( void ) strcat ( fullname, "/" ); ( void ) strcat ( fullname, Catalog [ found ].Filename ); ! if (( file_fd = open ( fullname, O_RDONLY )) < 0 ) { fprintf ( stderr, "File %s found in EFS catalog, ", fname ); fprintf ( stderr, "but not in directory %s\n", DiskDirectory ); --- 906,912 ---- ( void ) strcat ( fullname, "/" ); ( void ) strcat ( fullname, Catalog [ found ].Filename ); ! if (( file_fd = open ( fullname, O_RDONLY | O_BINARY )) < 0 ) { fprintf ( stderr, "File %s found in EFS catalog, ", fname ); fprintf ( stderr, "but not in directory %s\n", DiskDirectory ); *************** *** 974,980 **** } ! void CopyFilename ( unsigned int src, char *tgt ) { int quoted = 0, fstart = 0; --- 975,981 ---- } ! static void CopyFilename ( unsigned int src, char *tgt ) { int quoted = 0, fstart = 0; *************** *** 1181,1191 **** * Really should handle errors here... */ ! if ( fgets ( buff, 6, cat_fp ) > 0 ) sscanf ( buff, "%2d %1d", &CatalogWrites, &BootOption ); p = Catalog; ! while ( fgets ( buff, 79, cat_fp ) > 0 && CatalogSize < EFS_CATALOG_SIZE ) { /* --- 1182,1192 ---- * Really should handle errors here... */ ! if ( fgets ( buff, 6, cat_fp )) sscanf ( buff, "%2d %1d", &CatalogWrites, &BootOption ); p = Catalog; ! while ( fgets ( buff, 79, cat_fp ) && CatalogSize < EFS_CATALOG_SIZE ) { /* diff -N -r -c xbeeb-0.3.2/src/Makefile.v xbeeb-0.3.3/src/Makefile.v *** xbeeb-0.3.2/src/Makefile.v Thu Mar 14 21:58:49 1996 --- xbeeb-0.3.3/src/Makefile.v Mon Mar 18 23:20:58 1996 *************** *** 91,100 **** 6502.h Display.h ADC.h Acia.h Crtc.h Econet.h Disk.h \ RomSelect.h Fred.h Jim.h Sheila.h Memory.h SystemVia.h \ 6522Via.h UserVia.h Keyboard.h Screen.h TubeUla.h \ ! SerialUla.h VideoUla.h Options.h Sound.h EFS.h 6502.c Memory.o: Memory.c Config.h 6502.h Memory.h Fred.h Jim.h Sheila.h \ ! Screen.h Modes.h Fred.o: Fred.c Config.h Fred.h Beeb.h --- 91,100 ---- 6502.h Display.h ADC.h Acia.h Crtc.h Econet.h Disk.h \ RomSelect.h Fred.h Jim.h Sheila.h Memory.h SystemVia.h \ 6522Via.h UserVia.h Keyboard.h Screen.h TubeUla.h \ ! SerialUla.h VideoUla.h Options.h Sound.h EFS.h 6502.c Perms.h Memory.o: Memory.c Config.h 6502.h Memory.h Fred.h Jim.h Sheila.h \ ! Screen.h Modes.h Perms.h Fred.o: Fred.c Config.h Fred.h Beeb.h *************** *** 151,157 **** Bitmap.o: Bitmap.c Config.h Beeb.h Bitmap.h Memory.h Screen.h \ Modes.h Crtc.h VideoUla.h ! EFS.o: EFS.c Config.h Beeb.h Sheila.h EFS.h Memory.h VoxWare.o: VoxWare.c VoxWare.h --- 151,157 ---- Bitmap.o: Bitmap.c Config.h Beeb.h Bitmap.h Memory.h Screen.h \ Modes.h Crtc.h VideoUla.h ! EFS.o: EFS.c Config.h Beeb.h Sheila.h EFS.h Memory.h Perms.h VoxWare.o: VoxWare.c VoxWare.h diff -N -r -c xbeeb-0.3.2/src/Memory.c xbeeb-0.3.3/src/Memory.c *** xbeeb-0.3.2/src/Memory.c Thu Mar 14 21:58:49 1996 --- xbeeb-0.3.3/src/Memory.c Mon Mar 18 23:19:35 1996 *************** *** 39,44 **** --- 39,45 ---- #include "Sheila.h" #include "Screen.h" #include "Modes.h" + #include "Perms.h" /* * Memory for direct access and for the screen change mirror *************** *** 183,194 **** * ROM locations... */ ! if (( fd = open ( osname, O_RDONLY )) < 0 ) { ( void ) strcpy ( FnameBuffer, XBEEBROMS ); ( void ) strcat ( FnameBuffer, osname ); ! if (( fd = open ( FnameBuffer, O_RDONLY )) < 0 ) { fprintf ( stderr, "Couldn't open OS ROM %s\n", osname ); exit ( 1 ); --- 184,195 ---- * ROM locations... */ ! if (( fd = open ( osname, O_RDONLY | O_BINARY )) < 0 ) { ( void ) strcpy ( FnameBuffer, XBEEBROMS ); ( void ) strcat ( FnameBuffer, osname ); ! if (( fd = open ( FnameBuffer, O_RDONLY | O_BINARY )) < 0 ) { fprintf ( stderr, "Couldn't open OS ROM %s\n", osname ); exit ( 1 ); *************** *** 243,249 **** exit ( 1 ); } ! if (( fd = open ( romname, O_RDONLY )) == 0 ) { fprintf ( stderr, "Couldn't open paged ROM %s\n", romname ); exit ( 1 ); --- 244,250 ---- exit ( 1 ); } ! if (( fd = open ( romname, O_RDONLY | O_BINARY )) == 0 ) { fprintf ( stderr, "Couldn't open paged ROM %s\n", romname ); exit ( 1 ); *************** *** 298,304 **** { int fd; ! fd = open ( fname, O_WRONLY | O_CREAT | O_TRUNC, 0644 ); write ( fd, ( void* ) Mem, 32768 ); close ( fd ); } --- 299,305 ---- { int fd; ! fd = open ( fname, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644 ); write ( fd, ( void* ) Mem, 32768 ); close ( fd ); } diff -N -r -c xbeeb-0.3.2/src/Patchlevel.h xbeeb-0.3.3/src/Patchlevel.h *** xbeeb-0.3.2/src/Patchlevel.h Mon Mar 18 22:39:38 1996 --- xbeeb-0.3.3/src/Patchlevel.h Mon Mar 18 23:33:39 1996 *************** *** 28,33 **** #define VERSION 0 #define RELEASE 3 ! #define PATCHLEVEL 2 #endif /* PATCHLEVEL_H */ --- 28,33 ---- #define VERSION 0 #define RELEASE 3 ! #define PATCHLEVEL 3 #endif /* PATCHLEVEL_H */ diff -N -r -c xbeeb-0.3.2/src/Perms.h xbeeb-0.3.3/src/Perms.h *** xbeeb-0.3.2/src/Perms.h Thu Jan 1 01:00:00 1970 --- xbeeb-0.3.3/src/Perms.h Mon Mar 18 23:20:25 1996 *************** *** 0 **** --- 1,59 ---- + /* + * Copyright (c) James Fidell 1996. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of the copyright holder + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. The + * copyright holder makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + + #ifndef PERMS_H + #define PERMS_H + + /* + * This file exists only to fill in bits that appear to be missing + * on some operating systems. In particular in is derived from + * patches that Robert Schmidt (robert@idt.unit.no) sent me to build + * Xbeeb for eXceed and Win32 + */ + + /* + * F_OK and R_OK are used in calls to "access" to check file permissions. + * On a UNIX system, I'd expect to find them in + */ + + #ifndef F_OK + #define F_OK 0 + #endif + + #ifndef R_OK + #define R_OK 4 + #endif + + /* + * O_BINARY is a nasty non-UNIX thing to tell the OS we're using binary + * files. UNIX doesn't use/have this, so I just #define it as zero here + * -- it's only ORed with lots of other file attributes... + */ + + + #ifndef O_BINARY + #define O_BINARY 0 + #endif + + #endif /* PERMS_H */ diff -N -r -c xbeeb-0.3.2/src/Screen.c xbeeb-0.3.3/src/Screen.c *** xbeeb-0.3.2/src/Screen.c Thu Mar 14 21:58:49 1996 --- xbeeb-0.3.3/src/Screen.c Mon Mar 18 23:07:09 1996 *************** *** 431,440 **** --- 431,444 ---- XUnloadFont ( dpy, TtextSeparateMosaicDblU ); XUnloadFont ( dpy, TtextSeparateMosaicDblL ); + #ifdef MITSHM XShmDetach ( dpy, &SharedSegInfo ); + #endif XFreePixmap ( dpy, BitmapPixmap ); + #ifdef MITSHM shmdt ( SharedSegInfo.shmaddr ); shmctl ( SharedSegInfo.shmid, IPC_RMID, 0 ); + #endif XDestroyImage ( BitmapImage );