* use "signed char" where a signed char is required

* fgetc() returns int
* don't override system defaults for compiler and optimization
* clean up patches
* md5 -> distinfo
This commit is contained in:
naddy 2002-02-21 01:04:22 +00:00
parent 07c7462da1
commit c68cd641fb
7 changed files with 124 additions and 81 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.11 2001/05/06 00:34:43 lebel Exp $
# $OpenBSD: Makefile,v 1.12 2002/02/21 01:04:22 naddy Exp $
#
COMMENT= "HP48sx emulator"
DISTNAME= x48-0.4.0
CATEGORIES= emulators
NEED_VERSION= 1.402
NEED_VERSION= 1.504
MAINTAINER= Todd T. Fries <todd@openbsd.org>
@ -17,7 +17,7 @@ PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/emulators
CONFIGURE_STYLE=imake noman
CONFIGURE_STYLE= imake noman
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/x48

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-config_h,v 1.1 2002/02/21 01:04:22 naddy Exp $
--- config.h.orig Thu Feb 21 01:58:46 2002
+++ config.h Thu Feb 21 01:59:08 2002
@@ -56,12 +56,12 @@
/*
* Which Compiler to use:
*/
-#define CC_DEF gcc
+/* #define CC_DEF gcc */
/*
* Which Optimization Flags:
*/
-#define CDEBUGFLAGS_DEF -O6 -Wall
+/* #define CDEBUGFLAGS_DEF -O6 -Wall */
/*
* Which Flags to pass to the Linker:

View File

@ -0,0 +1,65 @@
$OpenBSD: patch-src_Imakefile,v 1.1 2002/02/21 01:04:22 naddy Exp $
--- src/Imakefile.orig Thu Jan 12 12:17:01 1995
+++ src/Imakefile Thu Feb 21 01:32:51 2002
@@ -22,7 +22,6 @@
#include "../config.h"
- BIN = $(TOP)/bin
UTILS = $(TOP)/utils
READLINE = $(TOP)/readline
READLINELIB = $(READLINE)/libreadline.a
@@ -86,31 +85,35 @@ EXTRA_LIBRARIES =
CO = co -l
TARFILES = Imakefile X48.ad $(TARS1) $(SRCS2) $(SRCS3) $(SRCS4) $(HDRS)
-all:: $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
- PROGRAMS = $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
+ PROGRAMS = x48 dump2rom checkrom mkcard
+
+all:: $(PROGRAMS)
depend:: version.c X48.ad.h
echo_tarfiles:
@echo $(TARFILES)
-#ifndef ComplexProgramTarget_4
-#define ComplexProgramTarget_4(program,locallib,syslib) @@\
-program: $(OBJS4) $(DEPLIBS4) @@\
- RemoveTargetProgram($@) @@\
- $(CC) -o $@ $(LDOPTIONS) $(OBJS4) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
- @@\
-SaberProgramTarget(program,$(SRCS4),$(OBJS4),locallib,syslib) @@\
- @@\
-InstallProgram(program,$(BINDIR)) @@\
-InstallManPage(program,$(MANDIR))
-#endif /* ComplexProgramTarget_4 */
-
-ComplexProgramTarget_1($(BIN)/x48, $(X48LIBS),)
-ComplexProgramTarget_2($(BIN)/dump2rom,,)
-ComplexProgramTarget_3($(BIN)/checkrom,,)
-ComplexProgramTarget_4($(BIN)/mkcard,,)
+#ifdef ProgramTargetHelper
+#undef ProgramTargetHelper
+#endif
+#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\
+ @@\
+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\
+SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+
+ComplexProgramTarget_1(x48, $(X48LIBS),)
+ComplexProgramTarget_2(dump2rom,,)
+ComplexProgramTarget_3(checkrom,,)
+ComplexProgramTarget_4(mkcard,,)
InstallAppDefaults(X48)

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-src_dump2rom_c,v 1.1 2002/02/21 01:04:22 naddy Exp $
--- src/dump2rom.c.orig Thu Feb 21 01:53:30 2002
+++ src/dump2rom.c Thu Feb 21 01:53:51 2002
@@ -130,8 +130,7 @@ char **argv;
{
FILE *dump;
long addr, size;
- char ch;
- int i, gx, error;
+ int ch, i, gx, error;
if (argc < 2) {
fprintf(stderr, "usage: %s hp48-dump-file\n", argv[0]);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_hp48_h,v 1.1 2002/02/21 01:04:23 naddy Exp $
--- src/hp48.h.orig Thu Feb 21 01:38:49 2002
+++ src/hp48.h Thu Feb 21 01:39:02 2002
@@ -218,7 +218,7 @@ typedef struct saturn_t {
word_8 unknown2;
- char timer1; /* may NOT be unsigned !!! */
+ signed char timer1; /* may NOT be unsigned !!! */
word_32 timer2;
long t1_instr;

View File

@ -1,71 +1,6 @@
diff -ru ./src/Imakefile.orig ./src/Imakefile
--- ./src/Imakefile.orig Thu Jan 12 05:17:01 1995
+++ ./src/Imakefile Fri Nov 28 14:42:56 1997
@@ -22,7 +22,6 @@
#include "../config.h"
- BIN = $(TOP)/bin
UTILS = $(TOP)/utils
READLINE = $(TOP)/readline
READLINELIB = $(READLINE)/libreadline.a
@@ -86,31 +85,35 @@
CO = co -l
TARFILES = Imakefile X48.ad $(TARS1) $(SRCS2) $(SRCS3) $(SRCS4) $(HDRS)
-all:: $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
- PROGRAMS = $(BIN)/x48 $(BIN)/dump2rom $(BIN)/checkrom $(BIN)/mkcard
+ PROGRAMS = x48 dump2rom checkrom mkcard
+
+all:: $(PROGRAMS)
depend:: version.c X48.ad.h
echo_tarfiles:
@echo $(TARFILES)
-#ifndef ComplexProgramTarget_4
-#define ComplexProgramTarget_4(program,locallib,syslib) @@\
-program: $(OBJS4) $(DEPLIBS4) @@\
- RemoveTargetProgram($@) @@\
- $(CC) -o $@ $(LDOPTIONS) $(OBJS4) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
- @@\
-SaberProgramTarget(program,$(SRCS4),$(OBJS4),locallib,syslib) @@\
- @@\
-InstallProgram(program,$(BINDIR)) @@\
-InstallManPage(program,$(MANDIR))
-#endif /* ComplexProgramTarget_4 */
-
-ComplexProgramTarget_1($(BIN)/x48, $(X48LIBS),)
-ComplexProgramTarget_2($(BIN)/dump2rom,,)
-ComplexProgramTarget_3($(BIN)/checkrom,,)
-ComplexProgramTarget_4($(BIN)/mkcard,,)
+#ifdef ProgramTargetHelper
+#undef ProgramTargetHelper
+#endif
+#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\
+ @@\
+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\
+SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+
+ComplexProgramTarget_1(x48, $(X48LIBS),)
+ComplexProgramTarget_2(dump2rom,,)
+ComplexProgramTarget_3(checkrom,,)
+ComplexProgramTarget_4(mkcard,,)
InstallAppDefaults(X48)
diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
--- ../../work/x48-0.4.0/src/serial.c Wed Jan 11 12:24:04 1995
+++ ./src/serial.c Wed Oct 23 10:59:25 1996
$OpenBSD: patch-src_serial_c,v 1.1 2002/02/21 01:04:23 naddy Exp $
--- src/serial.c.orig Wed Jan 11 19:24:04 1995
+++ src/serial.c Thu Feb 21 01:32:51 2002
@@ -77,6 +77,8 @@
#ifdef SOLARIS
#include <sys/stream.h>
@ -75,7 +10,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
#include <sys/termios.h>
#endif
@@ -238,7 +240,7 @@
@@ -238,7 +240,7 @@ serial_init()
if (ttyp >= 0)
{
@ -84,7 +19,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
@@ -263,7 +265,7 @@
@@ -263,7 +265,7 @@ serial_init()
if (ttyp >= 0)
{
@ -93,7 +28,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
@@ -291,7 +293,7 @@
@@ -291,7 +293,7 @@ serial_init()
if (ir_fd >= 0)
{
@ -102,7 +37,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
@@ -315,7 +317,7 @@
@@ -315,7 +317,7 @@ serial_init()
if (ir_fd >= 0)
{
@ -111,7 +46,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
@@ -344,7 +346,7 @@
@@ -344,7 +346,7 @@ int baud;
if (ir_fd >= 0)
{
@ -120,7 +55,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
@@ -358,6 +360,10 @@
@@ -358,6 +360,10 @@ int baud;
}
}
@ -131,7 +66,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
ttybuf.c_cflag &= ~CBAUD;
baud &= 0x7;
@@ -404,9 +410,11 @@
@@ -404,9 +410,11 @@ int baud;
ttybuf.c_cflag |= B9600;
}
@ -144,7 +79,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
@@ -422,7 +430,7 @@
@@ -422,7 +430,7 @@ int baud;
if (ttyp >= 0)
{
@ -153,7 +88,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
@@ -437,6 +445,9 @@
@@ -437,6 +445,9 @@ int baud;
}
}
@ -163,7 +98,7 @@ diff -ru ../../work/x48-0.4.0/src/serial.c ./src/serial.c
ttybuf.c_cflag &= ~CBAUD;
baud &= 0x7;
@@ -482,10 +493,11 @@
@@ -482,10 +493,11 @@ int baud;
fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname);
ttybuf.c_cflag |= B9600;
}