NetBSD Problem Report #51103

From www@NetBSD.org  Fri Apr 29 13:12:38 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 20F587A48D
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 29 Apr 2016 13:12:38 +0000 (UTC)
Message-Id: <20160429131236.73E577AA35@mollari.NetBSD.org>
Date: Fri, 29 Apr 2016 13:12:36 +0000 (UTC)
From: scole_mail@gmx.com
Reply-To: scole_mail@gmx.com
To: gnats-bugs@NetBSD.org
Subject: Updates for ski emulator
X-Send-Pr-Version: www-1.0

>Number:         51103
>Category:       pkg
>Synopsis:       Updates for ski emulator
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    scole
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 29 13:15:00 +0000 2016
>Closed-Date:    Mon Aug 15 13:14:12 +0000 2016
>Last-Modified:  Mon Aug 15 13:14:12 +0000 2016
>Originator:     scole_mail
>Release:        pkgsrc-2015Q4
>Organization:
none
>Environment:
NetBSD dstar 7.0.0_PATCH NetBSD 7.0.0_PATCH (GENERIC) #0: Sat Apr 16 16:57:22 EDT 2016  scole@dstar:/home/scole/nbsd/7_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
I made some updates for the ski emulator, the main changes were:

 - fix so builds work with motif and/or gtk
 - add options.mk for debug, x11, and gtk
 - use '\n' instead of  '\r\n' in few places
   so curses will display source code correctly
 - unbreak build on freebsd

So with these changes you can run the motif (xski) or gtk (gski)
clients, (myself, I prefer xski).  The boot loader "skiload" will run
and you can see disassembled instructions with all 3 clients (ski gski
xski).

It looks like some things were never completed for netbsd, like
booting or dissembly of netbsd kernel, source code lines not decoded,
and other stuff.  If I can figure some of those things out, I may
submit another PR.

List of new and modified files
? options.mk
? patches/patch-XSki.netbsd
? patches/patch-src-line_separator.h
? patches/patch-src_eparse.y
? patches/patch-src_freebsd_signal.h
? patches/patch-src_program.c
? patches/patch-src_ssDCmd.c
? patches/patch-src_ssX.c
M DESCR
M Makefile
M PLIST
M distinfo
M patches/patch-ad
M patches/patch-ae
M patches/patch-ap


Thanks

>How-To-Repeat:
Install pkgsrc/emulator/ski, cross-compile ia64 boot loader "skiload", then run emulator

[ski|xski|gski] skiload


>Fix:
Here are patches:

Index: DESCR
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/DESCR,v
retrieving revision 1.6
diff -b -u -r1.6 DESCR
--- DESCR	27 Jul 2011 11:14:22 -0000	1.6
+++ DESCR	29 Apr 2016 13:04:59 -0000
@@ -9,4 +9,7 @@

 Run the ski binary from within an xterm window.

-BUGS: the xserver version xski doesn't currently work.
+BUGS: source listing doesn't show up in Program window, decoding of
+      assembly doesn't always work correctly, manual pages out of date,
+      rpm build target broken, ctrl-c breaks curses ski program not emulator,
+      prints in ski-fake-xterm aren't aligned, probably others.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/Makefile,v
retrieving revision 1.17
diff -b -u -r1.17 Makefile
--- Makefile	18 Aug 2015 07:31:07 -0000	1.17
+++ Makefile	29 Apr 2016 13:04:59 -0000
@@ -2,13 +2,17 @@
 #

 DISTNAME=	ski-1.3.2
-PKGREVISION=	2
+PKGREVISION=	3
 CATEGORIES=	emulators
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ski/}

 MAINTAINER=	cherry@zyx.in
 HOMEPAGE=	http://ski.sourceforge.net/
 COMMENT=	The ia64 instruction set simulator
+LICENSE=	gnu-gpl-v2
+
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"

 BUILD_DEPENDS+= libelf>=0.8.13:../../devel/libelf

@@ -22,14 +26,27 @@
 USE_LIBTOOL=	yes
 USE_NCURSES=	yes

+INSTALLATION_DIRS+=	share/doc/ski
+
+SUBST_CLASSES+=		xski-app
+SUBST_STAGE.xski-app=	pre-configure
+SUBST_MESSAGE.xski-app=	Fixing X11 Makefile.am app-default paths.
+SUBST_FILES.xski-app=	Makefile.am
+SUBST_SED.xski-app=	-e 's,/etc/X11/app-defaults,${PREFIX}/lib/X11/app-defaults,g'
+
+SUBST_CLASSES+=		ssx-app
+SUBST_STAGE.ssx-app=	post-patch
+SUBST_MESSAGE.ssx-app=	Fixing X11 ssX.c app-default paths.
+SUBST_FILES.ssx-app=	src/ssX.c
+SUBST_SED.ssx-app=	-e 's,XSKI_RESOURCE_FILE,${PREFIX}/lib/X11/app-defaults/XSki,g'
+
 pre-configure:
 #	cd  ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./autogen.sh ${CONFIGURE_ARGS}
 	cd ${WRKSRC} && autoreconf -fi -I macros

 post-install:
-	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/app-defaults
-	${INSTALL_DATA} ${WRKSRC}/src/XSki \
-			${DESTDIR}${PREFIX}/lib/X11/app-defaults/XSki
+	${INSTALL_DATA} ${WRKSRC}/doc/manual/SkiManualMasterDoc.pdf \
+			${DESTDIR}${PREFIX}/share/ski

 .include "../../devel/gperf/buildlink3.mk"
 .include "../../devel/libelf/buildlink3.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/PLIST,v
retrieving revision 1.3
diff -b -u -r1.3 PLIST
--- PLIST	27 Jul 2011 11:14:22 -0000	1.3
+++ PLIST	29 Apr 2016 13:04:59 -0000
@@ -4,6 +4,8 @@
 bin/bskinc
 bin/ski-config
 bin/ski-fake-xterm
+${PLIST.xski}bin/xski
+${PLIST.gski}bin/gski
 include/ski-1.3/asm.h
 include/ski-1.3/bits.h
 include/ski-1.3/coreui.h
@@ -19,13 +21,12 @@
 include/ski-1.3/state.h
 include/ski-1.3/std.h
 include/ski-1.3/types.h
-lib/X11/app-defaults/XSki
-lib/libski-1.3.so.2
-lib/libski-1.3.so.2.0.0
+${PLIST.xski}lib/X11/app-defaults/XSki
 lib/libski.a
-lib/libski.la
-lib/libski.so
 man/man1/bski.1
 man/man1/bskinc.1
 man/man1/ski.1
-share/ski/gski.glade
+${PLIST.xski}man/man1/xski.1
+${PLIST.gski}man/man1/gski.1
+${PLIST.gski}share/ski/gski.glade
+share/ski/SkiManualMasterDoc.pdf
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/distinfo,v
retrieving revision 1.5
diff -b -u -r1.5 distinfo
--- distinfo	3 Nov 2015 20:31:01 -0000	1.5
+++ distinfo	29 Apr 2016 13:04:59 -0000
@@ -4,11 +4,12 @@
 RMD160 (ski-1.3.2.tar.gz) = 1ff739eac7b8163026d208ee9b51d134f524e73f
 SHA512 (ski-1.3.2.tar.gz) = 21f2e1dd87cb517602d4d6ef62707ec6042c1b6ec5dfd063db7315d13bbc3fb47b491c15b7efb0433fc82f27c7924e2d50b2f57fe24e49aeb864ce2c3c2c8bd0
 Size (ski-1.3.2.tar.gz) = 2715791 bytes
+SHA1 (patch-XSki.netbsd) = 866b050bf751cf1bff147835db17570c754b891b
 SHA1 (patch-aa) = 60003cef1eef2bbb6ce535c137fa15a76b0e4f13
 SHA1 (patch-ab) = 23076061dac3a0488d2f5b7b0ac022d095568d80
 SHA1 (patch-ac) = 769b847c5564565617be8043e0c736e12c296d40
-SHA1 (patch-ad) = d1680c77d837a8c3c371e7bd624cb1fa87ea6724
-SHA1 (patch-ae) = 036804384c4a4a694529092a8819c90abbc6e9ae
+SHA1 (patch-ad) = e25a3b08b1e0f8d4972331a05682a1d917aa9ff9
+SHA1 (patch-ae) = 954ef900e9cd64b485c9057a5fb01e283dcf6ed5
 SHA1 (patch-af) = f4048bccb6809ad69527352bcc4c32f8b109b437
 SHA1 (patch-ag) = 973a8f5c1cc5cc36bb8aa1e1e21769f51194967e
 SHA1 (patch-ah) = 31e4807b546c69aa43c7bddc4f16ba3b99d8da3e
@@ -19,4 +20,10 @@
 SHA1 (patch-am) = 0965936933424ab4af4d1fa3384808f4e92f9b04
 SHA1 (patch-an) = 73629a59de77f233be3748d19c5d17d8e18e8af5
 SHA1 (patch-ao) = 8f2eabd4d8dc6ccef593a5f50d00485a905ee523
-SHA1 (patch-ap) = b392a3b89273db3f55ed7d88ca167229f6e3c802
+SHA1 (patch-ap) = a98cd0aa55a002020c26fb70e5549bd16270bf39
+SHA1 (patch-src-line_separator.h) = 2c9b0c2fdace6bc59735cbeb9588aea21b19b1db
+SHA1 (patch-src_eparse.y) = c82918d36047e51273cc1aa0e20a4ce1649668f5
+SHA1 (patch-src_freebsd_signal.h) = 265bd4e3f18dcfda791595b1356b37398c055349
+SHA1 (patch-src_program.c) = d364a8a0ababfbc48333d5e48962f53677bcfeb9
+SHA1 (patch-src_ssDCmd.c) = 9062b2107f72171644e27d83ec45260aa40019fe
+SHA1 (patch-src_ssX.c) = 01c24b8d6b62b51798ae4a33e69cfb323a66f8d5
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ad,v
retrieving revision 1.1.1.1
diff -b -u -r1.1.1.1 patch-ad
--- patches/patch-ad	27 Jul 2011 10:23:48 -0000	1.1.1.1
+++ patches/patch-ad	29 Apr 2016 13:04:59 -0000
@@ -1,17 +1,24 @@
-$NetBSD: patch-ad,v 1.1.1.1 2011/07/27 10:23:48 cherry Exp $
+$NetBSD$

---- src/Makefile.am.orig	2008-02-05 04:11:38.000000000 +0000
-+++ src/Makefile.am
-@@ -130,7 +130,7 @@ if LINUX
+Make compile for NetBSD and gtk.
+
+--- src/Makefile.am.orig	2008-02-04 23:11:38.000000000 -0500
++++ src/Makefile.am	2016-04-20 09:50:38.000000000 -0400
+@@ -130,7 +130,12 @@
  ski_LDFLAGS = 
  endif

 -ski_LDADD= libski.la -ldl
++# XXX others beside netbsd require?, rdynamic for gtk/libglade
++if NETBSD
++ski_LDFLAGS=-static -rdynamic
++endif
++
 +ski_LDADD= libski.la

  skiincludedir= $(includedir)/ski-$(SKI_MAJOR_VERSION).$(SKI_MINOR_VERSION)
  skiinclude_HEADERS= \
-@@ -226,6 +226,23 @@ else
+@@ -226,6 +231,23 @@
  freebsd_FILES =
  endif
  @@ -35,7 +42,7 @@
  libski_la_SOURCES= \
  	$(COMBFNS_DERIVED) \
  	$(PREDECODE_DERIVED) \
-@@ -252,6 +269,7 @@ libski_la_SOURCES= \
+@@ -252,6 +274,7 @@
  	$(linux_FILES) \
  	$(hpux_FILES) \
  	$(freebsd_FILES) \
@@ -43,7 +50,7 @@
  	libsym.c \
  	$(ASM_HASH_DERIVED) \
  	$(IADAS_DECODER_DERIVED) \
-@@ -288,6 +306,7 @@ EXTRA_libski_la_SOURCES = \
+@@ -288,6 +311,7 @@
  	$(EXTRA_linux_FILES) \
  	$(EXTRA_hpux_FILES) \
  	$(EXTRA_freebsd_FILES) \
Index: patches/patch-ae
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ae,v
retrieving revision 1.2
diff -b -u -r1.2 patch-ae
--- patches/patch-ae	26 Jan 2013 23:11:14 -0000	1.2
+++ patches/patch-ae	29 Apr 2016 13:04:59 -0000
@@ -1,11 +1,8 @@
-$NetBSD: patch-ae,v 1.2 2013/01/26 23:11:14 wiz Exp $
+$NetBSD$

-Second chunk: automake-1.13 compat
-Rest: ?
-
---- configure.ac.orig	2008-02-05 04:11:37.000000000 +0000
-+++ configure.ac
-@@ -33,12 +33,14 @@ case $host_os in
+--- configure.ac	2008-02-04 23:11:37.000000000 -0500
++++ configure.ac	2016-04-20 20:09:24.000000000 -0400
+@@ -33,12 +33,14 @@
      linux*)	HOST_OS=linux;;
      hpux*)	HOST_OS=hpux;;
      freebsd*)	HOST_OS=freebsd;;
@@ -20,7 +17,7 @@

  # Version number definitions
  #
-@@ -80,12 +82,11 @@ AC_PREFIX_DEFAULT(/usr/local)
+@@ -80,12 +82,11 @@
  AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

  # Specify a configuration file
@@ -34,7 +31,7 @@
  AM_PROG_AS
  AC_PROG_INSTALL
  AC_PROG_LN_S
-@@ -259,6 +260,10 @@ if test "$HOST_OS" = freebsd; then
+@@ -259,6 +260,10 @@
  	LDFLAGS="$LDFLAGS -lutil"
  fi
  @@ -45,7 +42,7 @@
  dnl Check for optional libs
  AC_CHECK_LIB(unwind-ia64, _Uia64_get_proc_name, )

-@@ -331,6 +336,13 @@ if test "$HOST_OS" = hpux; then
+@@ -331,6 +336,13 @@
          check_curses=no], [])
  fi    

@@ -59,7 +56,7 @@
  if test "x$check_curses" != xno; then
  AC_CHECK_LIB(curses, tgetent, [],
      [AC_CHECK_LIB(ncurses, tgetent, ,
-@@ -347,6 +359,7 @@ case $host_os in
+@@ -347,6 +359,7 @@
      hpux10*)	CFLAGS="$CFLAGS -DHPUX1020";;
      hpux11*)	CFLAGS="$CFLAGS -DHPUX1100";;
      freebsd*)	CFLAGS="$CFLAGS -DFREEBSD -D__linux__";;
Index: patches/patch-ap
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ap,v
retrieving revision 1.1.1.1
diff -b -u -r1.1.1.1 patch-ap
--- patches/patch-ap	27 Jul 2011 10:23:50 -0000	1.1.1.1
+++ patches/patch-ap	29 Apr 2016 13:04:59 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
+$NetBSD$

---- src/netbsd/syscall-netbsd.h.orig	2009-12-16 13:06:31.000000000 +0000
-+++ src/netbsd/syscall-netbsd.h
-@@ -0,0 +1,144 @@
+--- src/netbsd/syscall-netbsd.h.orig	2016-04-19 05:58:13.000000000 -0400
++++ src/netbsd/syscall-netbsd.h	2016-04-19 05:59:45.000000000 -0400
+@@ -0,0 +1,139 @@
 +/*
 + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
 + *
@@ -63,9 +63,6 @@
 +	long64	tv_nsec;
 +};
 +
-+
-+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	*/
-+
 +struct stat64 {
 +	dev_t	  st_dev;		/* inode's device */
 +	mode_t	  st_mode;		/* inode protection mode */
@@ -98,8 +95,6 @@
 +	uint32_t  st_spare[2];
 +};
 +
-+
-+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	 */
 +struct statvfs64 {
 +	unsigned long	f_flag;		/* copy of mount exported flags */
 +	unsigned long	f_bsize;	/* file system block size */

>Release-Note:

>Audit-Trail:
From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Fri, 29 Apr 2016 09:22:52 -0400

 Here are the new files:

 options.mk ==========================================
 # $NetBSD$

 PKG_OPTIONS_VAR=	PKG_OPTIONS.ski
 PKG_SUPPORTED_OPTIONS=	debug gtk motif
 PKG_SUGGESTED_OPTIONS=	gtk motif

 .include "../../mk/bsd.options.mk"

 .if !empty(PKG_OPTIONS:Mdebug)
 CPPFLAGS+=		-g
 INSTALL_UNSTRIPPED=	yes
 .endif

 PLIST_VARS+=		xski
 .if !empty(PKG_OPTIONS:Mmotif)
 PLIST.xski=		yes
 CONFIGURE_ARGS+=	--with-x11
 INSTALLATION_DIRS+=	lib/X11/app-defaults

 .include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../x11/motif/buildlink3.mk"
 .endif

 PLIST_VARS+=		gski
 .if !empty(PKG_OPTIONS:Mgtk)
 PLIST.gski=		yes
 CONFIGURE_ARGS+=	--with-gtk

 .include "../../devel/libglade/buildlink3.mk"
 .include "../../devel/libgnomeui/buildlink3.mk"
 .endif

 patches/patch-XSki.netbsd ==========================================
 $NetBSD$

 Include X resource file for NetBSD which is a copy of the FreeBSD one.

 --- XSki.netbsd.orig	2016-04-19 12:56:13.000000000 -0400
 +++ XSki.netbsd	2016-04-19 12:56:25.000000000 -0400
 @@ -0,0 +1,476 @@
 +!
 +! Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
 +!
 +! This program is free software; you can redistribute it and/or modify
 +! it under the terms of the GNU General Public License as published by
 +! the Free Software Foundation; either version 2 of the License, or 
 +! (at your option) any later version.
 +!
 +! This program is distributed in the hope that it will be useful, 
 +! but WITHOUT ANY WARRANTY; without even the implied warranty of 
 +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 +! GNU General Public License for more details.
 +!
 +! You should have received a copy of the GNU General Public License along
 +! with this program; if not, write to the Free Software Foundation, Inc.,
 +! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 +!
 +
 +! *XmText.fontList:	<font>
 +
 +*background:		rgb:C0/C0/C0
 +main.geometry:		+0+0
 +
 +*showUrs:		True
 +*showGrs:		True
 +*showFrs:		True
 +*showSrs:		True
 +*showIArs:		True
 +
 +*regwUrs.rows:		7
 +*regwGrs.rows:		7
 +*regwFrs.rows:		4
 +*regwSrs.rows:		2
 +*regwIArs.rows:		4
 +
 +*viewProgram:		True
 +*viewData:		True
 +*viewvga:		False
 +*viewRegisters:		True
 +
 +*help.sensitive:	False
 +*bb4.sensitive:		False
 +*bb5.sensitive:		False
 +*prgwRC.goto.sensitive:	False
 +*datwRC.goto.sensitive:	False
 +
 +*File.mnemonic:		F
 +*View.mnemonic:		V
 +*Configure.mnemonic:	C
 +*Help.mnemonic:		H
 +
 +*load.labelString:	Open...
 +*load.mnemonic:		O
 +*save.labelString:	Save...
 +*save.mnemonic:		S
 +*trace.labelString:	Trace...
 +*trace.mnemonic:	T
 +*traceOn.labelString:	Enable Trace
 +*traceOff.labelString:	Disable Trace
 +*read.labelString:	Read...
 +*read.mnemonic:		R
 +*quit.labelString:	Quit
 +*quit.mnemonic:		Q
 +
 +*LoadFSD.fileTypeMask:	FILE_REGULAR
 +*LoadFSD.textColumns:	50
 +*load_syms.labelString:	Load all symbols
 +*load_syms.alignment:	ALIGNMENT_BEGINNING
 +
 +*program.labelString:	Program
 +*program.mnemonic:	P
 +*data.labelString:	Data
 +*data.mnemonic:		D
 +*registers.labelString:	Registers
 +*registers.mnemonic:	R
 +*cache.labelString:	Cache
 +*cache.mnemonic:	C
 +*tlb.labelString:	TLB
 +*tlb.mnemonic:		T
 +*callstack.labelString:	Call Stack
 +*breakpoints.labelString:	Breakpoints
 +*breakpoints.mnemonic:	B
 +*symbols.labelString:	Symbols
 +*symbols.mnemonic:	S
 +
 +*context.labelString:	Context-Sensitive Help
 +*context.mnemonic:	C
 +*overview.labelString:	Overview
 +*overview.mnemonic:	O
 +*commands.labelString:	Commands
 +*product.labelString:	Product Information
 +*product.mnemonic:	P
 +
 +*loadFSD_popup.title:	Open File
 +*prodInfo_popup.title:	Help -- Product Information
 +
 +! Processor Selection
 +*p0.labelString:		0
 +*p1.labelString:		1
 +*p2.labelString:		2
 +*procOption.labelString:	Processor
 +
 +! Button Box
 +*bbox.orientation:	HORIZONTAL
 +*bbox.packing:		PACK_TIGHT
 +*bb0.labelString:	Step
 +*bb0.translations:	Shift<Btn1Down>: SimCmd("step 10")\n\
 +			<Btn1Down>: SimCmd("step 1")
 +*bb1.labelString:	Run
 +*bb1.translations:	<Btn1Down>: SimCmd("run")
 +*bb2.labelString:	Prog
 +*bb2.translations:	<Btn1Down>: SimCmd("pj")
 +*bb3.labelString:	Data
 +*bb3.translations:	<Btn1Down>: SimCmd("dj")
 +*bb4.labelString:	Regs
 +*bb5.labelString:	Cache
 +*bb6.labelString:	TLB
 +*bb6.translations:	<Btn1Down>: SimCmd("sdt")
 +*bb7.labelString:	Quit
 +*bb7.translations:	<Btn1Down>: SimCmd("quit")
 +
 +*cmd.promptString:		Command:
 +*cmd.historyVisibleItemCount:	5
 +*cmd.textColumns:		45
 +
 +*msgs.editMode:			MULTI_LINE_EDIT
 +*msgs.editable:			False
 +*msgs.cursorPositionVisible:	False
 +*msgs.rows:			10
 +
 +! Generic Pushbutton resources
 +*ok.labelString:	OK
 +*apply.labelString:	Apply
 +*cancel.labelString:	Cancel
 +*close.labelString:	Close
 +*config.labelString:	Configure
 +*goto.labelString:	Goto
 +*help.labelString:	Help
 +
 +*real.labelString:	Real
 +*virtual.labelString:	Virtual
 +
 +! Program Window
 +! These 3 are not currently used
 +*prgw.cancelLabelString:	Cancel
 +*prgw.helpLabelString:		Help
 +*prgw.okLabelString:		OK
 +
 +*prgw_popup.title:		Program Window
 +*prgw_popup.geometry:		550-0+0
 +*prgw.defaultPosition:		False
 +
 +*prgwH.alignment:		ALIGNMENT_BEGINNING
 +*prgwH.leftAttachment:		ATTACH_FORM
 +*prgwH.rightAttachment:		ATTACH_FORM
 +*prgwH.topAttachment:		ATTACH_FORM
 +
 +*prgwT.rows:			21
 +*prgwT.editMode:		MULTI_LINE_EDIT
 +*prgwT.editable:		False
 +*prgwT.autoShowCursorPosition:	False
 +*prgwT.cursorPositionVisible:	False
 +*prgwT.resizeHeight:		False
 +*prgwT.resizeWidth:		False
 +! *prgwT.resizeWidth:		True
 +*prgwT.leftAttachment:		ATTACH_FORM
 +*prgwT.rightAttachment:		ATTACH_FORM
 +*prgwT.topAttachment:		ATTACH_WIDGET
 +*prgwT.topWidget:		prgwH
 +*prgwT.bottomAttachment:	ATTACH_WIDGET
 +*prgwT.bottomWidget:		prgwS
 +*prgwT.translations:		#override\n\
 +				<ConfigureNotify>:	pwResize()\n\
 +				<Key>osfPageDown:	SimCmd(pf)\n\
 +				<Key>osfPageUp:		SimCmd(pb)\n\
 +				<Key>osfDown:		SimCmd("pf 1")\n\
 +				<Key>osfUp:		SimCmd("pb 1")
 +
 +*prgwS.leftAttachment:		ATTACH_FORM
 +*prgwS.rightAttachment:		ATTACH_FORM
 +*prgwS.bottomAttachment:	ATTACH_WIDGET
 +*prgwS.bottomWidget:		prgwRC
 +
 +*prgwRC.adjustLast:		False
 +*prgwRC.orientation:		HORIZONTAL
 +*prgwRC.spacing:		10
 +*prgwRC.leftAttachment:		ATTACH_FORM
 +*prgwRC.rightAttachment:	ATTACH_FORM
 +*prgwRC.bottomAttachment:	ATTACH_FORM
 +
 +! Program Window Configure Dialog
 +*pwConf_popup.title:		Program Window Configuration
 +
 +*pwConfRC.adjustLast:		False
 +*pwConfRC.orientation:		HORIZONTAL
 +*pwConfRC.spacing:		10
 +*pwConfRC.leftAttachment:	ATTACH_FORM
 +*pwConfRC.rightAttachment:	ATTACH_FORM
 +*pwConfRC.bottomAttachment:	ATTACH_FORM
 +
 +*pwConfS.leftAttachment:	ATTACH_FORM
 +*pwConfS.rightAttachment:	ATTACH_FORM
 +*pwConfS.bottomAttachment:	ATTACH_WIDGET
 +*pwConfS.bottomWidget:		pwConfRC
 +
 +*iofs.labelString:	Instruction Offset Format:
 +*iofs.rightAttachment:	ATTACH_WIDGET
 +*iofs.rightWidget:	iofsrb
 +*iofs.topAttachment:	ATTACH_OPPOSITE_WIDGET
 +*iofs.topWidget:	iofsrb
 +*iofs.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 +*iofs.bottomWidget:	iofsrb
 +
 +*iofsrb.orientation:		HORIZONTAL
 +*iofsrb.bottomAttachment:	ATTACH_WIDGET
 +*iofsrb.bottomWidget:		instrb
 +*iofsrb.bottomOffset:		2
 +*iofsrb.rightAttachment:	ATTACH_FORM
 +
 +*iofshex.labelString:	Hexadecimal
 +
 +*iofssym.labelString:	Symbolic
 +
 +*iofsboth.labelString:	Both
 +
 +*inst.labelString:	Instruction Format:
 +*inst.rightAttachment:	ATTACH_WIDGET
 +*inst.rightWidget:	instrb
 +*inst.topAttachment:	ATTACH_OPPOSITE_WIDGET
 +*inst.topWidget:	instrb
 +*inst.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 +*inst.bottomWidget:	instrb
 +
 +*instrb.orientation:		HORIZONTAL
 +*instrb.bottomAttachment:	ATTACH_WIDGET
 +*instrb.bottomWidget:		pwConfS
 +*instrb.bottomOffset:		2
 +*instrb.rightAttachment:	ATTACH_FORM
 +
 +*insthex.labelString:	Hexadecimal
 +
 +*instsym.labelString:	Disassembled
 +
 +*instboth.labelString:	Both
 +
 +! Program Window Goto Dialog
 +*pwGoto_popup.title:		Program Window Goto
 +
 +*pwGotoRC.adjustLast:		False
 +*pwGotoRC.orientation:		HORIZONTAL
 +*pwGotoRC.spacing:		10
 +*pwGotoRC.leftAttachment:	ATTACH_FORM
 +*pwGotoRC.rightAttachment:	ATTACH_FORM
 +*pwGotoRC.bottomAttachment:	ATTACH_FORM
 +
 +*pwGotoS.leftAttachment:	ATTACH_FORM
 +*pwGotoS.rightAttachment:	ATTACH_FORM
 +*pwGotoS.bottomAttachment:	ATTACH_WIDGET
 +*pwGotoS.bottomWidget:		pwGotoRC
 +
 +*pwOffset.rightAttachment:	ATTACH_FORM
 +*pwOffset.bottomAttachment:	ATTACH_WIDGET
 +*pwOffset.bottomWidget:		pwGotoS
 +
 +*pwOffsetL.labelString:		Offset:
 +*pwOffsetL.rightAttachment:	ATTACH_WIDGET
 +*pwOffsetL.rightWidget:		pwOffset
 +*pwOffsetL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 +*pwOffsetL.topWidget:		pwOffset
 +*pwOffsetL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 +*pwOffsetL.bottomWidget:	pwOffset
 +
 +*pwSpace.rightAttachment:	ATTACH_FORM
 +*pwSpace.bottomAttachment:	ATTACH_WIDGET
 +*pwSpace.bottomWidget:		pwOffset
 +
 +*pwSpaceL.labelString:		Space:
 +*pwSpaceL.rightAttachment:	ATTACH_WIDGET
 +*pwSpaceL.rightWidget:		pwSpace
 +*pwSpaceL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 +*pwSpaceL.topWidget:		pwSpace
 +*pwSpaceL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 +*pwSpaceL.bottomWidget:		pwSpace
 +
 +*pwAddr.orientation:		HORIZONTAL
 +*pwAddr.leftAttachment:		ATTACH_FORM
 +*pwAddr.topAttachment:		ATTACH_FORM
 +*pwAddr.bottomAttachment:	ATTACH_WIDGET
 +*pwAddr.bottomWidget:		pwSpace
 +
 +! Data Window
 +*datw_popup.title:		Data Window
 +*datw_popup.geometry:		x225+0-0
 +*datw.defaultPosition:		False
 +
 +*datwH.alignment:		ALIGNMENT_BEGINNING
 +*datwH.leftAttachment:		ATTACH_FORM
 +*datwH.rightAttachment:		ATTACH_FORM
 +*datwH.topAttachment:		ATTACH_FORM
 +
 +*datwT.rows:			12
 +*datwT.editMode:		MULTI_LINE_EDIT
 +*datwT.editable:		False
 +*datwT.autoShowCursorPosition:	False
 +*datwT.cursorPositionVisible:	False
 +*datwT.resizeWidth:		True
 +*datwT.leftAttachment:		ATTACH_FORM
 +*datwT.rightAttachment:		ATTACH_FORM
 +*datwT.topAttachment:		ATTACH_WIDGET
 +*datwT.topWidget:		datwH
 +*datwT.bottomAttachment:	ATTACH_WIDGET
 +*datwT.bottomWidget:		datwS
 +*datwT.translations:		#override \n\
 +				<ConfigureNotify>:	dwResize()\n\
 +				<Key>osfPageDown:	SimCmd(df)\n\
 +				<Key>osfPageUp:		SimCmd(db)\n\
 +				<Key>osfDown:		SimCmd("df 1")\n\
 +				<Key>osfUp:		SimCmd("db 1")
 +
 +*datwS.leftAttachment:		ATTACH_FORM
 +*datwS.rightAttachment:		ATTACH_FORM
 +*datwS.bottomAttachment:	ATTACH_WIDGET
 +*datwS.bottomWidget:		datwRC
 +
 +*datwRC.adjustLast:		False
 +*datwRC.orientation:		HORIZONTAL
 +*datwRC.spacing:		10
 +*datwRC.leftAttachment:		ATTACH_FORM
 +*datwRC.rightAttachment:	ATTACH_FORM
 +*datwRC.bottomAttachment:	ATTACH_FORM
 +
 +! VGA Window
 +*vga_popup.title:		VGA Window
 +*vga_popup.geometry:		640x480+0-0
 +*vga.defaultPosition:		False
 +
 +*vgaH.alignment:		ALIGNMENT_BEGINNING
 +*vgaH.leftAttachment:		ATTACH_FORM
 +*vgaH.rightAttachment:		ATTACH_FORM
 +*vgaH.topAttachment:		ATTACH_FORM
 +
 +*vgaT.rows:			24
 +*vgaT.editMode:			MULTI_LINE_EDIT
 +*vgaT.editable:			False
 +*vgaT.autoShowCursorPosition:	False
 +*vgaT.cursorPositionVisible:	False
 +*vgaT.resizeWidth:		True
 +*vgaT.leftAttachment:		ATTACH_FORM
 +*vgaT.rightAttachment:		ATTACH_FORM
 +*vgaT.topAttachment:		ATTACH_WIDGET
 +*vgaT.topWidget:		vgaH
 +*vgaT.bottomAttachment:		ATTACH_WIDGET
 +*vgaT.bottomWidget:		vgaS
 +*vgaT.translations:		#override\n\
 +				<ConfigureNotify>:	dwResize()\n\
 +				<Key>osfPageDown:	SimCmd(vf)\n\
 +				<Key>osfPageUp:		SimCmd(vb)\n\
 +				<Key>osfDown:		SimCmd("vf 1")\n\
 +				<Key>osfUp:		SimCmd("vb 1")
 +
 +*vgaS.leftAttachment:		ATTACH_FORM
 +*vgaS.rightAttachment:		ATTACH_FORM
 +*vgaS.bottomAttachment:		ATTACH_WIDGET
 +*vgaS.bottomWidget:		vgaRC
 +
 +*vgaRC.adjustLast:		False
 +*vgaRC.orientation:		HORIZONTAL
 +*vgaRC.spacing:			10
 +*vgaRC.leftAttachment:		ATTACH_FORM
 +*vgaRC.rightAttachment:		ATTACH_FORM
 +*vgaRC.bottomAttachment:	ATTACH_FORM
 +*vgaRC.goto.sensitive:		False
 +
 +! Registers Window
 +*regw_popup.title:		Registers Window
 +*regw.noResize:			False
 +*regw_popup.geometry:		520x475-0-0
 +*regw.defaultPosition:		False
 +
 +!*regwP.marginHeight:		5
 +!*regwP.marginWidth:		10
 +!*regwP.refigureMode:		False
 +!*regwP.sashHeight:		20
 +!*regwP.sashWidth:		15
 +!*regwP.sashIdent:		-20
 +!*regwP.separatorOn:		False
 +!*regwP.spacing:			2
 +!*regwP.shadowThickness:		5
 +
 +*regwP.leftAttachment:		ATTACH_FORM
 +*regwP.rightAttachment:		ATTACH_FORM
 +*regwP.topAttachment:		ATTACH_FORM
 +*regwP.bottomAttachment:	ATTACH_WIDGET
 +*regwP.bottomWidget:		regwS
 +
 +*regwS.leftAttachment:		ATTACH_FORM
 +*regwS.rightAttachment:		ATTACH_FORM
 +*regwS.bottomAttachment:	ATTACH_WIDGET
 +*regwS.bottomWidget:		regwRC
 +
 +*regwRC.adjustLast:		False
 +*regwRC.orientation:		HORIZONTAL
 +*regwRC.spacing:		10
 +*regwRC.leftAttachment:		ATTACH_FORM
 +*regwRC.rightAttachment:	ATTACH_FORM
 +*regwRC.bottomAttachment:	ATTACH_FORM
 +
 +! Registers Window Configure Dialog
 +*rwConf_popup.title:		Registers Window Configuration
 +
 +*rwConfRC.adjustLast:		False
 +*rwConfRC.orientation:		HORIZONTAL
 +*rwConfRC.spacing:		10
 +*rwConfRC.leftAttachment:	ATTACH_FORM
 +*rwConfRC.rightAttachment:	ATTACH_FORM
 +*rwConfRC.bottomAttachment:	ATTACH_FORM
 +
 +*rwConfS.leftAttachment:	ATTACH_FORM
 +*rwConfS.rightAttachment:	ATTACH_FORM
 +*rwConfS.bottomAttachment:	ATTACH_WIDGET
 +*rwConfS.bottomWidget:		rwConfRC
 +
 +*rwConfT.orientation:		HORIZONTAL
 +*rwConfT.numColumns:		2
 +*rwConfT.packing:		PACK_COLUMN
 +*rwConfT.leftAttachment:	ATTACH_FORM
 +*rwConfT.rightAttachment:	ATTACH_FORM
 +*rwConfT.bottomAttachment:	ATTACH_WIDGET
 +*rwConfT.bottomWidget:		rwConfS
 +
 +*rwConfT.urs.labelString:	URs
 +*rwConfT.grs.labelString:	GRs
 +*rwConfT.frs.labelString:	FRs
 +*rwConfT.srs.labelString:	SRs
 +
 +! Symlist Window
 +*symlist_popup.title:		Symbols
 +*symlist_popup.geometry:	+300+100
 +
 +! Cmdhelp Window
 +*cmdhelp_popup.title:		Commands
 +*cmdhelp_popup.geometry:	+400+150
 +
 +! Callstack Window
 +*callstack_popup.title:		Call Stack
 +*callstack_popup.geometry:	+500+200
 +
 +! Breakpoint Window
 +*breakpoints_popup.title:	Breakpoints
 +*breakpoints_popup.geometry:	+600+250
 +
 +! Register Dump Window
 +*regdump_popup.title:		Register Dump
 +*regdump_popup.geometry:	+700+300
 +
 +! Program Dump Window
 +*progdump_popup.title:		Program Dump
 +*progdump_popup.geometry:	+800+350
 +
 +! Data Dump Window
 +*datadump_popup.title:		Data Dump
 +*datadump_popup.geometry:	+900+400
 +
 +! Instruction TLB Dump Window
 +*itlblist_popup.title:		Instruction TLB
 +
 +! Data TLB Dump Window
 +*dtlblist_popup.title:		Data TLB
 +
 +! See man-page for VirtualBindings(3) (included in OpenMotif):
 +*defaultVirtualBindings: \
 +	osfBackSpace:		<Key>BackSpace\n\
 +	osfPageDown:		<Key>Next\n\
 +	osfPageUp:		<Key>Prior\n\
 +	osfDown:		<Key>Down\n\
 +	osfUp:			<Key>Up\n

 patches/patch-src-line_separator.h ==========================================
 $NetBSD$

 Do not use carriage returns on unix which messes up ncurses display of code.

 --- src/line_separator.h.orig	2016-04-17 06:52:45.000000000 -0400
 +++ src/line_separator.h	2016-04-17 06:27:01.000000000 -0400
 @@ -0,0 +1,6 @@
 +/* XXX */
 +#if  defined(__CYGWIN__) || defined(_WIN32)
 +#define LINE_SEPARATOR "\r\n"
 +#else
 +#define LINE_SEPARATOR "\n"
 +#endif

 patches/patch-src_eparse.y ==========================================
 $NetBSD$

 Rename strtonum to strtonumber so will not get errors about duplicate functions.

 --- src/eparse.y.orig	2008-02-04 23:11:38.000000000 -0500
 +++ src/eparse.y	2016-04-17 13:31:45.000000000 -0400
 @@ -34,7 +34,7 @@
  extern int yylex (void );
  static REG convert(char);
  static REG rd8(REG);
 -static REG strtonum(char *, int);
 +static REG strtonumber(char *, int);
  static void yyerror(char *);

  %}
 @@ -164,18 +164,18 @@
          ;

  count   : based
 -        | NOBASE                { $$ = strtonum($1, 10); }
 +        | NOBASE                { $$ = strtonumber($1, 10); }
          ;

  number  : based
 -        | NOBASE                { $$ = strtonum($1, 16); }
 -        | NPFXHEX               { $$ = strtonum($1, 16); }
 +        | NOBASE                { $$ = strtonumber($1, 16); }
 +        | NPFXHEX               { $$ = strtonumber($1, 16); }
          ;

 -based   : BIN                   { $$ = strtonum($1, 2); }
 -        | OCT                   { $$ = strtonum($1, 8); }
 -        | DEC                   { $$ = strtonum($1, 10); }
 -        | HEX                   { $$ = strtonum($1, 16); }
 +based   : BIN                   { $$ = strtonumber($1, 2); }
 +        | OCT                   { $$ = strtonumber($1, 8); }
 +        | DEC                   { $$ = strtonumber($1, 10); }
 +        | HEX                   { $$ = strtonumber($1, 16); }
          ;

  %%
 @@ -197,7 +197,7 @@
      return memMRd(0, addr, 8, &dval) ? dval : 0;
  }

 -static REG strtonum(char *str, int base)
 +static REG strtonumber(char *str, int base)
  {
      REG num = 0;


 patches/patch-src_freebsd_signal.h ==========================================
 $NetBSD$

 Make FreeBSD version compile

 --- src/freebsd/signal.h.orig	2008-02-04 23:11:38.000000000 -0500
 +++ src/freebsd/signal.h	2016-04-17 13:25:40.000000000 -0400
 @@ -42,8 +42,35 @@
  		int	sigval_int;
  		ptr64	sigval_ptr;
  	} si_value;
 +
 +  /* XXX copied from /usr/include/sys/signal.h since si_band
 +   * is already #define'd there
 +   */
 +#if 0
  	long	si_band;
  	int	__spare__[7];
 +#else
 +	union   {
 +	  struct {
 +	    int     _trapno;/* machine specific trap code */
 +	  } _fault;
 +	  struct {
 +	    int     _timerid;
 +	    int     _overrun;
 +	  } _timer;
 +	  struct {
 +	    int     _mqd;
 +	  } _mesgq;
 +	  struct {
 +	    long    _band;          /* band event for SIGPOLL */
 +	  } _poll;                        /* was this ever used ? */
 +	  struct {
 +	    long    __spare1__;
 +	    int     __spare2__[7];
 +	  } __spare__;
 +	} _reason;
 +#endif
 +  
  };

  int signal_get_handler(int, struct sigaction64 *);

 patches/patch-src_program.c ==========================================
 $NetBSD$

 Use correct line separators.

 --- src/program.c.orig	2008-02-04 23:11:38.000000000 -0500
 +++ src/program.c	2016-04-17 06:24:07.000000000 -0400
 @@ -43,6 +43,7 @@
  #include "ia_exec.h"
  #include "state.h"
  #include "simmem.h"
 +#include "line_separator.h"

  static char instPtr(ADDR addr, char *dline);
  static IAinstInfoPtr addrToIAinfo(ADDR adr, BYTE iAmode, unsigned *nbytes);
 @@ -268,11 +269,11 @@
  	dasInit(DasPseudoOps|DasTemplate|DasRegNames, prgColumns - 20);
  	dasBundle(&bndl, i0Str, i1Str, i2Str);
  	ipp = instPtr(ofs, i0Str);
 -	p += sprintf(p, "%s%c%c %s %s\r\n", srcp, bpn, ipp, buf, i0Str);
 +	p += sprintf(p, "%s%c%c %s %s%s", srcp, bpn, ipp, buf, i0Str, LINE_SEPARATOR);
  	if (i1Str[0]) {		/* not MLX */
  	    bpn = ((i = isbpt(ofs + 4)) >= 0) ? (i + '0') : ' ';
  	    ipp = instPtr(ofs + 4, i1Str);
 -	    p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i1Str);
 +	    p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i1Str, LINE_SEPARATOR);
  	    bpn = ((i = isbpt(ofs + 8)) >= 0) ? (i + '0') : ' ';
  	    ipp = instPtr(ofs + 8, i2Str);
  	} else {		/* MLX */
 @@ -280,12 +281,12 @@
  		    ? (i + '0') : ' ';
  	    ipp = instPtr(ofs + 4, i2Str);
  	}
 -	p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i2Str);
 +	p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i2Str, LINE_SEPARATOR);
  	*asmrows = i1Str[0] ? 3 : 2;
      } else {
  xxx:
  	ipp = (ipGet(viewPid) == ofs) ? '>' : ' ';
 -	(void)sprintf(line, "%c%c %s xxxxxxxx\r\n", bpn, ipp, buf);
 +	(void)sprintf(line, "%c%c %s xxxxxxxx%s", bpn, ipp, buf, LINE_SEPARATOR);
  	*srcrows = 0;
  	*asmrows = 1;
      }

 patches/patch-src_ssDCmd.c ==========================================
 $NetBSD$

 Use correct line separators.

 --- src/ssDCmd.c.orig	2008-02-04 23:11:38.000000000 -0500
 +++ src/ssDCmd.c	2016-04-17 06:26:02.000000000 -0400
 @@ -42,6 +42,7 @@
  #include "libcore.h"
  #include "dos.h"
  #include "libtrace.h"
 +#include "line_separator.h"

  #define MAXFILEDEPTH	16
  #define MAXCMDLEN	4000
 @@ -630,7 +631,7 @@
  	    p = strtok(NULL, " \t");
  	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
  	    adr = (seg << 4) + ofs + start + symOffset;
 -        if ((p = strtok(NULL, " \t\r\n")))
 +	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
  		symInsert(p, adr, 0);
  	}
  	(void)fclose(fp);
 @@ -733,7 +734,7 @@
  	    p = strtok(NULL, " \t");
  	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
  	    adr = (seg << 4) + ofs + start;
 -	    if ((p = strtok(NULL, " \t\r\n")))
 +	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
  		symInsert(p, adr, 0);
  	}
  	(void)fclose(fp);

 patches/patch-src_ssX.c ==========================================
 $NetBSD$

 Find default X resource file.

 --- src/ssX.c.orig	2008-02-04 23:11:37.000000000 -0500
 +++ src/ssX.c		2016-04-28 09:45:23.000000000 -0400
 @@ -49,6 +49,7 @@
  #include "coreui.h"
  #include "ssDCmd.h"
  #include "libcore.h"
 +#include "line_separator.h"

  #if 0
  /* Include files not needed for now in the simulator */
 @@ -174,6 +175,24 @@
      Arg args[10];
      unsigned i, n;
      int argc = 0;
 +    const char* xenv = "XENVIRONMENT";
 +    const char* genv = getenv(xenv);
 +    const char* xski_rc = "XSKI_RESOURCE_FILE";
 +    
 +    /*
 +     * XXX how to add pkgsrc paths to X app-default search path?  For
 +     * simplicity, just set environment variable or give warning if
 +     * already set.  If XSki app-defaults not found, xski will display
 +     * jumbled gui but doesn't look like it can run.
 +     */
 +    if (genv && (strcmp(genv, xski_rc) != 0)) {
 +	printf("WARNING: If GUI not displayed correctly, try setting "
 +	       "environment variable \"%s\" to \"%s\"%s",
 +	       xenv, xski_rc, LINE_SEPARATOR);
 +    }
 +    else {
 +	setenv(xenv, xski_rc, 0);
 +    }

      addRegwRsrcOpts();
      addDatwRsrcOpts();

Responsible-Changed-From-To: pkg-manager->cherry
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 29 Apr 2016 13:32:33 +0000
Responsible-Changed-Why:
Over to maintainer.


From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Fri, 6 May 2016 15:29:40 -0400

 Below is another patch that fixes newline/carriage problems for
 ski-fake-xterm with both skiload and netbsd kernel printouts.

 I'm getting close to having the ski emulator run a SKI kernel, here is
 a dmesg from the sim.  It seems like there still is an off-by-one bug
 with doSSC system call not decoding args/registers that I don't
 totally understand yet.  I don't know if the problem is a ski or
 kernel issue yet, but with my hack I can get console messages.

 By the way, this sim output and real hardware
 (http://gnats.netbsd.org/49717), look like they die at about the same
 place (pmap.c/pmap.h doesn't work).  One thing ski still doesn't do is
 decode source code lines which is probably the next thing to look at
 after doSSC() issues are sorted.

 Console: ia64 SKI console

 NetBSD/ia64 ia64 SKI boot, Revision 0.1 (Fri May  6 08:30:01 EDT 2016)


 Type '?' for a list of commands, 'help' for more detailed help.
 OK boot
 8727568+108376+117048 [150964+197184+132624]=0x8e3110
 netbsd entry at 0xe000000004008000
 Entering netbsd at 0xe000000004008000...
 PAL code mapped by the kernel's TR
 PAL Proc at 0xe000000000101790
 SAL Proc at 0xe000000000101890, GP at 0xe0000000001a04b8
 SAL: AP wake-up vector: 0xff
 Platform clock frequency 133338184 Hz
 Processor ratio 11/2, Bus ratio 1/1, ITC ratio 11/2
 MD 0xe0000000001a0060: type 13 pa 0x100000 cnt 0x400
 MD 0xe0000000001a0088: type 7 pa 0x500000 cnt 0x8000
 Descriptor 0xe0000000001a0088 contains kernel
 Loading chunk before kernel: 0x140 / 0x1000
 Loading chunk after kernel: 0x123a / 0x2140
 MD 0xe0000000001a00b0: type 7 pa 0x100000000 cnt 0x4000
 Skipping memory chunk start 0x100000000
 MD 0xe0000000001a00d8: type 12 pa 0xffffc000000 cnt 0x4000
 ptc.e base=0x0, count1=1, count2=1, stride1=0x0, stride2=0x0
 Processor supports 18 Region ID bits
 Trying VHPT size 0x10000
 Putting VHPT at 0xe000000000590000
 vhpt base = e000000000590000 
 vhpt size = 10000 
 Loaded initial symtab at 0xe0000000048928c0, strtab at 0xe0000000048c2b00, # entries 8191
 pmap_reference(0xe000000004853ec0)
 Detected memory  = 134217728 (128 MB)
 Physical memory chunk(s):
 0x0000000000588000 - 0x000000000058ffff, 32768 bytes (2 pages)
 0x00000000006cc000 - 0x0000000003ffffff, 59981824 bytes (3661 pages)
 0x00000000048e8000 - 0x00000000084fffff, 63012864 bytes (3846 pages)
 Total number of segments: vm_nphysseg = 3 
 pmap_reference(0xe000000004853ec0)
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 7.99.29 (GENERIC.SKI) #6: Fri May  6 09:38:57 EDT 2016
         scole@dstar:/home/scole/nbsd/src/sys/arch/ia64/compile/obj/GENERIC.SKI
 total memory = 128 MB
 avail memory = 117 MB
 Warning: no FPSWA package supplied
 Table 'APIC' at 0xe00000000011fa00
 pmap_reference(0xe000000004853ec0)
 pmap_reference(0xe000000004853ec0)

 fatal kernel trap (cpu 0):

     trap vector = 0x14 (Page Not Present)
     cr.iip      = 0xe0000000040125c0
     cr.ipsr     = 0x1010080a2010 (mfl,ic,dt,dfh,rt,cpl=0,it,ri=0,bn)
     cr.isr      = 0x400000000 (code=0,vector=0,r,ei=0)
     cr.ifa      = 0x68
     curlwp   = 0xe000000004839c80
         pid = 0, comm = system

 Stopped in pid 0.1 (system) at  netbsd:cpu_lwp_fork+0x340:      [M0]    ld8 r15=
 r15
 db> bt
 --Kernel Call Trace--
 cpu_lwp_fork(...)
 uvm_lwp_fork(...)
 lwp_create(...)
 kthread_create(...)
 create_idle_lwp(...)
 mi_cpu_attach(...)
 main(...)
 start(...)


 Index: patch-an
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-an,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-an
 --- patch-an	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patch-an	6 May 2016 19:03:51 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-an,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

  --- src/netbsd/ssc-netbsd.c.orig	2010-11-04 05:01:51.000000000 +0000
 -+++ src/netbsd/ssc-netbsd.c
 -@@ -0,0 +1,463 @@
 ++++ src/netbsd/ssc-netbsd.c	2016-05-06 14:44:42.000000000 -0400
 +@@ -0,0 +1,464 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -103,6 +103,7 @@
  +	tcgetattr(fin, &tios);
  +	saved_tios = tios;
  +	tios.c_lflag &= ~(ICANON|ECHO);
 ++	tios.c_iflag &= ~(ICRNL);	/* do not map CR to NL on input */
  +	tcsetattr(fin, TCSANOW, &tios);
  +	atexit(restore_tios);
  +	fdin = fin;


From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: martin@NetBSD.org
Subject: Re: pkg/51103: Updates for ski emulator
Date: Thu, 12 May 2016 20:26:10 -0400

 So here is a patch to get basic ski console output working.  The ski
 simulator was decoding the wrong registers in ssccnputc() due to
 automagically inlined ssc() which contains a "break" simulated system
 call.

 The ski loader "skiload" has almost exactly the same inline assembly
 call for ssc(), but for whatever reason, (maybe ssc() and
 ski_cons_putchar() are in different files?), the ssc() function didn't
 get inlined and I/O worked fine.

 If there is a better way to fix, feel free. If I should open another
 PR because this is part of src/ and not pkgsrc/ please let me know.

 So with this patch I claim there is enough to say the emulator is
 "working".

 Thanks

 Index: ssc.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/ia64/ia64/ssc.c,v
 retrieving revision 1.4
 diff -b -u -r1.4 ssc.c
 --- ssc.c	27 Oct 2012 17:17:57 -0000	1.4
 +++ ssc.c	13 May 2016 00:03:03 -0000
 @@ -46,6 +46,7 @@
  void ssccnpollc(dev_t, int);


 +__attribute__ ((noinline))
  uint64_t
  ssc(uint64_t in0, uint64_t in1, uint64_t in2, uint64_t in3, int which)
  {

From: "Mathew\, Cherry G." <cherry@zyx.in>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,  pkgsrc-bugs@netbsd.org,  scole_mail@gmx.com, wiz@NetBSD.org, kochi@NetBSD.org
Subject: Re: pkg/51103: Updates for ski emulator
Date: Fri, 13 May 2016 07:33:13 +0530

 >>>>> "scole" == scole mail <scole_mail@gmx.com> writes:

     scole> The following reply was made to PR pkg/51103; it has been
     scole> noted by GNATS.  From: scole_mail <scole_mail@gmx.com> To:
     scole> gnats-bugs@NetBSD.org Cc: martin@NetBSD.org Subject: Re:
     scole> pkg/51103: Updates for ski emulator Date: Thu, 12 May 2016
     scole> 20:26:10 -0400

     scole>  So here is a patch to get basic ski console output working.
     scole> The ski simulator was decoding the wrong registers in
     scole> ssccnputc() due to automagically inlined ssc() which contains
     scole> a "break" simulated system call.

 Hi - thank you for all your wonderful work!

     scole>  The ski loader "skiload" has almost exactly the same inline
     scole> assembly call for ssc(), but for whatever reason, (maybe
     scole> ssc() and ski_cons_putchar() are in different files?), the
     scole> ssc() function didn't get inlined and I/O worked fine.

     scole>  If there is a better way to fix, feel free. If I should open
     scole> another PR because this is part of src/ and not pkgsrc/
     scole> please let me know.

 I am not in a position to look at this for a couple of weeks, I'm Cc:ing
 the port maintainer and wiz@ to alert them.

     scole>  So with this patch I claim there is enough to say the
     scole> emulator is "working".


 This is wonderful news! I will try it out in early June.

 [OT] your mailhost doesn't accept email from mine. 

 -- 
 ~cherry

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: wiz@NetBSD.org, kochi@NetBSD.org, cherry@zyx.in
Subject: Re: pkg/51103: Updates for ski emulator
Date: Fri, 13 May 2016 09:00:11 -0400

 Since there hasn't been much activity on ia64 recently, I was planning
 to look at pmap next, since it seems relatively self-contained and
 where the kernel looks likes like it is dying presently.

 I'm probably not the optimum person for that work; if someone else is
 working that or another issue would be more useful, let me know.
 Unfortunately I don't have a lot of experience with itanium or netbsd
 kernel internals but am wanting to get more experience with both.

 Thanks

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, cherry@NetBSD.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, scole_mail@gmx.com
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Fri, 13 May 2016 11:14:51 -0400

 On May 13,  1:05pm, scole_mail@gmx.com (scole_mail) wrote:
 -- Subject: Re: pkg/51103: Updates for ski emulator

 Nobody is working on this at the moment, so go for it!

 christos

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Sat, 14 May 2016 08:37:54 -0400

 I just noticed in my changes that pkgsrc/emulators/ski/Makefile has
 this line:

 	INSTALLATION_DIRS+=	share/doc/ski

 which is wrong, not needed, and should be removed.

 Thanks

From: "Mathew\, Cherry G." <cherry@zyx.in>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,  pkgsrc-bugs@netbsd.org,  scole_mail@gmx.com
Subject: Re: pkg/51103: Updates for ski emulator
Date: Sun, 15 May 2016 04:10:59 +0530

 >>>>> "scole" == scole mail <scole_mail@gmx.com> writes:

     scole> The following reply was made to PR pkg/51103; it has been
     scole> noted by GNATS.  From: scole_mail <scole_mail@gmx.com> To:
     scole> gnats-bugs@NetBSD.org Cc: Subject: Re: pkg/51103: Updates for
     scole> ski emulator Date: Sat, 14 May 2016 08:37:54 -0400

     scole>  I just noticed in my changes that
     scole> pkgsrc/emulators/ski/Makefile has this line:

     scole>  	INSTALLATION_DIRS+= share/doc/ski

     scole>  which is wrong, not needed, and should be removed.

 Hi,

 Could you please post a full patch I could try ?

 Also, your mailhost doesn't accept email from mine - an alternative
 email address would be functional to communicate (other than via
 gnats).

 -- 
 ~cherry

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: cherry@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/51103: Updates for ski emulator
Date: Sat, 14 May 2016 19:32:00 -0400

 On Sat, May 14, 2016 at 10:45:01PM +0000, Mathew, Cherry G. wrote:
 >  
 >  Hi,
 >  
 >  Could you please post a full patch I could try ?
 >  
 >  Also, your mailhost doesn't accept email from mine - an alternative
 >  email address would be functional to communicate (other than via
 >  gnats).
 >  
 >  -- 
 >  ~cherry
 >  

 Here is a full patch.  Also, I attempted to whitelist your zyx.in email
 address, let me know if you still have issues.

 Thanks!

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/Makefile,v
 retrieving revision 1.17
 diff -b -u -r1.17 Makefile
 --- Makefile	18 Aug 2015 07:31:07 -0000	1.17
 +++ Makefile	14 May 2016 23:03:44 -0000
 @@ -2,13 +2,17 @@
  #

  DISTNAME=	ski-1.3.2
 -PKGREVISION=	2
 +PKGREVISION=	3
  CATEGORIES=	emulators
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ski/}

  MAINTAINER=	cherry@zyx.in
  HOMEPAGE=	http://ski.sourceforge.net/
  COMMENT=	The ia64 instruction set simulator
 +LICENSE=	gnu-gpl-v2
 +
 +.include "../../mk/bsd.prefs.mk"
 +.include "options.mk"

  BUILD_DEPENDS+= libelf>=0.8.13:../../devel/libelf

 @@ -22,14 +26,25 @@
  USE_LIBTOOL=	yes
  USE_NCURSES=	yes

 +SUBST_CLASSES+=		xski-app
 +SUBST_STAGE.xski-app=	pre-configure
 +SUBST_MESSAGE.xski-app=	Fixing X11 Makefile.am app-default paths.
 +SUBST_FILES.xski-app=	Makefile.am
 +SUBST_SED.xski-app=	-e 's,/etc/X11/app-defaults,${PREFIX}/lib/X11/app-defaults,g'
 +
 +SUBST_CLASSES+=		ssx-app
 +SUBST_STAGE.ssx-app=	post-patch
 +SUBST_MESSAGE.ssx-app=	Fixing X11 ssX.c app-default paths.
 +SUBST_FILES.ssx-app=	src/ssX.c
 +SUBST_SED.ssx-app=	-e 's,XSKI_RESOURCE_FILE,${PREFIX}/lib/X11/app-defaults/XSki,g'
 +
  pre-configure:
  #	cd  ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./autogen.sh ${CONFIGURE_ARGS}
  	cd ${WRKSRC} && autoreconf -fi -I macros

  post-install:
 -	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/app-defaults
 -	${INSTALL_DATA} ${WRKSRC}/src/XSki \
 -			${DESTDIR}${PREFIX}/lib/X11/app-defaults/XSki
 +	${INSTALL_DATA} ${WRKSRC}/doc/manual/SkiManualMasterDoc.pdf \
 +			${DESTDIR}${PREFIX}/share/ski

  .include "../../devel/gperf/buildlink3.mk"
  .include "../../devel/libelf/buildlink3.mk"

From: "Mathew\, Cherry G." <cherry@zyx.in>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,  pkgsrc-bugs@netbsd.org,  scole_mail@gmx.com
Subject: Re: pkg/51103: Updates for ski emulator
Date: Sun, 15 May 2016 06:55:35 +0530

 >>>>> "scole" == scole mail <scole_mail@gmx.com> writes:


 [...]


     scole>  Here is a full patch.  

 Hi, your patch seems to be incomplete (and does not apply cleanly to
 emulators/ski/

 For eg: you have a: ..include "options.mk"
 line, but there is not patch to add options.mk

 etc.

     scole> Also, I attempted to whitelist your zyx.in email address, let
     scole> me know if you still have issues.

 Thank you - I will test this - the problem seems to be that gmx.com
 seems to want reverse DNS, and I run email off of my PC connected to a
 DSL ISP which doesn't provide reverse DNS. It works for most email
 providers I send email to, except some, like gmx

 -- 
 ~cherry

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Sun, 15 May 2016 10:27:22 -0400

 Here is everything again with new files in patch form.

 Thanks

 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ options.mk	2016-05-15 09:37:22.000000000 -0400
 @@ -0,0 +1,33 @@
 +# $NetBSD$
 +
 +PKG_OPTIONS_VAR=	PKG_OPTIONS.ski
 +PKG_SUPPORTED_OPTIONS=	debug gtk motif
 +#PKG_SUGGESTED_OPTIONS=	debug motif
 +PKG_SUGGESTED_OPTIONS=	debug motif gtk
 +
 +.include "../../mk/bsd.options.mk"
 +
 +.if !empty(PKG_OPTIONS:Mdebug)
 +CPPFLAGS+=		-g
 +INSTALL_UNSTRIPPED=	yes
 +.endif
 +
 +PLIST_VARS+=		xski
 +.if !empty(PKG_OPTIONS:Mmotif)
 +PLIST.xski=		yes
 +CONFIGURE_ARGS+=	--with-x11
 +INSTALLATION_DIRS+=	lib/X11/app-defaults
 +
 +.include "../../fonts/fontconfig/buildlink3.mk"
 +.include "../../graphics/freetype2/buildlink3.mk"
 +.include "../../x11/motif/buildlink3.mk"
 +.endif
 +
 +PLIST_VARS+=		gski
 +.if !empty(PKG_OPTIONS:Mgtk)
 +PLIST.gski=		yes
 +CONFIGURE_ARGS+=	--with-gtk
 +
 +.include "../../devel/libglade/buildlink3.mk"
 +.include "../../devel/libgnomeui/buildlink3.mk"
 +.endif
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-XSki.netbsd	2016-05-15 09:37:22.000000000 -0400
 @@ -0,0 +1,483 @@
 +$NetBSD$
 +
 +Include X resource file for NetBSD which is a copy of the FreeBSD one.
 +
 +--- XSki.netbsd.orig	2016-04-19 12:56:13.000000000 -0400
 ++++ XSki.netbsd	2016-04-19 12:56:25.000000000 -0400
 +@@ -0,0 +1,476 @@
 ++!
 ++! Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
 ++!
 ++! This program is free software; you can redistribute it and/or modify
 ++! it under the terms of the GNU General Public License as published by
 ++! the Free Software Foundation; either version 2 of the License, or 
 ++! (at your option) any later version.
 ++!
 ++! This program is distributed in the hope that it will be useful, 
 ++! but WITHOUT ANY WARRANTY; without even the implied warranty of 
 ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 ++! GNU General Public License for more details.
 ++!
 ++! You should have received a copy of the GNU General Public License along
 ++! with this program; if not, write to the Free Software Foundation, Inc.,
 ++! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ++!
 ++
 ++! *XmText.fontList:	<font>
 ++
 ++*background:		rgb:C0/C0/C0
 ++main.geometry:		+0+0
 ++
 ++*showUrs:		True
 ++*showGrs:		True
 ++*showFrs:		True
 ++*showSrs:		True
 ++*showIArs:		True
 ++
 ++*regwUrs.rows:		7
 ++*regwGrs.rows:		7
 ++*regwFrs.rows:		4
 ++*regwSrs.rows:		2
 ++*regwIArs.rows:		4
 ++
 ++*viewProgram:		True
 ++*viewData:		True
 ++*viewvga:		False
 ++*viewRegisters:		True
 ++
 ++*help.sensitive:	False
 ++*bb4.sensitive:		False
 ++*bb5.sensitive:		False
 ++*prgwRC.goto.sensitive:	False
 ++*datwRC.goto.sensitive:	False
 ++
 ++*File.mnemonic:		F
 ++*View.mnemonic:		V
 ++*Configure.mnemonic:	C
 ++*Help.mnemonic:		H
 ++
 ++*load.labelString:	Open...
 ++*load.mnemonic:		O
 ++*save.labelString:	Save...
 ++*save.mnemonic:		S
 ++*trace.labelString:	Trace...
 ++*trace.mnemonic:	T
 ++*traceOn.labelString:	Enable Trace
 ++*traceOff.labelString:	Disable Trace
 ++*read.labelString:	Read...
 ++*read.mnemonic:		R
 ++*quit.labelString:	Quit
 ++*quit.mnemonic:		Q
 ++
 ++*LoadFSD.fileTypeMask:	FILE_REGULAR
 ++*LoadFSD.textColumns:	50
 ++*load_syms.labelString:	Load all symbols
 ++*load_syms.alignment:	ALIGNMENT_BEGINNING
 ++
 ++*program.labelString:	Program
 ++*program.mnemonic:	P
 ++*data.labelString:	Data
 ++*data.mnemonic:		D
 ++*registers.labelString:	Registers
 ++*registers.mnemonic:	R
 ++*cache.labelString:	Cache
 ++*cache.mnemonic:	C
 ++*tlb.labelString:	TLB
 ++*tlb.mnemonic:		T
 ++*callstack.labelString:	Call Stack
 ++*breakpoints.labelString:	Breakpoints
 ++*breakpoints.mnemonic:	B
 ++*symbols.labelString:	Symbols
 ++*symbols.mnemonic:	S
 ++
 ++*context.labelString:	Context-Sensitive Help
 ++*context.mnemonic:	C
 ++*overview.labelString:	Overview
 ++*overview.mnemonic:	O
 ++*commands.labelString:	Commands
 ++*product.labelString:	Product Information
 ++*product.mnemonic:	P
 ++
 ++*loadFSD_popup.title:	Open File
 ++*prodInfo_popup.title:	Help -- Product Information
 ++
 ++! Processor Selection
 ++*p0.labelString:		0
 ++*p1.labelString:		1
 ++*p2.labelString:		2
 ++*procOption.labelString:	Processor
 ++
 ++! Button Box
 ++*bbox.orientation:	HORIZONTAL
 ++*bbox.packing:		PACK_TIGHT
 ++*bb0.labelString:	Step
 ++*bb0.translations:	Shift<Btn1Down>: SimCmd("step 10")\n\
 ++			<Btn1Down>: SimCmd("step 1")
 ++*bb1.labelString:	Run
 ++*bb1.translations:	<Btn1Down>: SimCmd("run")
 ++*bb2.labelString:	Prog
 ++*bb2.translations:	<Btn1Down>: SimCmd("pj")
 ++*bb3.labelString:	Data
 ++*bb3.translations:	<Btn1Down>: SimCmd("dj")
 ++*bb4.labelString:	Regs
 ++*bb5.labelString:	Cache
 ++*bb6.labelString:	TLB
 ++*bb6.translations:	<Btn1Down>: SimCmd("sdt")
 ++*bb7.labelString:	Quit
 ++*bb7.translations:	<Btn1Down>: SimCmd("quit")
 ++
 ++*cmd.promptString:		Command:
 ++*cmd.historyVisibleItemCount:	5
 ++*cmd.textColumns:		45
 ++
 ++*msgs.editMode:			MULTI_LINE_EDIT
 ++*msgs.editable:			False
 ++*msgs.cursorPositionVisible:	False
 ++*msgs.rows:			10
 ++
 ++! Generic Pushbutton resources
 ++*ok.labelString:	OK
 ++*apply.labelString:	Apply
 ++*cancel.labelString:	Cancel
 ++*close.labelString:	Close
 ++*config.labelString:	Configure
 ++*goto.labelString:	Goto
 ++*help.labelString:	Help
 ++
 ++*real.labelString:	Real
 ++*virtual.labelString:	Virtual
 ++
 ++! Program Window
 ++! These 3 are not currently used
 ++*prgw.cancelLabelString:	Cancel
 ++*prgw.helpLabelString:		Help
 ++*prgw.okLabelString:		OK
 ++
 ++*prgw_popup.title:		Program Window
 ++*prgw_popup.geometry:		550-0+0
 ++*prgw.defaultPosition:		False
 ++
 ++*prgwH.alignment:		ALIGNMENT_BEGINNING
 ++*prgwH.leftAttachment:		ATTACH_FORM
 ++*prgwH.rightAttachment:		ATTACH_FORM
 ++*prgwH.topAttachment:		ATTACH_FORM
 ++
 ++*prgwT.rows:			21
 ++*prgwT.editMode:		MULTI_LINE_EDIT
 ++*prgwT.editable:		False
 ++*prgwT.autoShowCursorPosition:	False
 ++*prgwT.cursorPositionVisible:	False
 ++*prgwT.resizeHeight:		False
 ++*prgwT.resizeWidth:		False
 ++! *prgwT.resizeWidth:		True
 ++*prgwT.leftAttachment:		ATTACH_FORM
 ++*prgwT.rightAttachment:		ATTACH_FORM
 ++*prgwT.topAttachment:		ATTACH_WIDGET
 ++*prgwT.topWidget:		prgwH
 ++*prgwT.bottomAttachment:	ATTACH_WIDGET
 ++*prgwT.bottomWidget:		prgwS
 ++*prgwT.translations:		#override\n\
 ++				<ConfigureNotify>:	pwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(pf)\n\
 ++				<Key>osfPageUp:		SimCmd(pb)\n\
 ++				<Key>osfDown:		SimCmd("pf 1")\n\
 ++				<Key>osfUp:		SimCmd("pb 1")
 ++
 ++*prgwS.leftAttachment:		ATTACH_FORM
 ++*prgwS.rightAttachment:		ATTACH_FORM
 ++*prgwS.bottomAttachment:	ATTACH_WIDGET
 ++*prgwS.bottomWidget:		prgwRC
 ++
 ++*prgwRC.adjustLast:		False
 ++*prgwRC.orientation:		HORIZONTAL
 ++*prgwRC.spacing:		10
 ++*prgwRC.leftAttachment:		ATTACH_FORM
 ++*prgwRC.rightAttachment:	ATTACH_FORM
 ++*prgwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! Program Window Configure Dialog
 ++*pwConf_popup.title:		Program Window Configuration
 ++
 ++*pwConfRC.adjustLast:		False
 ++*pwConfRC.orientation:		HORIZONTAL
 ++*pwConfRC.spacing:		10
 ++*pwConfRC.leftAttachment:	ATTACH_FORM
 ++*pwConfRC.rightAttachment:	ATTACH_FORM
 ++*pwConfRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*pwConfS.leftAttachment:	ATTACH_FORM
 ++*pwConfS.rightAttachment:	ATTACH_FORM
 ++*pwConfS.bottomAttachment:	ATTACH_WIDGET
 ++*pwConfS.bottomWidget:		pwConfRC
 ++
 ++*iofs.labelString:	Instruction Offset Format:
 ++*iofs.rightAttachment:	ATTACH_WIDGET
 ++*iofs.rightWidget:	iofsrb
 ++*iofs.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*iofs.topWidget:	iofsrb
 ++*iofs.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*iofs.bottomWidget:	iofsrb
 ++
 ++*iofsrb.orientation:		HORIZONTAL
 ++*iofsrb.bottomAttachment:	ATTACH_WIDGET
 ++*iofsrb.bottomWidget:		instrb
 ++*iofsrb.bottomOffset:		2
 ++*iofsrb.rightAttachment:	ATTACH_FORM
 ++
 ++*iofshex.labelString:	Hexadecimal
 ++
 ++*iofssym.labelString:	Symbolic
 ++
 ++*iofsboth.labelString:	Both
 ++
 ++*inst.labelString:	Instruction Format:
 ++*inst.rightAttachment:	ATTACH_WIDGET
 ++*inst.rightWidget:	instrb
 ++*inst.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*inst.topWidget:	instrb
 ++*inst.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*inst.bottomWidget:	instrb
 ++
 ++*instrb.orientation:		HORIZONTAL
 ++*instrb.bottomAttachment:	ATTACH_WIDGET
 ++*instrb.bottomWidget:		pwConfS
 ++*instrb.bottomOffset:		2
 ++*instrb.rightAttachment:	ATTACH_FORM
 ++
 ++*insthex.labelString:	Hexadecimal
 ++
 ++*instsym.labelString:	Disassembled
 ++
 ++*instboth.labelString:	Both
 ++
 ++! Program Window Goto Dialog
 ++*pwGoto_popup.title:		Program Window Goto
 ++
 ++*pwGotoRC.adjustLast:		False
 ++*pwGotoRC.orientation:		HORIZONTAL
 ++*pwGotoRC.spacing:		10
 ++*pwGotoRC.leftAttachment:	ATTACH_FORM
 ++*pwGotoRC.rightAttachment:	ATTACH_FORM
 ++*pwGotoRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*pwGotoS.leftAttachment:	ATTACH_FORM
 ++*pwGotoS.rightAttachment:	ATTACH_FORM
 ++*pwGotoS.bottomAttachment:	ATTACH_WIDGET
 ++*pwGotoS.bottomWidget:		pwGotoRC
 ++
 ++*pwOffset.rightAttachment:	ATTACH_FORM
 ++*pwOffset.bottomAttachment:	ATTACH_WIDGET
 ++*pwOffset.bottomWidget:		pwGotoS
 ++
 ++*pwOffsetL.labelString:		Offset:
 ++*pwOffsetL.rightAttachment:	ATTACH_WIDGET
 ++*pwOffsetL.rightWidget:		pwOffset
 ++*pwOffsetL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwOffsetL.topWidget:		pwOffset
 ++*pwOffsetL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwOffsetL.bottomWidget:	pwOffset
 ++
 ++*pwSpace.rightAttachment:	ATTACH_FORM
 ++*pwSpace.bottomAttachment:	ATTACH_WIDGET
 ++*pwSpace.bottomWidget:		pwOffset
 ++
 ++*pwSpaceL.labelString:		Space:
 ++*pwSpaceL.rightAttachment:	ATTACH_WIDGET
 ++*pwSpaceL.rightWidget:		pwSpace
 ++*pwSpaceL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwSpaceL.topWidget:		pwSpace
 ++*pwSpaceL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwSpaceL.bottomWidget:		pwSpace
 ++
 ++*pwAddr.orientation:		HORIZONTAL
 ++*pwAddr.leftAttachment:		ATTACH_FORM
 ++*pwAddr.topAttachment:		ATTACH_FORM
 ++*pwAddr.bottomAttachment:	ATTACH_WIDGET
 ++*pwAddr.bottomWidget:		pwSpace
 ++
 ++! Data Window
 ++*datw_popup.title:		Data Window
 ++*datw_popup.geometry:		x225+0-0
 ++*datw.defaultPosition:		False
 ++
 ++*datwH.alignment:		ALIGNMENT_BEGINNING
 ++*datwH.leftAttachment:		ATTACH_FORM
 ++*datwH.rightAttachment:		ATTACH_FORM
 ++*datwH.topAttachment:		ATTACH_FORM
 ++
 ++*datwT.rows:			12
 ++*datwT.editMode:		MULTI_LINE_EDIT
 ++*datwT.editable:		False
 ++*datwT.autoShowCursorPosition:	False
 ++*datwT.cursorPositionVisible:	False
 ++*datwT.resizeWidth:		True
 ++*datwT.leftAttachment:		ATTACH_FORM
 ++*datwT.rightAttachment:		ATTACH_FORM
 ++*datwT.topAttachment:		ATTACH_WIDGET
 ++*datwT.topWidget:		datwH
 ++*datwT.bottomAttachment:	ATTACH_WIDGET
 ++*datwT.bottomWidget:		datwS
 ++*datwT.translations:		#override \n\
 ++				<ConfigureNotify>:	dwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(df)\n\
 ++				<Key>osfPageUp:		SimCmd(db)\n\
 ++				<Key>osfDown:		SimCmd("df 1")\n\
 ++				<Key>osfUp:		SimCmd("db 1")
 ++
 ++*datwS.leftAttachment:		ATTACH_FORM
 ++*datwS.rightAttachment:		ATTACH_FORM
 ++*datwS.bottomAttachment:	ATTACH_WIDGET
 ++*datwS.bottomWidget:		datwRC
 ++
 ++*datwRC.adjustLast:		False
 ++*datwRC.orientation:		HORIZONTAL
 ++*datwRC.spacing:		10
 ++*datwRC.leftAttachment:		ATTACH_FORM
 ++*datwRC.rightAttachment:	ATTACH_FORM
 ++*datwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! VGA Window
 ++*vga_popup.title:		VGA Window
 ++*vga_popup.geometry:		640x480+0-0
 ++*vga.defaultPosition:		False
 ++
 ++*vgaH.alignment:		ALIGNMENT_BEGINNING
 ++*vgaH.leftAttachment:		ATTACH_FORM
 ++*vgaH.rightAttachment:		ATTACH_FORM
 ++*vgaH.topAttachment:		ATTACH_FORM
 ++
 ++*vgaT.rows:			24
 ++*vgaT.editMode:			MULTI_LINE_EDIT
 ++*vgaT.editable:			False
 ++*vgaT.autoShowCursorPosition:	False
 ++*vgaT.cursorPositionVisible:	False
 ++*vgaT.resizeWidth:		True
 ++*vgaT.leftAttachment:		ATTACH_FORM
 ++*vgaT.rightAttachment:		ATTACH_FORM
 ++*vgaT.topAttachment:		ATTACH_WIDGET
 ++*vgaT.topWidget:		vgaH
 ++*vgaT.bottomAttachment:		ATTACH_WIDGET
 ++*vgaT.bottomWidget:		vgaS
 ++*vgaT.translations:		#override\n\
 ++				<ConfigureNotify>:	dwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(vf)\n\
 ++				<Key>osfPageUp:		SimCmd(vb)\n\
 ++				<Key>osfDown:		SimCmd("vf 1")\n\
 ++				<Key>osfUp:		SimCmd("vb 1")
 ++
 ++*vgaS.leftAttachment:		ATTACH_FORM
 ++*vgaS.rightAttachment:		ATTACH_FORM
 ++*vgaS.bottomAttachment:		ATTACH_WIDGET
 ++*vgaS.bottomWidget:		vgaRC
 ++
 ++*vgaRC.adjustLast:		False
 ++*vgaRC.orientation:		HORIZONTAL
 ++*vgaRC.spacing:			10
 ++*vgaRC.leftAttachment:		ATTACH_FORM
 ++*vgaRC.rightAttachment:		ATTACH_FORM
 ++*vgaRC.bottomAttachment:	ATTACH_FORM
 ++*vgaRC.goto.sensitive:		False
 ++
 ++! Registers Window
 ++*regw_popup.title:		Registers Window
 ++*regw.noResize:			False
 ++*regw_popup.geometry:		520x475-0-0
 ++*regw.defaultPosition:		False
 ++
 ++!*regwP.marginHeight:		5
 ++!*regwP.marginWidth:		10
 ++!*regwP.refigureMode:		False
 ++!*regwP.sashHeight:		20
 ++!*regwP.sashWidth:		15
 ++!*regwP.sashIdent:		-20
 ++!*regwP.separatorOn:		False
 ++!*regwP.spacing:			2
 ++!*regwP.shadowThickness:		5
 ++
 ++*regwP.leftAttachment:		ATTACH_FORM
 ++*regwP.rightAttachment:		ATTACH_FORM
 ++*regwP.topAttachment:		ATTACH_FORM
 ++*regwP.bottomAttachment:	ATTACH_WIDGET
 ++*regwP.bottomWidget:		regwS
 ++
 ++*regwS.leftAttachment:		ATTACH_FORM
 ++*regwS.rightAttachment:		ATTACH_FORM
 ++*regwS.bottomAttachment:	ATTACH_WIDGET
 ++*regwS.bottomWidget:		regwRC
 ++
 ++*regwRC.adjustLast:		False
 ++*regwRC.orientation:		HORIZONTAL
 ++*regwRC.spacing:		10
 ++*regwRC.leftAttachment:		ATTACH_FORM
 ++*regwRC.rightAttachment:	ATTACH_FORM
 ++*regwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! Registers Window Configure Dialog
 ++*rwConf_popup.title:		Registers Window Configuration
 ++
 ++*rwConfRC.adjustLast:		False
 ++*rwConfRC.orientation:		HORIZONTAL
 ++*rwConfRC.spacing:		10
 ++*rwConfRC.leftAttachment:	ATTACH_FORM
 ++*rwConfRC.rightAttachment:	ATTACH_FORM
 ++*rwConfRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*rwConfS.leftAttachment:	ATTACH_FORM
 ++*rwConfS.rightAttachment:	ATTACH_FORM
 ++*rwConfS.bottomAttachment:	ATTACH_WIDGET
 ++*rwConfS.bottomWidget:		rwConfRC
 ++
 ++*rwConfT.orientation:		HORIZONTAL
 ++*rwConfT.numColumns:		2
 ++*rwConfT.packing:		PACK_COLUMN
 ++*rwConfT.leftAttachment:	ATTACH_FORM
 ++*rwConfT.rightAttachment:	ATTACH_FORM
 ++*rwConfT.bottomAttachment:	ATTACH_WIDGET
 ++*rwConfT.bottomWidget:		rwConfS
 ++
 ++*rwConfT.urs.labelString:	URs
 ++*rwConfT.grs.labelString:	GRs
 ++*rwConfT.frs.labelString:	FRs
 ++*rwConfT.srs.labelString:	SRs
 ++
 ++! Symlist Window
 ++*symlist_popup.title:		Symbols
 ++*symlist_popup.geometry:	+300+100
 ++
 ++! Cmdhelp Window
 ++*cmdhelp_popup.title:		Commands
 ++*cmdhelp_popup.geometry:	+400+150
 ++
 ++! Callstack Window
 ++*callstack_popup.title:		Call Stack
 ++*callstack_popup.geometry:	+500+200
 ++
 ++! Breakpoint Window
 ++*breakpoints_popup.title:	Breakpoints
 ++*breakpoints_popup.geometry:	+600+250
 ++
 ++! Register Dump Window
 ++*regdump_popup.title:		Register Dump
 ++*regdump_popup.geometry:	+700+300
 ++
 ++! Program Dump Window
 ++*progdump_popup.title:		Program Dump
 ++*progdump_popup.geometry:	+800+350
 ++
 ++! Data Dump Window
 ++*datadump_popup.title:		Data Dump
 ++*datadump_popup.geometry:	+900+400
 ++
 ++! Instruction TLB Dump Window
 ++*itlblist_popup.title:		Instruction TLB
 ++
 ++! Data TLB Dump Window
 ++*dtlblist_popup.title:		Data TLB
 ++
 ++! See man-page for VirtualBindings(3) (included in OpenMotif):
 ++*defaultVirtualBindings: \
 ++	osfBackSpace:		<Key>BackSpace\n\
 ++	osfPageDown:		<Key>Next\n\
 ++	osfPageUp:		<Key>Prior\n\
 ++	osfDown:		<Key>Down\n\
 ++	osfUp:			<Key>Up\n
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-src-line_separator.h	2016-05-15 09:37:21.000000000 -0400
 @@ -0,0 +1,13 @@
 +$NetBSD$
 +
 +Do not use carriage returns on unix which messes up ncurses display of code.
 +
 +--- src/line_separator.h.orig	2016-04-17 06:52:45.000000000 -0400
 ++++ src/line_separator.h	2016-04-17 06:27:01.000000000 -0400
 +@@ -0,0 +1,6 @@
 ++/* XXX */
 ++#if  defined(__CYGWIN__) || defined(_WIN32)
 ++#define LINE_SEPARATOR "\r\n"
 ++#else
 ++#define LINE_SEPARATOR "\n"
 ++#endif
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-src_eparse.y	2016-05-15 09:37:21.000000000 -0400
 @@ -0,0 +1,50 @@
 +$NetBSD$
 +
 +Rename strtonum to strtonumber so will not get errors about duplicate functions.
 +
 +--- src/eparse.y.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/eparse.y	2016-04-17 13:31:45.000000000 -0400
 +@@ -34,7 +34,7 @@
 + extern int yylex (void );
 + static REG convert(char);
 + static REG rd8(REG);
 +-static REG strtonum(char *, int);
 ++static REG strtonumber(char *, int);
 + static void yyerror(char *);
 + 
 + %}
 +@@ -164,18 +164,18 @@
 +         ;
 + 
 + count   : based
 +-        | NOBASE                { $$ = strtonum($1, 10); }
 ++        | NOBASE                { $$ = strtonumber($1, 10); }
 +         ;
 + 
 + number  : based
 +-        | NOBASE                { $$ = strtonum($1, 16); }
 +-        | NPFXHEX               { $$ = strtonum($1, 16); }
 ++        | NOBASE                { $$ = strtonumber($1, 16); }
 ++        | NPFXHEX               { $$ = strtonumber($1, 16); }
 +         ;
 + 
 +-based   : BIN                   { $$ = strtonum($1, 2); }
 +-        | OCT                   { $$ = strtonum($1, 8); }
 +-        | DEC                   { $$ = strtonum($1, 10); }
 +-        | HEX                   { $$ = strtonum($1, 16); }
 ++based   : BIN                   { $$ = strtonumber($1, 2); }
 ++        | OCT                   { $$ = strtonumber($1, 8); }
 ++        | DEC                   { $$ = strtonumber($1, 10); }
 ++        | HEX                   { $$ = strtonumber($1, 16); }
 +         ;
 + 
 + %%
 +@@ -197,7 +197,7 @@
 +     return memMRd(0, addr, 8, &dval) ? dval : 0;
 + }
 + 
 +-static REG strtonum(char *str, int base)
 ++static REG strtonumber(char *str, int base)
 + {
 +     REG num = 0;
 + 
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-src_freebsd_signal.h	2016-05-15 09:37:21.000000000 -0400
 @@ -0,0 +1,42 @@
 +$NetBSD$
 +
 +Make FreeBSD version compile
 +
 +--- src/freebsd/signal.h.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/freebsd/signal.h	2016-04-17 13:25:40.000000000 -0400
 +@@ -42,8 +42,35 @@
 + 		int	sigval_int;
 + 		ptr64	sigval_ptr;
 + 	} si_value;
 ++
 ++  /* XXX copied from /usr/include/sys/signal.h since si_band
 ++   * is already #define'd there
 ++   */
 ++#if 0
 + 	long	si_band;
 + 	int	__spare__[7];
 ++#else
 ++	union   {
 ++	  struct {
 ++	    int     _trapno;/* machine specific trap code */
 ++	  } _fault;
 ++	  struct {
 ++	    int     _timerid;
 ++	    int     _overrun;
 ++	  } _timer;
 ++	  struct {
 ++	    int     _mqd;
 ++	  } _mesgq;
 ++	  struct {
 ++	    long    _band;          /* band event for SIGPOLL */
 ++	  } _poll;                        /* was this ever used ? */
 ++	  struct {
 ++	    long    __spare1__;
 ++	    int     __spare2__[7];
 ++	  } __spare__;
 ++	} _reason;
 ++#endif
 ++  
 + };
 + 
 + int signal_get_handler(int, struct sigaction64 *);
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-src_program.c	2016-05-15 09:37:21.000000000 -0400
 @@ -0,0 +1,43 @@
 +$NetBSD$
 +
 +Use correct line separators.
 +
 +--- src/program.c.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/program.c	2016-04-17 06:24:07.000000000 -0400
 +@@ -43,6 +43,7 @@
 + #include "ia_exec.h"
 + #include "state.h"
 + #include "simmem.h"
 ++#include "line_separator.h"
 + 
 + static char instPtr(ADDR addr, char *dline);
 + static IAinstInfoPtr addrToIAinfo(ADDR adr, BYTE iAmode, unsigned *nbytes);
 +@@ -268,11 +269,11 @@
 + 	dasInit(DasPseudoOps|DasTemplate|DasRegNames, prgColumns - 20);
 + 	dasBundle(&bndl, i0Str, i1Str, i2Str);
 + 	ipp = instPtr(ofs, i0Str);
 +-	p += sprintf(p, "%s%c%c %s %s\r\n", srcp, bpn, ipp, buf, i0Str);
 ++	p += sprintf(p, "%s%c%c %s %s%s", srcp, bpn, ipp, buf, i0Str, LINE_SEPARATOR);
 + 	if (i1Str[0]) {		/* not MLX */
 + 	    bpn = ((i = isbpt(ofs + 4)) >= 0) ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 4, i1Str);
 +-	    p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i1Str);
 ++	    p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i1Str, LINE_SEPARATOR);
 + 	    bpn = ((i = isbpt(ofs + 8)) >= 0) ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 8, i2Str);
 + 	} else {		/* MLX */
 +@@ -280,12 +281,12 @@
 + 		    ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 4, i2Str);
 + 	}
 +-	p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i2Str);
 ++	p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i2Str, LINE_SEPARATOR);
 + 	*asmrows = i1Str[0] ? 3 : 2;
 +     } else {
 + xxx:
 + 	ipp = (ipGet(viewPid) == ofs) ? '>' : ' ';
 +-	(void)sprintf(line, "%c%c %s xxxxxxxx\r\n", bpn, ipp, buf);
 ++	(void)sprintf(line, "%c%c %s xxxxxxxx%s", bpn, ipp, buf, LINE_SEPARATOR);
 + 	*srcrows = 0;
 + 	*asmrows = 1;
 +     }
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-src_ssDCmd.c	2016-05-15 09:37:21.000000000 -0400
 @@ -0,0 +1,32 @@
 +$NetBSD$
 +
 +Use correct line separators.
 +
 +--- src/ssDCmd.c.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/ssDCmd.c	2016-04-17 06:26:02.000000000 -0400
 +@@ -42,6 +42,7 @@
 + #include "libcore.h"
 + #include "dos.h"
 + #include "libtrace.h"
 ++#include "line_separator.h"
 + 
 + #define MAXFILEDEPTH	16
 + #define MAXCMDLEN	4000
 +@@ -630,7 +631,7 @@
 + 	    p = strtok(NULL, " \t");
 + 	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
 + 	    adr = (seg << 4) + ofs + start + symOffset;
 +-        if ((p = strtok(NULL, " \t\r\n")))
 ++	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
 + 		symInsert(p, adr, 0);
 + 	}
 + 	(void)fclose(fp);
 +@@ -733,7 +734,7 @@
 + 	    p = strtok(NULL, " \t");
 + 	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
 + 	    adr = (seg << 4) + ofs + start;
 +-	    if ((p = strtok(NULL, " \t\r\n")))
 ++	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
 + 		symInsert(p, adr, 0);
 + 	}
 + 	(void)fclose(fp);
 --- /dev/null	2016-05-15 10:15:27.000000000 -0400
 +++ patches/patch-src_ssX.c	2016-05-15 09:37:21.000000000 -0400
 @@ -0,0 +1,39 @@
 +$NetBSD$
 +
 +Find default X resource file.
 +
 +--- src/ssX.c.orig	2008-02-04 23:11:37.000000000 -0500
 ++++ src/ssX.c		2016-04-28 09:45:23.000000000 -0400
 +@@ -49,6 +49,7 @@
 + #include "coreui.h"
 + #include "ssDCmd.h"
 + #include "libcore.h"
 ++#include "line_separator.h"
 + 
 + #if 0
 + /* Include files not needed for now in the simulator */
 +@@ -174,6 +175,24 @@
 +     Arg args[10];
 +     unsigned i, n;
 +     int argc = 0;
 ++    const char* xenv = "XENVIRONMENT";
 ++    const char* genv = getenv(xenv);
 ++    const char* xski_rc = "XSKI_RESOURCE_FILE";
 ++    
 ++    /*
 ++     * XXX how to add pkgsrc paths to X app-default search path?  For
 ++     * simplicity, just set environment variable or give warning if
 ++     * already set.  If XSki app-defaults not found, xski will display
 ++     * jumbled gui but doesn't look like it can run.
 ++     */
 ++    if (genv && (strcmp(genv, xski_rc) != 0)) {
 ++	printf("WARNING: If GUI not displayed correctly, try setting "
 ++	       "environment variable \"%s\" to \"%s\"%s",
 ++	       xenv, xski_rc, LINE_SEPARATOR);
 ++    }
 ++    else {
 ++	setenv(xenv, xski_rc, 0);
 ++    }
 + 
 +     addRegwRsrcOpts();
 +     addDatwRsrcOpts();
 Index: DESCR
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/DESCR,v
 retrieving revision 1.6
 diff -b -u -r1.6 DESCR
 --- DESCR	27 Jul 2011 11:14:22 -0000	1.6
 +++ DESCR	15 May 2016 14:15:28 -0000
 @@ -9,4 +9,6 @@

  Run the ski binary from within an xterm window.

 -BUGS: the xserver version xski doesn't currently work.
 +BUGS: manual pages out of date, rpm build target broken, ctrl-c breaks
 +      curses ski program not emulator, doesn't decode source code yet,
 +      "cstack" and "pm" commands not implemented, probably others.
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/Makefile,v
 retrieving revision 1.17
 diff -b -u -r1.17 Makefile
 --- Makefile	18 Aug 2015 07:31:07 -0000	1.17
 +++ Makefile	15 May 2016 14:15:28 -0000
 @@ -2,13 +2,17 @@
  #

  DISTNAME=	ski-1.3.2
 -PKGREVISION=	2
 +PKGREVISION=	3
  CATEGORIES=	emulators
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ski/}

  MAINTAINER=	cherry@zyx.in
  HOMEPAGE=	http://ski.sourceforge.net/
  COMMENT=	The ia64 instruction set simulator
 +LICENSE=	gnu-gpl-v2
 +
 +.include "../../mk/bsd.prefs.mk"
 +.include "options.mk"

  BUILD_DEPENDS+= libelf>=0.8.13:../../devel/libelf

 @@ -22,14 +26,25 @@
  USE_LIBTOOL=	yes
  USE_NCURSES=	yes

 +SUBST_CLASSES+=		xski-app
 +SUBST_STAGE.xski-app=	pre-configure
 +SUBST_MESSAGE.xski-app=	Fixing X11 Makefile.am app-default paths.
 +SUBST_FILES.xski-app=	Makefile.am
 +SUBST_SED.xski-app=	-e 's,/etc/X11/app-defaults,${PREFIX}/lib/X11/app-defaults,g'
 +
 +SUBST_CLASSES+=		ssx-app
 +SUBST_STAGE.ssx-app=	post-patch
 +SUBST_MESSAGE.ssx-app=	Fixing X11 ssX.c app-default paths.
 +SUBST_FILES.ssx-app=	src/ssX.c
 +SUBST_SED.ssx-app=	-e 's,XSKI_RESOURCE_FILE,${PREFIX}/lib/X11/app-defaults/XSki,g'
 +
  pre-configure:
  #	cd  ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./autogen.sh ${CONFIGURE_ARGS}
  	cd ${WRKSRC} && autoreconf -fi -I macros

  post-install:
 -	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/app-defaults
 -	${INSTALL_DATA} ${WRKSRC}/src/XSki \
 -			${DESTDIR}${PREFIX}/lib/X11/app-defaults/XSki
 +	${INSTALL_DATA} ${WRKSRC}/doc/manual/SkiManualMasterDoc.pdf \
 +			${DESTDIR}${PREFIX}/share/ski

  .include "../../devel/gperf/buildlink3.mk"
  .include "../../devel/libelf/buildlink3.mk"
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/PLIST,v
 retrieving revision 1.3
 diff -b -u -r1.3 PLIST
 --- PLIST	27 Jul 2011 11:14:22 -0000	1.3
 +++ PLIST	15 May 2016 14:15:28 -0000
 @@ -4,6 +4,8 @@
  bin/bskinc
  bin/ski-config
  bin/ski-fake-xterm
 +${PLIST.xski}bin/xski
 +${PLIST.gski}bin/gski
  include/ski-1.3/asm.h
  include/ski-1.3/bits.h
  include/ski-1.3/coreui.h
 @@ -19,13 +21,12 @@
  include/ski-1.3/state.h
  include/ski-1.3/std.h
  include/ski-1.3/types.h
 -lib/X11/app-defaults/XSki
 -lib/libski-1.3.so.2
 -lib/libski-1.3.so.2.0.0
 +${PLIST.xski}lib/X11/app-defaults/XSki
  lib/libski.a
 -lib/libski.la
 -lib/libski.so
  man/man1/bski.1
  man/man1/bskinc.1
  man/man1/ski.1
 -share/ski/gski.glade
 +${PLIST.xski}man/man1/xski.1
 +${PLIST.gski}man/man1/gski.1
 +${PLIST.gski}share/ski/gski.glade
 +share/ski/SkiManualMasterDoc.pdf
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/distinfo,v
 retrieving revision 1.5
 diff -b -u -r1.5 distinfo
 --- distinfo	3 Nov 2015 20:31:01 -0000	1.5
 +++ distinfo	15 May 2016 14:15:28 -0000
 @@ -4,11 +4,12 @@
  RMD160 (ski-1.3.2.tar.gz) = 1ff739eac7b8163026d208ee9b51d134f524e73f
  SHA512 (ski-1.3.2.tar.gz) = 21f2e1dd87cb517602d4d6ef62707ec6042c1b6ec5dfd063db7315d13bbc3fb47b491c15b7efb0433fc82f27c7924e2d50b2f57fe24e49aeb864ce2c3c2c8bd0
  Size (ski-1.3.2.tar.gz) = 2715791 bytes
 +SHA1 (patch-XSki.netbsd) = 866b050bf751cf1bff147835db17570c754b891b
  SHA1 (patch-aa) = 60003cef1eef2bbb6ce535c137fa15a76b0e4f13
  SHA1 (patch-ab) = 23076061dac3a0488d2f5b7b0ac022d095568d80
  SHA1 (patch-ac) = 769b847c5564565617be8043e0c736e12c296d40
 -SHA1 (patch-ad) = d1680c77d837a8c3c371e7bd624cb1fa87ea6724
 -SHA1 (patch-ae) = 036804384c4a4a694529092a8819c90abbc6e9ae
 +SHA1 (patch-ad) = e25a3b08b1e0f8d4972331a05682a1d917aa9ff9
 +SHA1 (patch-ae) = 954ef900e9cd64b485c9057a5fb01e283dcf6ed5
  SHA1 (patch-af) = f4048bccb6809ad69527352bcc4c32f8b109b437
  SHA1 (patch-ag) = 973a8f5c1cc5cc36bb8aa1e1e21769f51194967e
  SHA1 (patch-ah) = 31e4807b546c69aa43c7bddc4f16ba3b99d8da3e
 @@ -17,6 +18,12 @@
  SHA1 (patch-ak) = 0abaa09fb172ebbc8715908f5c6f49936b22aefa
  SHA1 (patch-al) = 1911d6c8e051ab2b64055cf1c64856188268619e
  SHA1 (patch-am) = 0965936933424ab4af4d1fa3384808f4e92f9b04
 -SHA1 (patch-an) = 73629a59de77f233be3748d19c5d17d8e18e8af5
 +SHA1 (patch-an) = 72f18e509d371e4724a35b4be195a21dbcdac859
  SHA1 (patch-ao) = 8f2eabd4d8dc6ccef593a5f50d00485a905ee523
 -SHA1 (patch-ap) = b392a3b89273db3f55ed7d88ca167229f6e3c802
 +SHA1 (patch-ap) = a98cd0aa55a002020c26fb70e5549bd16270bf39
 +SHA1 (patch-src-line_separator.h) = 2c9b0c2fdace6bc59735cbeb9588aea21b19b1db
 +SHA1 (patch-src_eparse.y) = c82918d36047e51273cc1aa0e20a4ce1649668f5
 +SHA1 (patch-src_freebsd_signal.h) = 265bd4e3f18dcfda791595b1356b37398c055349
 +SHA1 (patch-src_program.c) = d364a8a0ababfbc48333d5e48962f53677bcfeb9
 +SHA1 (patch-src_ssDCmd.c) = 9062b2107f72171644e27d83ec45260aa40019fe
 +SHA1 (patch-src_ssX.c) = 01c24b8d6b62b51798ae4a33e69cfb323a66f8d5
 Index: patches/patch-ad
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ad,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-ad
 --- patches/patch-ad	27 Jul 2011 10:23:48 -0000	1.1.1.1
 +++ patches/patch-ad	15 May 2016 14:15:28 -0000
 @@ -1,17 +1,24 @@
 -$NetBSD: patch-ad,v 1.1.1.1 2011/07/27 10:23:48 cherry Exp $
 +$NetBSD$

 ---- src/Makefile.am.orig	2008-02-05 04:11:38.000000000 +0000
 -+++ src/Makefile.am
 -@@ -130,7 +130,7 @@ if LINUX
 +Make compile for NetBSD and gtk.
 +
 +--- src/Makefile.am.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/Makefile.am	2016-04-20 09:50:38.000000000 -0400
 +@@ -130,7 +130,12 @@
   ski_LDFLAGS = 
   endif

  -ski_LDADD= libski.la -ldl
 ++# XXX others beside netbsd require?, rdynamic for gtk/libglade
 ++if NETBSD
 ++ski_LDFLAGS=-static -rdynamic
 ++endif
 ++
  +ski_LDADD= libski.la

   skiincludedir= $(includedir)/ski-$(SKI_MAJOR_VERSION).$(SKI_MINOR_VERSION)
   skiinclude_HEADERS= \
 -@@ -226,6 +226,23 @@ else
 +@@ -226,6 +231,23 @@
   freebsd_FILES =
   endif

 @@ -35,7 +42,7 @@
   libski_la_SOURCES= \
   	$(COMBFNS_DERIVED) \
   	$(PREDECODE_DERIVED) \
 -@@ -252,6 +269,7 @@ libski_la_SOURCES= \
 +@@ -252,6 +274,7 @@
   	$(linux_FILES) \
   	$(hpux_FILES) \
   	$(freebsd_FILES) \
 @@ -43,7 +50,7 @@
   	libsym.c \
   	$(ASM_HASH_DERIVED) \
   	$(IADAS_DECODER_DERIVED) \
 -@@ -288,6 +306,7 @@ EXTRA_libski_la_SOURCES = \
 +@@ -288,6 +311,7 @@
   	$(EXTRA_linux_FILES) \
   	$(EXTRA_hpux_FILES) \
   	$(EXTRA_freebsd_FILES) \
 Index: patches/patch-ae
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ae,v
 retrieving revision 1.2
 diff -b -u -r1.2 patch-ae
 --- patches/patch-ae	26 Jan 2013 23:11:14 -0000	1.2
 +++ patches/patch-ae	15 May 2016 14:15:28 -0000
 @@ -1,11 +1,8 @@
 -$NetBSD: patch-ae,v 1.2 2013/01/26 23:11:14 wiz Exp $
 +$NetBSD$

 -Second chunk: automake-1.13 compat
 -Rest: ?
 -
 ---- configure.ac.orig	2008-02-05 04:11:37.000000000 +0000
 -+++ configure.ac
 -@@ -33,12 +33,14 @@ case $host_os in
 +--- configure.ac	2008-02-04 23:11:37.000000000 -0500
 ++++ configure.ac	2016-04-20 20:09:24.000000000 -0400
 +@@ -33,12 +33,14 @@
       linux*)	HOST_OS=linux;;
       hpux*)	HOST_OS=hpux;;
       freebsd*)	HOST_OS=freebsd;;
 @@ -20,7 +17,7 @@

   # Version number definitions
   #
 -@@ -80,12 +82,11 @@ AC_PREFIX_DEFAULT(/usr/local)
 +@@ -80,12 +82,11 @@
   AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

   # Specify a configuration file
 @@ -34,7 +31,7 @@
   AM_PROG_AS
   AC_PROG_INSTALL
   AC_PROG_LN_S
 -@@ -259,6 +260,10 @@ if test "$HOST_OS" = freebsd; then
 +@@ -259,6 +260,10 @@
   	LDFLAGS="$LDFLAGS -lutil"
   fi

 @@ -45,7 +42,7 @@
   dnl Check for optional libs
   AC_CHECK_LIB(unwind-ia64, _Uia64_get_proc_name, )

 -@@ -331,6 +336,13 @@ if test "$HOST_OS" = hpux; then
 +@@ -331,6 +336,13 @@
           check_curses=no], [])
   fi    

 @@ -59,7 +56,7 @@
   if test "x$check_curses" != xno; then
   AC_CHECK_LIB(curses, tgetent, [],
       [AC_CHECK_LIB(ncurses, tgetent, ,
 -@@ -347,6 +359,7 @@ case $host_os in
 +@@ -347,6 +359,7 @@
       hpux10*)	CFLAGS="$CFLAGS -DHPUX1020";;
       hpux11*)	CFLAGS="$CFLAGS -DHPUX1100";;
       freebsd*)	CFLAGS="$CFLAGS -DFREEBSD -D__linux__";;
 Index: patches/patch-an
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-an,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-an
 --- patches/patch-an	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patches/patch-an	15 May 2016 14:15:28 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-an,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

  --- src/netbsd/ssc-netbsd.c.orig	2010-11-04 05:01:51.000000000 +0000
 -+++ src/netbsd/ssc-netbsd.c
 -@@ -0,0 +1,463 @@
 ++++ src/netbsd/ssc-netbsd.c	2016-05-06 14:44:42.000000000 -0400
 +@@ -0,0 +1,464 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -103,6 +103,7 @@
  +	tcgetattr(fin, &tios);
  +	saved_tios = tios;
  +	tios.c_lflag &= ~(ICANON|ECHO);
 ++	tios.c_iflag &= ~(ICRNL);	/* do not map CR to NL on input */
  +	tcsetattr(fin, TCSANOW, &tios);
  +	atexit(restore_tios);
  +	fdin = fin;
 Index: patches/patch-ap
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ap,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-ap
 --- patches/patch-ap	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patches/patch-ap	15 May 2016 14:15:28 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

 ---- src/netbsd/syscall-netbsd.h.orig	2009-12-16 13:06:31.000000000 +0000
 -+++ src/netbsd/syscall-netbsd.h
 -@@ -0,0 +1,144 @@
 +--- src/netbsd/syscall-netbsd.h.orig	2016-04-19 05:58:13.000000000 -0400
 ++++ src/netbsd/syscall-netbsd.h	2016-04-19 05:59:45.000000000 -0400
 +@@ -0,0 +1,139 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -63,9 +63,6 @@
  +	long64	tv_nsec;
  +};
  +
 -+
 -+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	*/
 -+
  +struct stat64 {
  +	dev_t	  st_dev;		/* inode's device */
  +	mode_t	  st_mode;		/* inode protection mode */
 @@ -98,8 +95,6 @@
  +	uint32_t  st_spare[2];
  +};
  +
 -+
 -+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	 */
  +struct statvfs64 {
  +	unsigned long	f_flag;		/* copy of mount exported flags */
  +	unsigned long	f_bsize;	/* file system block size */

From: "Mathew\, Cherry G." <cherry@zyx.in>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,  pkgsrc-bugs@netbsd.org,  scole_mail@gmx.com
Subject: Re: pkg/51103: Updates for ski emulator
Date: Mon, 16 May 2016 19:35:14 +0530

 >>>>> "scole" == scole mail <scole_mail@gmx.com> writes:

     scole> The following reply was made to PR pkg/51103; it has been
     scole> noted by GNATS.  From: scole_mail <scole_mail@gmx.com> To:
     scole> gnats-bugs@NetBSD.org Cc: Subject: Re: pkg/51103: Updates for
     scole> ski emulator Date: Sun, 15 May 2016 10:27:22 -0400

     scole>  Here is everything again with new files in patch form.

 Hi - thank you, that applied cleanly!

 I can confirm that the console is now not skewed, and that skiload runs
 well.

 One suggestion is to disable the X based gui as a default. It pulls in a
 few dependencies.


 -- 
 ~cherry

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Mon, 16 May 2016 10:22:36 -0400

 Feel free to set whichever PKG_SUGGESTED_OPTIONS in options.mk you feel 
 are appropriate.  Both the X and gtk pull in a lot of dependencies, but
 ctrl-c exits ski console program altogether and I didn't find equivalent
 for gui 'stop' button. 

From: "Mathew\, Cherry G." <cherry@zyx.in>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,  pkgsrc-bugs@netbsd.org,  scole_mail@gmx.com
Subject: Re: pkg/51103: Updates for ski emulator
Date: Tue, 17 May 2016 17:40:08 +0530

 >>>>> "scole" == scole mail <scole_mail@gmx.com> writes:

     scole> The following reply was made to PR pkg/51103; it has been
     scole> noted by GNATS.  From: scole_mail <scole_mail@gmx.com> To:
     scole> gnats-bugs@NetBSD.org Cc: Subject: Re: pkg/51103: Updates for
     scole> ski emulator Date: Mon, 16 May 2016 10:22:36 -0400

     scole>  Feel free to set whichever PKG_SUGGESTED_OPTIONS in
     scole> options.mk you feel are appropriate.  Both the X and gtk pull
     scole> in a lot of dependencies, but ctrl-c exits ski console
     scole> program altogether and I didn't find equivalent for gui
     scole> 'stop' button.

 LGTM. If nobody (wiz@ ?) beats me to it, I'll check it in in late June.

 Looking forward to your pmap (and other) changes!


 -- 
 ~cherry

From: scole_mail@gmx.com
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Fri, 27 May 2016 16:33:17 -0400

 I've been looking at the "Page Not Present" error with ski.  It seems
 that error can be avoided with a small change to
 src/sys/arch/ia64/ia64/vm_machdep.c:

 Index: vm_machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/ia64/ia64/vm_machdep.c,v
 retrieving revision 1.11
 diff -b -u -r1.11 vm_machdep.c
 --- vm_machdep.c        10 Feb 2011 14:46:46 -0000      1.11
 +++ vm_machdep.c        27 May 2016 20:17:48 -0000
 @@ -84,7 +84,7 @@
      void (*func)(void *), void *arg)
  {
         struct pcb *pcb1, *pcb2;
 -       struct trapframe *tf;
 +       struct trapframe * volatile tf;

         pcb1 = lwp_getpcb(l1);
         pcb2 = lwp_getpcb(l2);


 The bad page access was being cause by a ld8 r15 ....  when
 r15=0. Adding print/debug statements after tf got assigned caused the
 error to go away also.

 Here are some results:

 scole@dstar:~/nbsd/ski> bski skiload 
 Console: ia64 SKI console

 NetBSD/ia64 ia64 SKI boot, Revision 0.1 (Tue May 24 10:59:56 EDT 2016)


 Type '?' for a list of commands, 'help' for more detailed help.
 OK boot
 8779504+108392+117312 [151226+197880+133066]=0x8f0180
 netbsd entry at 0xe000000004008000
 Entering netbsd at 0xe000000004008000...
 PAL code mapped by the kernel's TR
 PAL Proc at 0xe000000000101790
 SAL Proc at 0xe000000000101890, GP at 0xe0000000001a04b8
 SAL: AP wake-up vector: 0xff
 Platform clock frequency 133338184 Hz
 Processor ratio 11/2, Bus ratio 1/1, ITC ratio 11/2
 MD 0xe0000000001a0060: type 13 pa 0x100000 cnt 0x400
 MD 0xe0000000001a0088: type 7 pa 0x500000 cnt 0x8000
 Descriptor 0xe0000000001a0088 contains kernel
 Loading chunk before kernel: 0x140 / 0x1000
 Loading chunk after kernel: 0x123e / 0x2140
 MD 0xe0000000001a00b0: type 7 pa 0x100000000 cnt 0x4000
 Skipping memory chunk start 0x100000000
 MD 0xe0000000001a00d8: type 12 pa 0xffffc000000 cnt 0x4000
 ptc.e base=0x0, count1=1, count2=1, stride1=0x0, stride2=0x0
 Processor supports 18 Region ID bits
 Trying VHPT size 0x10000
 Putting VHPT at 0xe000000000590000
 vhpt base = e000000000590000 
 vhpt size = 10000 
 Loaded initial symtab at 0xe00000000489f4b8, strtab at 0xe0000000048cf9b0, # entries 8220
 pmap_reference(0xe0000000048609c0)
 Detected memory  = 134217728 (128 MB)
 Physical memory chunk(s):
 0x0000000000588000 - 0x000000000058ffff, 32768 bytes (2 pages)
 0x00000000006c8000 - 0x0000000003ffffff, 59998208 bytes (3662 pages)
 0x00000000048f8000 - 0x00000000084fffff, 62947328 bytes (3842 pages)
 Total number of segments: vm_nphysseg = 3 
 pmap_reference(0xe0000000048609c0)
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 7.99.29 (GENERIC.SKI) #0: Fri May 27 16:09:34 EDT 2016
         scole@dstar:/home/scole/nbsd/src/sys/arch/ia64/compile/obj/GENERIC.SKI
 total memory = 128 MB
 avail memory = 117 MB
 Warning: no FPSWA package supplied
 Table 'APIC' at 0xe00000000011fa00
 pmap_reference(0xe0000000048609c0)
 pmap_reference(0xe0000000048609c0)
 timecounter: Timecounters tick every 10.000 msec
 mainbus0 (root)
 ACPI: RSDP 0x000000000011F9B0 00002C (v02 FBSD  )
 ACPI: XSDT 0x000000000011F9D4 00002C (v00 FBSD   SKI      00000000 FBSD 00000000)
 ACPI BIOS Warning (bug): Incorrect checksum in table [APIC] - 0x00, should be 0x0C (20160422/tbprint-233)
 ACPI: APIC 0x000000000011FA00 000080 (v00 FBSD   SKI      00000000 FBSD 00000000)
 ACPI Exception: AE_NO_ACPI_TABLES, While loading namespace from ACPI tables (20160422/tbxfload-111)
 ACPI Warning: AcpiEnable failed (20160422/utxfinit-184)
 acpi_probe: failed to enable subsystem
 ACPI Error: Could not remove SCI handler (20160422/evmisc-312)
 acpi0 at mainbus0: Intel ACPICA 20160422
 acpi0: X/RSDT: OemId <  FBSD,     SKI,00000000>, AslId <FBSD,00000000>
 ACPI Warning: AcpiEnable failed (20160422/utxfinit-184)
 acpi_attach: failed to initialize ACPI: AE_NO_ACPI_TABLES
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 timecounter: Timecounter "ia64_timecounter" frequency 733360012 Hz quality 100
 rn_init: radix functions require max_keylen be set
 pmap_create()
 WARNING: can't figure what device matches "XXX"
 md0: internal 4096 KB image area
 root on md0a dumps on md0b
 cannot mount root, error = 22
 root device (default md0a): 

 -----------------------------------------------------------------
 Just for a quick test,  I tried to boot real hardware and no longer got
 the same "Page Not Present Error" (http://gnats.netbsd.org/49717), but
 this new one:

 [dmesg snipped...]
 acpi0 at mainbus0: Intel ACPICA 20160422
 acpi0: X/RSDT: OemId <    HP,  rx2600,00000000>, AslId <  HP,00000000>

 fatal kernel trap (cpu 0):

     trap vector = 0x1e (Unaligned Reference)
     cr.iip      = 0xe00000000406fe20
     cr.ipsr     = 0x1010080a2010 (mfl,ic,dt,dfh,rt,cpl=0,it,ri=0,bn)
     cr.isr      = 0x400000000 (code=0,vector=0,r,ei=0)
     cr.ifa      = 0xc0000000ff5c1016
     curlwp   = 0xe000000004476ac0
         pid = 0, comm = system

 Stopped in pid 0.1 (system) at  netbsd:AcpiOsReadMemory+0x160:  [M0]    ld4.acq r
 14=r8
 db> 

 Anyway, I guess that is some small progess.

 I'm not sure how much needs to be done with pmap if anything, but there
 seems like there is still much unfinished besides that.  I'll post on
 the ia64 list from now on unless I find more ski issues.

 Thanks

Responsible-Changed-From-To: cherry->scole
Responsible-Changed-By: scole@NetBSD.org
Responsible-Changed-When: Thu, 11 Aug 2016 08:48:37 -0400
Responsible-Changed-Why:
Take, discussed in email with cherry


From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Thu, 11 Aug 2016 14:12:55 -0400

 I made a new patch set which doesn't use -static with LDFLAGS as
 recommended in
 http://mail-index.netbsd.org/tech-pkg/2016/08/10/msg017194.html.

 It seems ski_LDFLAGS was being set automagically to -static, so I just
 set that variable to nothing for the netbsd case. I also included libxcb
 buildlink as part of options.mk.

 I tested and it works with all the versions of bski/gski/xski so I
 believe this can be checked in.

 As a new developer I'm not sure of the process.  Can anyone enlighten
 me?  Do can I just check these changes into pkgsrc current?

 Thanks

 Summary of changes:  (A/? = New, R/D = Removed, M = Modified)
 =============================================================
 ? options.mk
 ? patches/patch-XSki.netbsd
 ? patches/patch-src-line_separator.h
 ? patches/patch-src_eparse.y
 ? patches/patch-src_freebsd_signal.h
 ? patches/patch-src_program.c
 ? patches/patch-src_ssDCmd.c
 ? patches/patch-src_ssX.c
 M DESCR
 M Makefile
 M PLIST
 M distinfo
 M patches/patch-ad
 M patches/patch-ae
 M patches/patch-an
 M patches/patch-ap

 Apply patch with "cd .../pkgsrc/emulators/ski ; patch -s -p0 < .../patchfile"

 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ options.mk	2016-08-11 13:55:01.000000000 -0400
 @@ -0,0 +1,35 @@
 +# $NetBSD$
 +
 +PKG_OPTIONS_VAR=	PKG_OPTIONS.ski
 +PKG_SUPPORTED_OPTIONS=	debug gtk motif
 +PKG_SUGGESTED_OPTIONS=	debug gtk motif
 +
 +.include "../../mk/bsd.options.mk"
 +
 +.if !empty(PKG_OPTIONS:Mdebug)
 +CPPFLAGS+=		-g
 +INSTALL_UNSTRIPPED=	yes
 +.endif
 +
 +PLIST_VARS+=		xski
 +.if !empty(PKG_OPTIONS:Mmotif)
 +PLIST.xski=		yes
 +CONFIGURE_ARGS+=	--with-x11
 +INSTALLATION_DIRS+=	lib/X11/app-defaults
 +
 +.include "../../fonts/fontconfig/buildlink3.mk"
 +.include "../../graphics/freetype2/buildlink3.mk"
 +.include "../../x11/libxcb/buildlink3.mk"
 +.include "../../x11/motif/buildlink3.mk"
 +.endif
 +
 +PLIST_VARS+=		gski
 +.if !empty(PKG_OPTIONS:Mgtk)
 +PLIST.gski=		yes
 +CONFIGURE_ARGS+=	--with-gtk
 +
 +.include "../../devel/libglade/buildlink3.mk"
 +.include "../../devel/libgnomeui/buildlink3.mk"
 +.include "../../graphics/freetype2/buildlink3.mk"
 +.include "../../x11/libxcb/buildlink3.mk"
 +.endif
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-XSki.netbsd	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,483 @@
 +$NetBSD$
 +
 +Include X resource file for NetBSD which is a copy of the FreeBSD one.
 +
 +--- XSki.netbsd.orig	2016-04-19 12:56:13.000000000 -0400
 ++++ XSki.netbsd	2016-04-19 12:56:25.000000000 -0400
 +@@ -0,0 +1,476 @@
 ++!
 ++! Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
 ++!
 ++! This program is free software; you can redistribute it and/or modify
 ++! it under the terms of the GNU General Public License as published by
 ++! the Free Software Foundation; either version 2 of the License, or 
 ++! (at your option) any later version.
 ++!
 ++! This program is distributed in the hope that it will be useful, 
 ++! but WITHOUT ANY WARRANTY; without even the implied warranty of 
 ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 ++! GNU General Public License for more details.
 ++!
 ++! You should have received a copy of the GNU General Public License along
 ++! with this program; if not, write to the Free Software Foundation, Inc.,
 ++! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ++!
 ++
 ++! *XmText.fontList:	<font>
 ++
 ++*background:		rgb:C0/C0/C0
 ++main.geometry:		+0+0
 ++
 ++*showUrs:		True
 ++*showGrs:		True
 ++*showFrs:		True
 ++*showSrs:		True
 ++*showIArs:		True
 ++
 ++*regwUrs.rows:		7
 ++*regwGrs.rows:		7
 ++*regwFrs.rows:		4
 ++*regwSrs.rows:		2
 ++*regwIArs.rows:		4
 ++
 ++*viewProgram:		True
 ++*viewData:		True
 ++*viewvga:		False
 ++*viewRegisters:		True
 ++
 ++*help.sensitive:	False
 ++*bb4.sensitive:		False
 ++*bb5.sensitive:		False
 ++*prgwRC.goto.sensitive:	False
 ++*datwRC.goto.sensitive:	False
 ++
 ++*File.mnemonic:		F
 ++*View.mnemonic:		V
 ++*Configure.mnemonic:	C
 ++*Help.mnemonic:		H
 ++
 ++*load.labelString:	Open...
 ++*load.mnemonic:		O
 ++*save.labelString:	Save...
 ++*save.mnemonic:		S
 ++*trace.labelString:	Trace...
 ++*trace.mnemonic:	T
 ++*traceOn.labelString:	Enable Trace
 ++*traceOff.labelString:	Disable Trace
 ++*read.labelString:	Read...
 ++*read.mnemonic:		R
 ++*quit.labelString:	Quit
 ++*quit.mnemonic:		Q
 ++
 ++*LoadFSD.fileTypeMask:	FILE_REGULAR
 ++*LoadFSD.textColumns:	50
 ++*load_syms.labelString:	Load all symbols
 ++*load_syms.alignment:	ALIGNMENT_BEGINNING
 ++
 ++*program.labelString:	Program
 ++*program.mnemonic:	P
 ++*data.labelString:	Data
 ++*data.mnemonic:		D
 ++*registers.labelString:	Registers
 ++*registers.mnemonic:	R
 ++*cache.labelString:	Cache
 ++*cache.mnemonic:	C
 ++*tlb.labelString:	TLB
 ++*tlb.mnemonic:		T
 ++*callstack.labelString:	Call Stack
 ++*breakpoints.labelString:	Breakpoints
 ++*breakpoints.mnemonic:	B
 ++*symbols.labelString:	Symbols
 ++*symbols.mnemonic:	S
 ++
 ++*context.labelString:	Context-Sensitive Help
 ++*context.mnemonic:	C
 ++*overview.labelString:	Overview
 ++*overview.mnemonic:	O
 ++*commands.labelString:	Commands
 ++*product.labelString:	Product Information
 ++*product.mnemonic:	P
 ++
 ++*loadFSD_popup.title:	Open File
 ++*prodInfo_popup.title:	Help -- Product Information
 ++
 ++! Processor Selection
 ++*p0.labelString:		0
 ++*p1.labelString:		1
 ++*p2.labelString:		2
 ++*procOption.labelString:	Processor
 ++
 ++! Button Box
 ++*bbox.orientation:	HORIZONTAL
 ++*bbox.packing:		PACK_TIGHT
 ++*bb0.labelString:	Step
 ++*bb0.translations:	Shift<Btn1Down>: SimCmd("step 10")\n\
 ++			<Btn1Down>: SimCmd("step 1")
 ++*bb1.labelString:	Run
 ++*bb1.translations:	<Btn1Down>: SimCmd("run")
 ++*bb2.labelString:	Prog
 ++*bb2.translations:	<Btn1Down>: SimCmd("pj")
 ++*bb3.labelString:	Data
 ++*bb3.translations:	<Btn1Down>: SimCmd("dj")
 ++*bb4.labelString:	Regs
 ++*bb5.labelString:	Cache
 ++*bb6.labelString:	TLB
 ++*bb6.translations:	<Btn1Down>: SimCmd("sdt")
 ++*bb7.labelString:	Quit
 ++*bb7.translations:	<Btn1Down>: SimCmd("quit")
 ++
 ++*cmd.promptString:		Command:
 ++*cmd.historyVisibleItemCount:	5
 ++*cmd.textColumns:		45
 ++
 ++*msgs.editMode:			MULTI_LINE_EDIT
 ++*msgs.editable:			False
 ++*msgs.cursorPositionVisible:	False
 ++*msgs.rows:			10
 ++
 ++! Generic Pushbutton resources
 ++*ok.labelString:	OK
 ++*apply.labelString:	Apply
 ++*cancel.labelString:	Cancel
 ++*close.labelString:	Close
 ++*config.labelString:	Configure
 ++*goto.labelString:	Goto
 ++*help.labelString:	Help
 ++
 ++*real.labelString:	Real
 ++*virtual.labelString:	Virtual
 ++
 ++! Program Window
 ++! These 3 are not currently used
 ++*prgw.cancelLabelString:	Cancel
 ++*prgw.helpLabelString:		Help
 ++*prgw.okLabelString:		OK
 ++
 ++*prgw_popup.title:		Program Window
 ++*prgw_popup.geometry:		550-0+0
 ++*prgw.defaultPosition:		False
 ++
 ++*prgwH.alignment:		ALIGNMENT_BEGINNING
 ++*prgwH.leftAttachment:		ATTACH_FORM
 ++*prgwH.rightAttachment:		ATTACH_FORM
 ++*prgwH.topAttachment:		ATTACH_FORM
 ++
 ++*prgwT.rows:			21
 ++*prgwT.editMode:		MULTI_LINE_EDIT
 ++*prgwT.editable:		False
 ++*prgwT.autoShowCursorPosition:	False
 ++*prgwT.cursorPositionVisible:	False
 ++*prgwT.resizeHeight:		False
 ++*prgwT.resizeWidth:		False
 ++! *prgwT.resizeWidth:		True
 ++*prgwT.leftAttachment:		ATTACH_FORM
 ++*prgwT.rightAttachment:		ATTACH_FORM
 ++*prgwT.topAttachment:		ATTACH_WIDGET
 ++*prgwT.topWidget:		prgwH
 ++*prgwT.bottomAttachment:	ATTACH_WIDGET
 ++*prgwT.bottomWidget:		prgwS
 ++*prgwT.translations:		#override\n\
 ++				<ConfigureNotify>:	pwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(pf)\n\
 ++				<Key>osfPageUp:		SimCmd(pb)\n\
 ++				<Key>osfDown:		SimCmd("pf 1")\n\
 ++				<Key>osfUp:		SimCmd("pb 1")
 ++
 ++*prgwS.leftAttachment:		ATTACH_FORM
 ++*prgwS.rightAttachment:		ATTACH_FORM
 ++*prgwS.bottomAttachment:	ATTACH_WIDGET
 ++*prgwS.bottomWidget:		prgwRC
 ++
 ++*prgwRC.adjustLast:		False
 ++*prgwRC.orientation:		HORIZONTAL
 ++*prgwRC.spacing:		10
 ++*prgwRC.leftAttachment:		ATTACH_FORM
 ++*prgwRC.rightAttachment:	ATTACH_FORM
 ++*prgwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! Program Window Configure Dialog
 ++*pwConf_popup.title:		Program Window Configuration
 ++
 ++*pwConfRC.adjustLast:		False
 ++*pwConfRC.orientation:		HORIZONTAL
 ++*pwConfRC.spacing:		10
 ++*pwConfRC.leftAttachment:	ATTACH_FORM
 ++*pwConfRC.rightAttachment:	ATTACH_FORM
 ++*pwConfRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*pwConfS.leftAttachment:	ATTACH_FORM
 ++*pwConfS.rightAttachment:	ATTACH_FORM
 ++*pwConfS.bottomAttachment:	ATTACH_WIDGET
 ++*pwConfS.bottomWidget:		pwConfRC
 ++
 ++*iofs.labelString:	Instruction Offset Format:
 ++*iofs.rightAttachment:	ATTACH_WIDGET
 ++*iofs.rightWidget:	iofsrb
 ++*iofs.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*iofs.topWidget:	iofsrb
 ++*iofs.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*iofs.bottomWidget:	iofsrb
 ++
 ++*iofsrb.orientation:		HORIZONTAL
 ++*iofsrb.bottomAttachment:	ATTACH_WIDGET
 ++*iofsrb.bottomWidget:		instrb
 ++*iofsrb.bottomOffset:		2
 ++*iofsrb.rightAttachment:	ATTACH_FORM
 ++
 ++*iofshex.labelString:	Hexadecimal
 ++
 ++*iofssym.labelString:	Symbolic
 ++
 ++*iofsboth.labelString:	Both
 ++
 ++*inst.labelString:	Instruction Format:
 ++*inst.rightAttachment:	ATTACH_WIDGET
 ++*inst.rightWidget:	instrb
 ++*inst.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*inst.topWidget:	instrb
 ++*inst.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*inst.bottomWidget:	instrb
 ++
 ++*instrb.orientation:		HORIZONTAL
 ++*instrb.bottomAttachment:	ATTACH_WIDGET
 ++*instrb.bottomWidget:		pwConfS
 ++*instrb.bottomOffset:		2
 ++*instrb.rightAttachment:	ATTACH_FORM
 ++
 ++*insthex.labelString:	Hexadecimal
 ++
 ++*instsym.labelString:	Disassembled
 ++
 ++*instboth.labelString:	Both
 ++
 ++! Program Window Goto Dialog
 ++*pwGoto_popup.title:		Program Window Goto
 ++
 ++*pwGotoRC.adjustLast:		False
 ++*pwGotoRC.orientation:		HORIZONTAL
 ++*pwGotoRC.spacing:		10
 ++*pwGotoRC.leftAttachment:	ATTACH_FORM
 ++*pwGotoRC.rightAttachment:	ATTACH_FORM
 ++*pwGotoRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*pwGotoS.leftAttachment:	ATTACH_FORM
 ++*pwGotoS.rightAttachment:	ATTACH_FORM
 ++*pwGotoS.bottomAttachment:	ATTACH_WIDGET
 ++*pwGotoS.bottomWidget:		pwGotoRC
 ++
 ++*pwOffset.rightAttachment:	ATTACH_FORM
 ++*pwOffset.bottomAttachment:	ATTACH_WIDGET
 ++*pwOffset.bottomWidget:		pwGotoS
 ++
 ++*pwOffsetL.labelString:		Offset:
 ++*pwOffsetL.rightAttachment:	ATTACH_WIDGET
 ++*pwOffsetL.rightWidget:		pwOffset
 ++*pwOffsetL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwOffsetL.topWidget:		pwOffset
 ++*pwOffsetL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwOffsetL.bottomWidget:	pwOffset
 ++
 ++*pwSpace.rightAttachment:	ATTACH_FORM
 ++*pwSpace.bottomAttachment:	ATTACH_WIDGET
 ++*pwSpace.bottomWidget:		pwOffset
 ++
 ++*pwSpaceL.labelString:		Space:
 ++*pwSpaceL.rightAttachment:	ATTACH_WIDGET
 ++*pwSpaceL.rightWidget:		pwSpace
 ++*pwSpaceL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwSpaceL.topWidget:		pwSpace
 ++*pwSpaceL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwSpaceL.bottomWidget:		pwSpace
 ++
 ++*pwAddr.orientation:		HORIZONTAL
 ++*pwAddr.leftAttachment:		ATTACH_FORM
 ++*pwAddr.topAttachment:		ATTACH_FORM
 ++*pwAddr.bottomAttachment:	ATTACH_WIDGET
 ++*pwAddr.bottomWidget:		pwSpace
 ++
 ++! Data Window
 ++*datw_popup.title:		Data Window
 ++*datw_popup.geometry:		x225+0-0
 ++*datw.defaultPosition:		False
 ++
 ++*datwH.alignment:		ALIGNMENT_BEGINNING
 ++*datwH.leftAttachment:		ATTACH_FORM
 ++*datwH.rightAttachment:		ATTACH_FORM
 ++*datwH.topAttachment:		ATTACH_FORM
 ++
 ++*datwT.rows:			12
 ++*datwT.editMode:		MULTI_LINE_EDIT
 ++*datwT.editable:		False
 ++*datwT.autoShowCursorPosition:	False
 ++*datwT.cursorPositionVisible:	False
 ++*datwT.resizeWidth:		True
 ++*datwT.leftAttachment:		ATTACH_FORM
 ++*datwT.rightAttachment:		ATTACH_FORM
 ++*datwT.topAttachment:		ATTACH_WIDGET
 ++*datwT.topWidget:		datwH
 ++*datwT.bottomAttachment:	ATTACH_WIDGET
 ++*datwT.bottomWidget:		datwS
 ++*datwT.translations:		#override \n\
 ++				<ConfigureNotify>:	dwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(df)\n\
 ++				<Key>osfPageUp:		SimCmd(db)\n\
 ++				<Key>osfDown:		SimCmd("df 1")\n\
 ++				<Key>osfUp:		SimCmd("db 1")
 ++
 ++*datwS.leftAttachment:		ATTACH_FORM
 ++*datwS.rightAttachment:		ATTACH_FORM
 ++*datwS.bottomAttachment:	ATTACH_WIDGET
 ++*datwS.bottomWidget:		datwRC
 ++
 ++*datwRC.adjustLast:		False
 ++*datwRC.orientation:		HORIZONTAL
 ++*datwRC.spacing:		10
 ++*datwRC.leftAttachment:		ATTACH_FORM
 ++*datwRC.rightAttachment:	ATTACH_FORM
 ++*datwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! VGA Window
 ++*vga_popup.title:		VGA Window
 ++*vga_popup.geometry:		640x480+0-0
 ++*vga.defaultPosition:		False
 ++
 ++*vgaH.alignment:		ALIGNMENT_BEGINNING
 ++*vgaH.leftAttachment:		ATTACH_FORM
 ++*vgaH.rightAttachment:		ATTACH_FORM
 ++*vgaH.topAttachment:		ATTACH_FORM
 ++
 ++*vgaT.rows:			24
 ++*vgaT.editMode:			MULTI_LINE_EDIT
 ++*vgaT.editable:			False
 ++*vgaT.autoShowCursorPosition:	False
 ++*vgaT.cursorPositionVisible:	False
 ++*vgaT.resizeWidth:		True
 ++*vgaT.leftAttachment:		ATTACH_FORM
 ++*vgaT.rightAttachment:		ATTACH_FORM
 ++*vgaT.topAttachment:		ATTACH_WIDGET
 ++*vgaT.topWidget:		vgaH
 ++*vgaT.bottomAttachment:		ATTACH_WIDGET
 ++*vgaT.bottomWidget:		vgaS
 ++*vgaT.translations:		#override\n\
 ++				<ConfigureNotify>:	dwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(vf)\n\
 ++				<Key>osfPageUp:		SimCmd(vb)\n\
 ++				<Key>osfDown:		SimCmd("vf 1")\n\
 ++				<Key>osfUp:		SimCmd("vb 1")
 ++
 ++*vgaS.leftAttachment:		ATTACH_FORM
 ++*vgaS.rightAttachment:		ATTACH_FORM
 ++*vgaS.bottomAttachment:		ATTACH_WIDGET
 ++*vgaS.bottomWidget:		vgaRC
 ++
 ++*vgaRC.adjustLast:		False
 ++*vgaRC.orientation:		HORIZONTAL
 ++*vgaRC.spacing:			10
 ++*vgaRC.leftAttachment:		ATTACH_FORM
 ++*vgaRC.rightAttachment:		ATTACH_FORM
 ++*vgaRC.bottomAttachment:	ATTACH_FORM
 ++*vgaRC.goto.sensitive:		False
 ++
 ++! Registers Window
 ++*regw_popup.title:		Registers Window
 ++*regw.noResize:			False
 ++*regw_popup.geometry:		520x475-0-0
 ++*regw.defaultPosition:		False
 ++
 ++!*regwP.marginHeight:		5
 ++!*regwP.marginWidth:		10
 ++!*regwP.refigureMode:		False
 ++!*regwP.sashHeight:		20
 ++!*regwP.sashWidth:		15
 ++!*regwP.sashIdent:		-20
 ++!*regwP.separatorOn:		False
 ++!*regwP.spacing:			2
 ++!*regwP.shadowThickness:		5
 ++
 ++*regwP.leftAttachment:		ATTACH_FORM
 ++*regwP.rightAttachment:		ATTACH_FORM
 ++*regwP.topAttachment:		ATTACH_FORM
 ++*regwP.bottomAttachment:	ATTACH_WIDGET
 ++*regwP.bottomWidget:		regwS
 ++
 ++*regwS.leftAttachment:		ATTACH_FORM
 ++*regwS.rightAttachment:		ATTACH_FORM
 ++*regwS.bottomAttachment:	ATTACH_WIDGET
 ++*regwS.bottomWidget:		regwRC
 ++
 ++*regwRC.adjustLast:		False
 ++*regwRC.orientation:		HORIZONTAL
 ++*regwRC.spacing:		10
 ++*regwRC.leftAttachment:		ATTACH_FORM
 ++*regwRC.rightAttachment:	ATTACH_FORM
 ++*regwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! Registers Window Configure Dialog
 ++*rwConf_popup.title:		Registers Window Configuration
 ++
 ++*rwConfRC.adjustLast:		False
 ++*rwConfRC.orientation:		HORIZONTAL
 ++*rwConfRC.spacing:		10
 ++*rwConfRC.leftAttachment:	ATTACH_FORM
 ++*rwConfRC.rightAttachment:	ATTACH_FORM
 ++*rwConfRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*rwConfS.leftAttachment:	ATTACH_FORM
 ++*rwConfS.rightAttachment:	ATTACH_FORM
 ++*rwConfS.bottomAttachment:	ATTACH_WIDGET
 ++*rwConfS.bottomWidget:		rwConfRC
 ++
 ++*rwConfT.orientation:		HORIZONTAL
 ++*rwConfT.numColumns:		2
 ++*rwConfT.packing:		PACK_COLUMN
 ++*rwConfT.leftAttachment:	ATTACH_FORM
 ++*rwConfT.rightAttachment:	ATTACH_FORM
 ++*rwConfT.bottomAttachment:	ATTACH_WIDGET
 ++*rwConfT.bottomWidget:		rwConfS
 ++
 ++*rwConfT.urs.labelString:	URs
 ++*rwConfT.grs.labelString:	GRs
 ++*rwConfT.frs.labelString:	FRs
 ++*rwConfT.srs.labelString:	SRs
 ++
 ++! Symlist Window
 ++*symlist_popup.title:		Symbols
 ++*symlist_popup.geometry:	+300+100
 ++
 ++! Cmdhelp Window
 ++*cmdhelp_popup.title:		Commands
 ++*cmdhelp_popup.geometry:	+400+150
 ++
 ++! Callstack Window
 ++*callstack_popup.title:		Call Stack
 ++*callstack_popup.geometry:	+500+200
 ++
 ++! Breakpoint Window
 ++*breakpoints_popup.title:	Breakpoints
 ++*breakpoints_popup.geometry:	+600+250
 ++
 ++! Register Dump Window
 ++*regdump_popup.title:		Register Dump
 ++*regdump_popup.geometry:	+700+300
 ++
 ++! Program Dump Window
 ++*progdump_popup.title:		Program Dump
 ++*progdump_popup.geometry:	+800+350
 ++
 ++! Data Dump Window
 ++*datadump_popup.title:		Data Dump
 ++*datadump_popup.geometry:	+900+400
 ++
 ++! Instruction TLB Dump Window
 ++*itlblist_popup.title:		Instruction TLB
 ++
 ++! Data TLB Dump Window
 ++*dtlblist_popup.title:		Data TLB
 ++
 ++! See man-page for VirtualBindings(3) (included in OpenMotif):
 ++*defaultVirtualBindings: \
 ++	osfBackSpace:		<Key>BackSpace\n\
 ++	osfPageDown:		<Key>Next\n\
 ++	osfPageUp:		<Key>Prior\n\
 ++	osfDown:		<Key>Down\n\
 ++	osfUp:			<Key>Up\n
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-src-line_separator.h	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,13 @@
 +$NetBSD$
 +
 +Do not use carriage returns on unix which messes up ncurses display of code.
 +
 +--- src/line_separator.h.orig	2016-04-17 06:52:45.000000000 -0400
 ++++ src/line_separator.h	2016-04-17 06:27:01.000000000 -0400
 +@@ -0,0 +1,6 @@
 ++/* XXX */
 ++#if  defined(__CYGWIN__) || defined(_WIN32)
 ++#define LINE_SEPARATOR "\r\n"
 ++#else
 ++#define LINE_SEPARATOR "\n"
 ++#endif
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-src_eparse.y	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,50 @@
 +$NetBSD$
 +
 +Rename strtonum to strtonumber so will not get errors about duplicate functions.
 +
 +--- src/eparse.y.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/eparse.y	2016-04-17 13:31:45.000000000 -0400
 +@@ -34,7 +34,7 @@
 + extern int yylex (void );
 + static REG convert(char);
 + static REG rd8(REG);
 +-static REG strtonum(char *, int);
 ++static REG strtonumber(char *, int);
 + static void yyerror(char *);
 + 
 + %}
 +@@ -164,18 +164,18 @@
 +         ;
 + 
 + count   : based
 +-        | NOBASE                { $$ = strtonum($1, 10); }
 ++        | NOBASE                { $$ = strtonumber($1, 10); }
 +         ;
 + 
 + number  : based
 +-        | NOBASE                { $$ = strtonum($1, 16); }
 +-        | NPFXHEX               { $$ = strtonum($1, 16); }
 ++        | NOBASE                { $$ = strtonumber($1, 16); }
 ++        | NPFXHEX               { $$ = strtonumber($1, 16); }
 +         ;
 + 
 +-based   : BIN                   { $$ = strtonum($1, 2); }
 +-        | OCT                   { $$ = strtonum($1, 8); }
 +-        | DEC                   { $$ = strtonum($1, 10); }
 +-        | HEX                   { $$ = strtonum($1, 16); }
 ++based   : BIN                   { $$ = strtonumber($1, 2); }
 ++        | OCT                   { $$ = strtonumber($1, 8); }
 ++        | DEC                   { $$ = strtonumber($1, 10); }
 ++        | HEX                   { $$ = strtonumber($1, 16); }
 +         ;
 + 
 + %%
 +@@ -197,7 +197,7 @@
 +     return memMRd(0, addr, 8, &dval) ? dval : 0;
 + }
 + 
 +-static REG strtonum(char *str, int base)
 ++static REG strtonumber(char *str, int base)
 + {
 +     REG num = 0;
 + 
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-src_freebsd_signal.h	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,42 @@
 +$NetBSD$
 +
 +Make FreeBSD version compile
 +
 +--- src/freebsd/signal.h.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/freebsd/signal.h	2016-04-17 13:25:40.000000000 -0400
 +@@ -42,8 +42,35 @@
 + 		int	sigval_int;
 + 		ptr64	sigval_ptr;
 + 	} si_value;
 ++
 ++  /* XXX copied from /usr/include/sys/signal.h since si_band
 ++   * is already #define'd there
 ++   */
 ++#if 0
 + 	long	si_band;
 + 	int	__spare__[7];
 ++#else
 ++	union   {
 ++	  struct {
 ++	    int     _trapno;/* machine specific trap code */
 ++	  } _fault;
 ++	  struct {
 ++	    int     _timerid;
 ++	    int     _overrun;
 ++	  } _timer;
 ++	  struct {
 ++	    int     _mqd;
 ++	  } _mesgq;
 ++	  struct {
 ++	    long    _band;          /* band event for SIGPOLL */
 ++	  } _poll;                        /* was this ever used ? */
 ++	  struct {
 ++	    long    __spare1__;
 ++	    int     __spare2__[7];
 ++	  } __spare__;
 ++	} _reason;
 ++#endif
 ++  
 + };
 + 
 + int signal_get_handler(int, struct sigaction64 *);
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-src_program.c	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,43 @@
 +$NetBSD$
 +
 +Use correct line separators.
 +
 +--- src/program.c.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/program.c	2016-04-17 06:24:07.000000000 -0400
 +@@ -43,6 +43,7 @@
 + #include "ia_exec.h"
 + #include "state.h"
 + #include "simmem.h"
 ++#include "line_separator.h"
 + 
 + static char instPtr(ADDR addr, char *dline);
 + static IAinstInfoPtr addrToIAinfo(ADDR adr, BYTE iAmode, unsigned *nbytes);
 +@@ -268,11 +269,11 @@
 + 	dasInit(DasPseudoOps|DasTemplate|DasRegNames, prgColumns - 20);
 + 	dasBundle(&bndl, i0Str, i1Str, i2Str);
 + 	ipp = instPtr(ofs, i0Str);
 +-	p += sprintf(p, "%s%c%c %s %s\r\n", srcp, bpn, ipp, buf, i0Str);
 ++	p += sprintf(p, "%s%c%c %s %s%s", srcp, bpn, ipp, buf, i0Str, LINE_SEPARATOR);
 + 	if (i1Str[0]) {		/* not MLX */
 + 	    bpn = ((i = isbpt(ofs + 4)) >= 0) ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 4, i1Str);
 +-	    p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i1Str);
 ++	    p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i1Str, LINE_SEPARATOR);
 + 	    bpn = ((i = isbpt(ofs + 8)) >= 0) ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 8, i2Str);
 + 	} else {		/* MLX */
 +@@ -280,12 +281,12 @@
 + 		    ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 4, i2Str);
 + 	}
 +-	p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i2Str);
 ++	p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i2Str, LINE_SEPARATOR);
 + 	*asmrows = i1Str[0] ? 3 : 2;
 +     } else {
 + xxx:
 + 	ipp = (ipGet(viewPid) == ofs) ? '>' : ' ';
 +-	(void)sprintf(line, "%c%c %s xxxxxxxx\r\n", bpn, ipp, buf);
 ++	(void)sprintf(line, "%c%c %s xxxxxxxx%s", bpn, ipp, buf, LINE_SEPARATOR);
 + 	*srcrows = 0;
 + 	*asmrows = 1;
 +     }
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-src_ssDCmd.c	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,32 @@
 +$NetBSD$
 +
 +Use correct line separators.
 +
 +--- src/ssDCmd.c.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/ssDCmd.c	2016-04-17 06:26:02.000000000 -0400
 +@@ -42,6 +42,7 @@
 + #include "libcore.h"
 + #include "dos.h"
 + #include "libtrace.h"
 ++#include "line_separator.h"
 + 
 + #define MAXFILEDEPTH	16
 + #define MAXCMDLEN	4000
 +@@ -630,7 +631,7 @@
 + 	    p = strtok(NULL, " \t");
 + 	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
 + 	    adr = (seg << 4) + ofs + start + symOffset;
 +-        if ((p = strtok(NULL, " \t\r\n")))
 ++	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
 + 		symInsert(p, adr, 0);
 + 	}
 + 	(void)fclose(fp);
 +@@ -733,7 +734,7 @@
 + 	    p = strtok(NULL, " \t");
 + 	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
 + 	    adr = (seg << 4) + ofs + start;
 +-	    if ((p = strtok(NULL, " \t\r\n")))
 ++	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
 + 		symInsert(p, adr, 0);
 + 	}
 + 	(void)fclose(fp);
 --- /dev/null	2016-08-11 13:52:06.000000000 -0400
 +++ patches/patch-src_ssX.c	2016-06-11 09:59:21.000000000 -0400
 @@ -0,0 +1,39 @@
 +$NetBSD$
 +
 +Find default X resource file.
 +
 +--- src/ssX.c.orig	2008-02-04 23:11:37.000000000 -0500
 ++++ src/ssX.c		2016-04-28 09:45:23.000000000 -0400
 +@@ -49,6 +49,7 @@
 + #include "coreui.h"
 + #include "ssDCmd.h"
 + #include "libcore.h"
 ++#include "line_separator.h"
 + 
 + #if 0
 + /* Include files not needed for now in the simulator */
 +@@ -174,6 +175,24 @@
 +     Arg args[10];
 +     unsigned i, n;
 +     int argc = 0;
 ++    const char* xenv = "XENVIRONMENT";
 ++    const char* genv = getenv(xenv);
 ++    const char* xski_rc = "XSKI_RESOURCE_FILE";
 ++    
 ++    /*
 ++     * XXX how to add pkgsrc paths to X app-default search path?  For
 ++     * simplicity, just set environment variable or give warning if
 ++     * already set.  If XSki app-defaults not found, xski will display
 ++     * jumbled gui but doesn't look like it can run.
 ++     */
 ++    if (genv && (strcmp(genv, xski_rc) != 0)) {
 ++	printf("WARNING: If GUI not displayed correctly, try setting "
 ++	       "environment variable \"%s\" to \"%s\"%s",
 ++	       xenv, xski_rc, LINE_SEPARATOR);
 ++    }
 ++    else {
 ++	setenv(xenv, xski_rc, 0);
 ++    }
 + 
 +     addRegwRsrcOpts();
 +     addDatwRsrcOpts();
 Index: DESCR
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/DESCR,v
 retrieving revision 1.6
 diff -b -u -r1.6 DESCR
 --- DESCR	27 Jul 2011 11:14:22 -0000	1.6
 +++ DESCR	11 Aug 2016 17:56:54 -0000
 @@ -9,4 +9,6 @@

  Run the ski binary from within an xterm window.

 -BUGS: the xserver version xski doesn't currently work.
 +BUGS: manual pages out of date, rpm build target broken, ctrl-c breaks
 +      curses ski program not emulator, doesn't decode source code yet,
 +      "cstack" and "pm" commands not implemented, probably others.
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/Makefile,v
 retrieving revision 1.17
 diff -b -u -r1.17 Makefile
 --- Makefile	18 Aug 2015 07:31:07 -0000	1.17
 +++ Makefile	11 Aug 2016 17:56:56 -0000
 @@ -2,13 +2,17 @@
  #

  DISTNAME=	ski-1.3.2
 -PKGREVISION=	2
 +PKGREVISION=	3
  CATEGORIES=	emulators
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ski/}

  MAINTAINER=	cherry@zyx.in
  HOMEPAGE=	http://ski.sourceforge.net/
  COMMENT=	The ia64 instruction set simulator
 +LICENSE=	gnu-gpl-v2
 +
 +.include "../../mk/bsd.prefs.mk"
 +.include "options.mk"

  BUILD_DEPENDS+= libelf>=0.8.13:../../devel/libelf

 @@ -18,18 +22,32 @@

  CPPFLAGS+=	-I${PREFIX}/include/libelf -L ${PREFIX}/lib

 +# XXX prevent thousands of warnings for combfns
 +#CFLAGS+=	-Wno-unused-variable -Wno-unused-but-set-variable
 +
  USE_TOOLS+=	pkg-config aclocal autoconf automake autoreconf yacc
  USE_LIBTOOL=	yes
  USE_NCURSES=	yes

 +SUBST_CLASSES+=		xski-app
 +SUBST_STAGE.xski-app=	pre-configure
 +SUBST_MESSAGE.xski-app=	Fixing X11 Makefile.am app-default paths.
 +SUBST_FILES.xski-app=	Makefile.am
 +SUBST_SED.xski-app=	-e 's,/etc/X11/app-defaults,${PREFIX}/lib/X11/app-defaults,g'
 +
 +SUBST_CLASSES+=		ssx-app
 +SUBST_STAGE.ssx-app=	post-patch
 +SUBST_MESSAGE.ssx-app=	Fixing X11 ssX.c app-default paths.
 +SUBST_FILES.ssx-app=	src/ssX.c
 +SUBST_SED.ssx-app=	-e 's,XSKI_RESOURCE_FILE,${PREFIX}/lib/X11/app-defaults/XSki,g'
 +
  pre-configure:
  #	cd  ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./autogen.sh ${CONFIGURE_ARGS}
  	cd ${WRKSRC} && autoreconf -fi -I macros

  post-install:
 -	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/app-defaults
 -	${INSTALL_DATA} ${WRKSRC}/src/XSki \
 -			${DESTDIR}${PREFIX}/lib/X11/app-defaults/XSki
 +	${INSTALL_DATA} ${WRKSRC}/doc/manual/SkiManualMasterDoc.pdf \
 +			${DESTDIR}${PREFIX}/share/ski

  .include "../../devel/gperf/buildlink3.mk"
  .include "../../devel/libelf/buildlink3.mk"
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/PLIST,v
 retrieving revision 1.3
 diff -b -u -r1.3 PLIST
 --- PLIST	27 Jul 2011 11:14:22 -0000	1.3
 +++ PLIST	11 Aug 2016 17:56:58 -0000
 @@ -4,6 +4,8 @@
  bin/bskinc
  bin/ski-config
  bin/ski-fake-xterm
 +${PLIST.xski}bin/xski
 +${PLIST.gski}bin/gski
  include/ski-1.3/asm.h
  include/ski-1.3/bits.h
  include/ski-1.3/coreui.h
 @@ -19,13 +21,14 @@
  include/ski-1.3/state.h
  include/ski-1.3/std.h
  include/ski-1.3/types.h
 -lib/X11/app-defaults/XSki
 +${PLIST.xski}lib/X11/app-defaults/XSki
  lib/libski-1.3.so.2
  lib/libski-1.3.so.2.0.0
  lib/libski.a
 -lib/libski.la
 -lib/libski.so
  man/man1/bski.1
  man/man1/bskinc.1
  man/man1/ski.1
 -share/ski/gski.glade
 +${PLIST.xski}man/man1/xski.1
 +${PLIST.gski}man/man1/gski.1
 +${PLIST.gski}share/ski/gski.glade
 +share/ski/SkiManualMasterDoc.pdf
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/distinfo,v
 retrieving revision 1.5
 diff -b -u -r1.5 distinfo
 --- distinfo	3 Nov 2015 20:31:01 -0000	1.5
 +++ distinfo	11 Aug 2016 17:57:00 -0000
 @@ -4,11 +4,12 @@
  RMD160 (ski-1.3.2.tar.gz) = 1ff739eac7b8163026d208ee9b51d134f524e73f
  SHA512 (ski-1.3.2.tar.gz) = 21f2e1dd87cb517602d4d6ef62707ec6042c1b6ec5dfd063db7315d13bbc3fb47b491c15b7efb0433fc82f27c7924e2d50b2f57fe24e49aeb864ce2c3c2c8bd0
  Size (ski-1.3.2.tar.gz) = 2715791 bytes
 +SHA1 (patch-XSki.netbsd) = 866b050bf751cf1bff147835db17570c754b891b
  SHA1 (patch-aa) = 60003cef1eef2bbb6ce535c137fa15a76b0e4f13
  SHA1 (patch-ab) = 23076061dac3a0488d2f5b7b0ac022d095568d80
  SHA1 (patch-ac) = 769b847c5564565617be8043e0c736e12c296d40
 -SHA1 (patch-ad) = d1680c77d837a8c3c371e7bd624cb1fa87ea6724
 -SHA1 (patch-ae) = 036804384c4a4a694529092a8819c90abbc6e9ae
 +SHA1 (patch-ad) = b61f9b4fd9b16f1ee18144cc167c45ae7410bc57
 +SHA1 (patch-ae) = 954ef900e9cd64b485c9057a5fb01e283dcf6ed5
  SHA1 (patch-af) = f4048bccb6809ad69527352bcc4c32f8b109b437
  SHA1 (patch-ag) = 973a8f5c1cc5cc36bb8aa1e1e21769f51194967e
  SHA1 (patch-ah) = 31e4807b546c69aa43c7bddc4f16ba3b99d8da3e
 @@ -17,6 +18,12 @@
  SHA1 (patch-ak) = 0abaa09fb172ebbc8715908f5c6f49936b22aefa
  SHA1 (patch-al) = 1911d6c8e051ab2b64055cf1c64856188268619e
  SHA1 (patch-am) = 0965936933424ab4af4d1fa3384808f4e92f9b04
 -SHA1 (patch-an) = 73629a59de77f233be3748d19c5d17d8e18e8af5
 +SHA1 (patch-an) = 72f18e509d371e4724a35b4be195a21dbcdac859
  SHA1 (patch-ao) = 8f2eabd4d8dc6ccef593a5f50d00485a905ee523
 -SHA1 (patch-ap) = b392a3b89273db3f55ed7d88ca167229f6e3c802
 +SHA1 (patch-ap) = a98cd0aa55a002020c26fb70e5549bd16270bf39
 +SHA1 (patch-src-line_separator.h) = 2c9b0c2fdace6bc59735cbeb9588aea21b19b1db
 +SHA1 (patch-src_eparse.y) = c82918d36047e51273cc1aa0e20a4ce1649668f5
 +SHA1 (patch-src_freebsd_signal.h) = 265bd4e3f18dcfda791595b1356b37398c055349
 +SHA1 (patch-src_program.c) = d364a8a0ababfbc48333d5e48962f53677bcfeb9
 +SHA1 (patch-src_ssDCmd.c) = 9062b2107f72171644e27d83ec45260aa40019fe
 +SHA1 (patch-src_ssX.c) = 01c24b8d6b62b51798ae4a33e69cfb323a66f8d5
 Index: patches/patch-ad
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ad,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-ad
 --- patches/patch-ad	27 Jul 2011 10:23:48 -0000	1.1.1.1
 +++ patches/patch-ad	11 Aug 2016 17:57:01 -0000
 @@ -1,17 +1,21 @@
  $NetBSD: patch-ad,v 1.1.1.1 2011/07/27 10:23:48 cherry Exp $

 ---- src/Makefile.am.orig	2008-02-05 04:11:38.000000000 +0000
 -+++ src/Makefile.am
 -@@ -130,7 +130,7 @@ if LINUX
 +--- src/Makefile.am.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/Makefile.am	2016-08-11 11:25:48.000000000 -0400
 +@@ -130,7 +130,11 @@
   ski_LDFLAGS = 
   endif

  -ski_LDADD= libski.la -ldl
 ++if NETBSD
 ++ski_LDFLAGS=
 ++endif
 ++
  +ski_LDADD= libski.la

   skiincludedir= $(includedir)/ski-$(SKI_MAJOR_VERSION).$(SKI_MINOR_VERSION)
   skiinclude_HEADERS= \
 -@@ -226,6 +226,23 @@ else
 +@@ -226,6 +230,23 @@
   freebsd_FILES =
   endif

 @@ -35,7 +39,7 @@
   libski_la_SOURCES= \
   	$(COMBFNS_DERIVED) \
   	$(PREDECODE_DERIVED) \
 -@@ -252,6 +269,7 @@ libski_la_SOURCES= \
 +@@ -252,6 +273,7 @@
   	$(linux_FILES) \
   	$(hpux_FILES) \
   	$(freebsd_FILES) \
 @@ -43,7 +47,7 @@
   	libsym.c \
   	$(ASM_HASH_DERIVED) \
   	$(IADAS_DECODER_DERIVED) \
 -@@ -288,6 +306,7 @@ EXTRA_libski_la_SOURCES = \
 +@@ -288,6 +310,7 @@
   	$(EXTRA_linux_FILES) \
   	$(EXTRA_hpux_FILES) \
   	$(EXTRA_freebsd_FILES) \
 Index: patches/patch-ae
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ae,v
 retrieving revision 1.2
 diff -b -u -r1.2 patch-ae
 --- patches/patch-ae	26 Jan 2013 23:11:14 -0000	1.2
 +++ patches/patch-ae	11 Aug 2016 17:57:05 -0000
 @@ -1,11 +1,8 @@
 -$NetBSD: patch-ae,v 1.2 2013/01/26 23:11:14 wiz Exp $
 +$NetBSD$

 -Second chunk: automake-1.13 compat
 -Rest: ?
 -
 ---- configure.ac.orig	2008-02-05 04:11:37.000000000 +0000
 -+++ configure.ac
 -@@ -33,12 +33,14 @@ case $host_os in
 +--- configure.ac	2008-02-04 23:11:37.000000000 -0500
 ++++ configure.ac	2016-04-20 20:09:24.000000000 -0400
 +@@ -33,12 +33,14 @@
       linux*)	HOST_OS=linux;;
       hpux*)	HOST_OS=hpux;;
       freebsd*)	HOST_OS=freebsd;;
 @@ -20,7 +17,7 @@

   # Version number definitions
   #
 -@@ -80,12 +82,11 @@ AC_PREFIX_DEFAULT(/usr/local)
 +@@ -80,12 +82,11 @@
   AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

   # Specify a configuration file
 @@ -34,7 +31,7 @@
   AM_PROG_AS
   AC_PROG_INSTALL
   AC_PROG_LN_S
 -@@ -259,6 +260,10 @@ if test "$HOST_OS" = freebsd; then
 +@@ -259,6 +260,10 @@
   	LDFLAGS="$LDFLAGS -lutil"
   fi

 @@ -45,7 +42,7 @@
   dnl Check for optional libs
   AC_CHECK_LIB(unwind-ia64, _Uia64_get_proc_name, )

 -@@ -331,6 +336,13 @@ if test "$HOST_OS" = hpux; then
 +@@ -331,6 +336,13 @@
           check_curses=no], [])
   fi    

 @@ -59,7 +56,7 @@
   if test "x$check_curses" != xno; then
   AC_CHECK_LIB(curses, tgetent, [],
       [AC_CHECK_LIB(ncurses, tgetent, ,
 -@@ -347,6 +359,7 @@ case $host_os in
 +@@ -347,6 +359,7 @@
       hpux10*)	CFLAGS="$CFLAGS -DHPUX1020";;
       hpux11*)	CFLAGS="$CFLAGS -DHPUX1100";;
       freebsd*)	CFLAGS="$CFLAGS -DFREEBSD -D__linux__";;
 Index: patches/patch-an
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-an,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-an
 --- patches/patch-an	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patches/patch-an	11 Aug 2016 17:57:07 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-an,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

  --- src/netbsd/ssc-netbsd.c.orig	2010-11-04 05:01:51.000000000 +0000
 -+++ src/netbsd/ssc-netbsd.c
 -@@ -0,0 +1,463 @@
 ++++ src/netbsd/ssc-netbsd.c	2016-05-06 14:44:42.000000000 -0400
 +@@ -0,0 +1,464 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -103,6 +103,7 @@
  +	tcgetattr(fin, &tios);
  +	saved_tios = tios;
  +	tios.c_lflag &= ~(ICANON|ECHO);
 ++	tios.c_iflag &= ~(ICRNL);	/* do not map CR to NL on input */
  +	tcsetattr(fin, TCSANOW, &tios);
  +	atexit(restore_tios);
  +	fdin = fin;
 Index: patches/patch-ap
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ap,v
 retrieving revision 1.1.1.1
 diff -b -u -r1.1.1.1 patch-ap
 --- patches/patch-ap	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patches/patch-ap	11 Aug 2016 17:57:09 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

 ---- src/netbsd/syscall-netbsd.h.orig	2009-12-16 13:06:31.000000000 +0000
 -+++ src/netbsd/syscall-netbsd.h
 -@@ -0,0 +1,144 @@
 +--- src/netbsd/syscall-netbsd.h.orig	2016-04-19 05:58:13.000000000 -0400
 ++++ src/netbsd/syscall-netbsd.h	2016-04-19 05:59:45.000000000 -0400
 +@@ -0,0 +1,139 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -63,9 +63,6 @@
  +	long64	tv_nsec;
  +};
  +
 -+
 -+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	*/
 -+
  +struct stat64 {
  +	dev_t	  st_dev;		/* inode's device */
  +	mode_t	  st_mode;		/* inode protection mode */
 @@ -98,8 +95,6 @@
  +	uint32_t  st_spare[2];
  +};
  +
 -+
 -+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	 */
  +struct statvfs64 {
  +	unsigned long	f_flag;		/* copy of mount exported flags */
  +	unsigned long	f_bsize;	/* file system block size */

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org, joerg@netbsd.org
Cc: 
Subject: Re: pkg/51103: Updates for ski emulator
Date: Thu, 11 Aug 2016 22:37:06 -0400

 As requested, here is full cvs diff with pkgsrc current and nothing
 committed.

 Thanks

 >cvs diff -R -N -u

 Index: DESCR
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/DESCR,v
 retrieving revision 1.6
 diff -u -r1.6 DESCR
 --- DESCR	27 Jul 2011 11:14:22 -0000	1.6
 +++ DESCR	12 Aug 2016 02:35:45 -0000
 @@ -9,4 +9,6 @@

  Run the ski binary from within an xterm window.

 -BUGS: the xserver version xski doesn't currently work.
 +BUGS: manual pages out of date, rpm build target broken, ctrl-c breaks
 +      curses ski program not emulator, doesn't decode source code yet,
 +      "cstack" and "pm" commands not implemented, probably others.
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/Makefile,v
 retrieving revision 1.17
 diff -u -r1.17 Makefile
 --- Makefile	18 Aug 2015 07:31:07 -0000	1.17
 +++ Makefile	12 Aug 2016 02:35:45 -0000
 @@ -2,13 +2,17 @@
  #

  DISTNAME=	ski-1.3.2
 -PKGREVISION=	2
 +PKGREVISION=	3
  CATEGORIES=	emulators
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ski/}

  MAINTAINER=	cherry@zyx.in
  HOMEPAGE=	http://ski.sourceforge.net/
  COMMENT=	The ia64 instruction set simulator
 +LICENSE=	gnu-gpl-v2
 +
 +.include "../../mk/bsd.prefs.mk"
 +.include "options.mk"

  BUILD_DEPENDS+= libelf>=0.8.13:../../devel/libelf

 @@ -18,18 +22,32 @@

  CPPFLAGS+=	-I${PREFIX}/include/libelf -L ${PREFIX}/lib

 +# XXX prevent thousands of warnings for combfns
 +#CFLAGS+=	-Wno-unused-variable -Wno-unused-but-set-variable
 +
  USE_TOOLS+=	pkg-config aclocal autoconf automake autoreconf yacc
  USE_LIBTOOL=	yes
  USE_NCURSES=	yes

 +SUBST_CLASSES+=		xski-app
 +SUBST_STAGE.xski-app=	pre-configure
 +SUBST_MESSAGE.xski-app=	Fixing X11 Makefile.am app-default paths.
 +SUBST_FILES.xski-app=	Makefile.am
 +SUBST_SED.xski-app=	-e 's,/etc/X11/app-defaults,${PREFIX}/lib/X11/app-defaults,g'
 +
 +SUBST_CLASSES+=		ssx-app
 +SUBST_STAGE.ssx-app=	post-patch
 +SUBST_MESSAGE.ssx-app=	Fixing X11 ssX.c app-default paths.
 +SUBST_FILES.ssx-app=	src/ssX.c
 +SUBST_SED.ssx-app=	-e 's,XSKI_RESOURCE_FILE,${PREFIX}/lib/X11/app-defaults/XSki,g'
 +
  pre-configure:
  #	cd  ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./autogen.sh ${CONFIGURE_ARGS}
  	cd ${WRKSRC} && autoreconf -fi -I macros

  post-install:
 -	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/app-defaults
 -	${INSTALL_DATA} ${WRKSRC}/src/XSki \
 -			${DESTDIR}${PREFIX}/lib/X11/app-defaults/XSki
 +	${INSTALL_DATA} ${WRKSRC}/doc/manual/SkiManualMasterDoc.pdf \
 +			${DESTDIR}${PREFIX}/share/ski

  .include "../../devel/gperf/buildlink3.mk"
  .include "../../devel/libelf/buildlink3.mk"
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/PLIST,v
 retrieving revision 1.3
 diff -u -r1.3 PLIST
 --- PLIST	27 Jul 2011 11:14:22 -0000	1.3
 +++ PLIST	12 Aug 2016 02:35:45 -0000
 @@ -4,6 +4,8 @@
  bin/bskinc
  bin/ski-config
  bin/ski-fake-xterm
 +${PLIST.xski}bin/xski
 +${PLIST.gski}bin/gski
  include/ski-1.3/asm.h
  include/ski-1.3/bits.h
  include/ski-1.3/coreui.h
 @@ -19,13 +21,14 @@
  include/ski-1.3/state.h
  include/ski-1.3/std.h
  include/ski-1.3/types.h
 -lib/X11/app-defaults/XSki
 +${PLIST.xski}lib/X11/app-defaults/XSki
  lib/libski-1.3.so.2
  lib/libski-1.3.so.2.0.0
  lib/libski.a
 -lib/libski.la
 -lib/libski.so
  man/man1/bski.1
  man/man1/bskinc.1
  man/man1/ski.1
 -share/ski/gski.glade
 +${PLIST.xski}man/man1/xski.1
 +${PLIST.gski}man/man1/gski.1
 +${PLIST.gski}share/ski/gski.glade
 +share/ski/SkiManualMasterDoc.pdf
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/distinfo,v
 retrieving revision 1.5
 diff -u -r1.5 distinfo
 --- distinfo	3 Nov 2015 20:31:01 -0000	1.5
 +++ distinfo	12 Aug 2016 02:35:45 -0000
 @@ -4,11 +4,12 @@
  RMD160 (ski-1.3.2.tar.gz) = 1ff739eac7b8163026d208ee9b51d134f524e73f
  SHA512 (ski-1.3.2.tar.gz) = 21f2e1dd87cb517602d4d6ef62707ec6042c1b6ec5dfd063db7315d13bbc3fb47b491c15b7efb0433fc82f27c7924e2d50b2f57fe24e49aeb864ce2c3c2c8bd0
  Size (ski-1.3.2.tar.gz) = 2715791 bytes
 +SHA1 (patch-XSki.netbsd) = 866b050bf751cf1bff147835db17570c754b891b
  SHA1 (patch-aa) = 60003cef1eef2bbb6ce535c137fa15a76b0e4f13
  SHA1 (patch-ab) = 23076061dac3a0488d2f5b7b0ac022d095568d80
  SHA1 (patch-ac) = 769b847c5564565617be8043e0c736e12c296d40
 -SHA1 (patch-ad) = d1680c77d837a8c3c371e7bd624cb1fa87ea6724
 -SHA1 (patch-ae) = 036804384c4a4a694529092a8819c90abbc6e9ae
 +SHA1 (patch-ad) = b61f9b4fd9b16f1ee18144cc167c45ae7410bc57
 +SHA1 (patch-ae) = 954ef900e9cd64b485c9057a5fb01e283dcf6ed5
  SHA1 (patch-af) = f4048bccb6809ad69527352bcc4c32f8b109b437
  SHA1 (patch-ag) = 973a8f5c1cc5cc36bb8aa1e1e21769f51194967e
  SHA1 (patch-ah) = 31e4807b546c69aa43c7bddc4f16ba3b99d8da3e
 @@ -17,6 +18,12 @@
  SHA1 (patch-ak) = 0abaa09fb172ebbc8715908f5c6f49936b22aefa
  SHA1 (patch-al) = 1911d6c8e051ab2b64055cf1c64856188268619e
  SHA1 (patch-am) = 0965936933424ab4af4d1fa3384808f4e92f9b04
 -SHA1 (patch-an) = 73629a59de77f233be3748d19c5d17d8e18e8af5
 +SHA1 (patch-an) = 72f18e509d371e4724a35b4be195a21dbcdac859
  SHA1 (patch-ao) = 8f2eabd4d8dc6ccef593a5f50d00485a905ee523
 -SHA1 (patch-ap) = b392a3b89273db3f55ed7d88ca167229f6e3c802
 +SHA1 (patch-ap) = a98cd0aa55a002020c26fb70e5549bd16270bf39
 +SHA1 (patch-src-line_separator.h) = 2c9b0c2fdace6bc59735cbeb9588aea21b19b1db
 +SHA1 (patch-src_eparse.y) = c82918d36047e51273cc1aa0e20a4ce1649668f5
 +SHA1 (patch-src_freebsd_signal.h) = 265bd4e3f18dcfda791595b1356b37398c055349
 +SHA1 (patch-src_program.c) = d364a8a0ababfbc48333d5e48962f53677bcfeb9
 +SHA1 (patch-src_ssDCmd.c) = 9062b2107f72171644e27d83ec45260aa40019fe
 +SHA1 (patch-src_ssX.c) = 01c24b8d6b62b51798ae4a33e69cfb323a66f8d5
 Index: options.mk
 ===================================================================
 RCS file: options.mk
 diff -N options.mk
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ options.mk	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,35 @@
 +# $NetBSD$
 +
 +PKG_OPTIONS_VAR=	PKG_OPTIONS.ski
 +PKG_SUPPORTED_OPTIONS=	debug gtk motif
 +PKG_SUGGESTED_OPTIONS=	debug gtk motif
 +
 +.include "../../mk/bsd.options.mk"
 +
 +.if !empty(PKG_OPTIONS:Mdebug)
 +CPPFLAGS+=		-g
 +INSTALL_UNSTRIPPED=	yes
 +.endif
 +
 +PLIST_VARS+=		xski
 +.if !empty(PKG_OPTIONS:Mmotif)
 +PLIST.xski=		yes
 +CONFIGURE_ARGS+=	--with-x11
 +INSTALLATION_DIRS+=	lib/X11/app-defaults
 +
 +.include "../../fonts/fontconfig/buildlink3.mk"
 +.include "../../graphics/freetype2/buildlink3.mk"
 +.include "../../x11/libxcb/buildlink3.mk"
 +.include "../../x11/motif/buildlink3.mk"
 +.endif
 +
 +PLIST_VARS+=		gski
 +.if !empty(PKG_OPTIONS:Mgtk)
 +PLIST.gski=		yes
 +CONFIGURE_ARGS+=	--with-gtk
 +
 +.include "../../devel/libglade/buildlink3.mk"
 +.include "../../devel/libgnomeui/buildlink3.mk"
 +.include "../../graphics/freetype2/buildlink3.mk"
 +.include "../../x11/libxcb/buildlink3.mk"
 +.endif
 Index: patches/patch-XSki.netbsd
 ===================================================================
 RCS file: patches/patch-XSki.netbsd
 diff -N patches/patch-XSki.netbsd
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-XSki.netbsd	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,483 @@
 +$NetBSD$
 +
 +Include X resource file for NetBSD which is a copy of the FreeBSD one.
 +
 +--- XSki.netbsd.orig	2016-04-19 12:56:13.000000000 -0400
 ++++ XSki.netbsd	2016-04-19 12:56:25.000000000 -0400
 +@@ -0,0 +1,476 @@
 ++!
 ++! Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
 ++!
 ++! This program is free software; you can redistribute it and/or modify
 ++! it under the terms of the GNU General Public License as published by
 ++! the Free Software Foundation; either version 2 of the License, or 
 ++! (at your option) any later version.
 ++!
 ++! This program is distributed in the hope that it will be useful, 
 ++! but WITHOUT ANY WARRANTY; without even the implied warranty of 
 ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 ++! GNU General Public License for more details.
 ++!
 ++! You should have received a copy of the GNU General Public License along
 ++! with this program; if not, write to the Free Software Foundation, Inc.,
 ++! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ++!
 ++
 ++! *XmText.fontList:	<font>
 ++
 ++*background:		rgb:C0/C0/C0
 ++main.geometry:		+0+0
 ++
 ++*showUrs:		True
 ++*showGrs:		True
 ++*showFrs:		True
 ++*showSrs:		True
 ++*showIArs:		True
 ++
 ++*regwUrs.rows:		7
 ++*regwGrs.rows:		7
 ++*regwFrs.rows:		4
 ++*regwSrs.rows:		2
 ++*regwIArs.rows:		4
 ++
 ++*viewProgram:		True
 ++*viewData:		True
 ++*viewvga:		False
 ++*viewRegisters:		True
 ++
 ++*help.sensitive:	False
 ++*bb4.sensitive:		False
 ++*bb5.sensitive:		False
 ++*prgwRC.goto.sensitive:	False
 ++*datwRC.goto.sensitive:	False
 ++
 ++*File.mnemonic:		F
 ++*View.mnemonic:		V
 ++*Configure.mnemonic:	C
 ++*Help.mnemonic:		H
 ++
 ++*load.labelString:	Open...
 ++*load.mnemonic:		O
 ++*save.labelString:	Save...
 ++*save.mnemonic:		S
 ++*trace.labelString:	Trace...
 ++*trace.mnemonic:	T
 ++*traceOn.labelString:	Enable Trace
 ++*traceOff.labelString:	Disable Trace
 ++*read.labelString:	Read...
 ++*read.mnemonic:		R
 ++*quit.labelString:	Quit
 ++*quit.mnemonic:		Q
 ++
 ++*LoadFSD.fileTypeMask:	FILE_REGULAR
 ++*LoadFSD.textColumns:	50
 ++*load_syms.labelString:	Load all symbols
 ++*load_syms.alignment:	ALIGNMENT_BEGINNING
 ++
 ++*program.labelString:	Program
 ++*program.mnemonic:	P
 ++*data.labelString:	Data
 ++*data.mnemonic:		D
 ++*registers.labelString:	Registers
 ++*registers.mnemonic:	R
 ++*cache.labelString:	Cache
 ++*cache.mnemonic:	C
 ++*tlb.labelString:	TLB
 ++*tlb.mnemonic:		T
 ++*callstack.labelString:	Call Stack
 ++*breakpoints.labelString:	Breakpoints
 ++*breakpoints.mnemonic:	B
 ++*symbols.labelString:	Symbols
 ++*symbols.mnemonic:	S
 ++
 ++*context.labelString:	Context-Sensitive Help
 ++*context.mnemonic:	C
 ++*overview.labelString:	Overview
 ++*overview.mnemonic:	O
 ++*commands.labelString:	Commands
 ++*product.labelString:	Product Information
 ++*product.mnemonic:	P
 ++
 ++*loadFSD_popup.title:	Open File
 ++*prodInfo_popup.title:	Help -- Product Information
 ++
 ++! Processor Selection
 ++*p0.labelString:		0
 ++*p1.labelString:		1
 ++*p2.labelString:		2
 ++*procOption.labelString:	Processor
 ++
 ++! Button Box
 ++*bbox.orientation:	HORIZONTAL
 ++*bbox.packing:		PACK_TIGHT
 ++*bb0.labelString:	Step
 ++*bb0.translations:	Shift<Btn1Down>: SimCmd("step 10")\n\
 ++			<Btn1Down>: SimCmd("step 1")
 ++*bb1.labelString:	Run
 ++*bb1.translations:	<Btn1Down>: SimCmd("run")
 ++*bb2.labelString:	Prog
 ++*bb2.translations:	<Btn1Down>: SimCmd("pj")
 ++*bb3.labelString:	Data
 ++*bb3.translations:	<Btn1Down>: SimCmd("dj")
 ++*bb4.labelString:	Regs
 ++*bb5.labelString:	Cache
 ++*bb6.labelString:	TLB
 ++*bb6.translations:	<Btn1Down>: SimCmd("sdt")
 ++*bb7.labelString:	Quit
 ++*bb7.translations:	<Btn1Down>: SimCmd("quit")
 ++
 ++*cmd.promptString:		Command:
 ++*cmd.historyVisibleItemCount:	5
 ++*cmd.textColumns:		45
 ++
 ++*msgs.editMode:			MULTI_LINE_EDIT
 ++*msgs.editable:			False
 ++*msgs.cursorPositionVisible:	False
 ++*msgs.rows:			10
 ++
 ++! Generic Pushbutton resources
 ++*ok.labelString:	OK
 ++*apply.labelString:	Apply
 ++*cancel.labelString:	Cancel
 ++*close.labelString:	Close
 ++*config.labelString:	Configure
 ++*goto.labelString:	Goto
 ++*help.labelString:	Help
 ++
 ++*real.labelString:	Real
 ++*virtual.labelString:	Virtual
 ++
 ++! Program Window
 ++! These 3 are not currently used
 ++*prgw.cancelLabelString:	Cancel
 ++*prgw.helpLabelString:		Help
 ++*prgw.okLabelString:		OK
 ++
 ++*prgw_popup.title:		Program Window
 ++*prgw_popup.geometry:		550-0+0
 ++*prgw.defaultPosition:		False
 ++
 ++*prgwH.alignment:		ALIGNMENT_BEGINNING
 ++*prgwH.leftAttachment:		ATTACH_FORM
 ++*prgwH.rightAttachment:		ATTACH_FORM
 ++*prgwH.topAttachment:		ATTACH_FORM
 ++
 ++*prgwT.rows:			21
 ++*prgwT.editMode:		MULTI_LINE_EDIT
 ++*prgwT.editable:		False
 ++*prgwT.autoShowCursorPosition:	False
 ++*prgwT.cursorPositionVisible:	False
 ++*prgwT.resizeHeight:		False
 ++*prgwT.resizeWidth:		False
 ++! *prgwT.resizeWidth:		True
 ++*prgwT.leftAttachment:		ATTACH_FORM
 ++*prgwT.rightAttachment:		ATTACH_FORM
 ++*prgwT.topAttachment:		ATTACH_WIDGET
 ++*prgwT.topWidget:		prgwH
 ++*prgwT.bottomAttachment:	ATTACH_WIDGET
 ++*prgwT.bottomWidget:		prgwS
 ++*prgwT.translations:		#override\n\
 ++				<ConfigureNotify>:	pwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(pf)\n\
 ++				<Key>osfPageUp:		SimCmd(pb)\n\
 ++				<Key>osfDown:		SimCmd("pf 1")\n\
 ++				<Key>osfUp:		SimCmd("pb 1")
 ++
 ++*prgwS.leftAttachment:		ATTACH_FORM
 ++*prgwS.rightAttachment:		ATTACH_FORM
 ++*prgwS.bottomAttachment:	ATTACH_WIDGET
 ++*prgwS.bottomWidget:		prgwRC
 ++
 ++*prgwRC.adjustLast:		False
 ++*prgwRC.orientation:		HORIZONTAL
 ++*prgwRC.spacing:		10
 ++*prgwRC.leftAttachment:		ATTACH_FORM
 ++*prgwRC.rightAttachment:	ATTACH_FORM
 ++*prgwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! Program Window Configure Dialog
 ++*pwConf_popup.title:		Program Window Configuration
 ++
 ++*pwConfRC.adjustLast:		False
 ++*pwConfRC.orientation:		HORIZONTAL
 ++*pwConfRC.spacing:		10
 ++*pwConfRC.leftAttachment:	ATTACH_FORM
 ++*pwConfRC.rightAttachment:	ATTACH_FORM
 ++*pwConfRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*pwConfS.leftAttachment:	ATTACH_FORM
 ++*pwConfS.rightAttachment:	ATTACH_FORM
 ++*pwConfS.bottomAttachment:	ATTACH_WIDGET
 ++*pwConfS.bottomWidget:		pwConfRC
 ++
 ++*iofs.labelString:	Instruction Offset Format:
 ++*iofs.rightAttachment:	ATTACH_WIDGET
 ++*iofs.rightWidget:	iofsrb
 ++*iofs.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*iofs.topWidget:	iofsrb
 ++*iofs.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*iofs.bottomWidget:	iofsrb
 ++
 ++*iofsrb.orientation:		HORIZONTAL
 ++*iofsrb.bottomAttachment:	ATTACH_WIDGET
 ++*iofsrb.bottomWidget:		instrb
 ++*iofsrb.bottomOffset:		2
 ++*iofsrb.rightAttachment:	ATTACH_FORM
 ++
 ++*iofshex.labelString:	Hexadecimal
 ++
 ++*iofssym.labelString:	Symbolic
 ++
 ++*iofsboth.labelString:	Both
 ++
 ++*inst.labelString:	Instruction Format:
 ++*inst.rightAttachment:	ATTACH_WIDGET
 ++*inst.rightWidget:	instrb
 ++*inst.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*inst.topWidget:	instrb
 ++*inst.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*inst.bottomWidget:	instrb
 ++
 ++*instrb.orientation:		HORIZONTAL
 ++*instrb.bottomAttachment:	ATTACH_WIDGET
 ++*instrb.bottomWidget:		pwConfS
 ++*instrb.bottomOffset:		2
 ++*instrb.rightAttachment:	ATTACH_FORM
 ++
 ++*insthex.labelString:	Hexadecimal
 ++
 ++*instsym.labelString:	Disassembled
 ++
 ++*instboth.labelString:	Both
 ++
 ++! Program Window Goto Dialog
 ++*pwGoto_popup.title:		Program Window Goto
 ++
 ++*pwGotoRC.adjustLast:		False
 ++*pwGotoRC.orientation:		HORIZONTAL
 ++*pwGotoRC.spacing:		10
 ++*pwGotoRC.leftAttachment:	ATTACH_FORM
 ++*pwGotoRC.rightAttachment:	ATTACH_FORM
 ++*pwGotoRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*pwGotoS.leftAttachment:	ATTACH_FORM
 ++*pwGotoS.rightAttachment:	ATTACH_FORM
 ++*pwGotoS.bottomAttachment:	ATTACH_WIDGET
 ++*pwGotoS.bottomWidget:		pwGotoRC
 ++
 ++*pwOffset.rightAttachment:	ATTACH_FORM
 ++*pwOffset.bottomAttachment:	ATTACH_WIDGET
 ++*pwOffset.bottomWidget:		pwGotoS
 ++
 ++*pwOffsetL.labelString:		Offset:
 ++*pwOffsetL.rightAttachment:	ATTACH_WIDGET
 ++*pwOffsetL.rightWidget:		pwOffset
 ++*pwOffsetL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwOffsetL.topWidget:		pwOffset
 ++*pwOffsetL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwOffsetL.bottomWidget:	pwOffset
 ++
 ++*pwSpace.rightAttachment:	ATTACH_FORM
 ++*pwSpace.bottomAttachment:	ATTACH_WIDGET
 ++*pwSpace.bottomWidget:		pwOffset
 ++
 ++*pwSpaceL.labelString:		Space:
 ++*pwSpaceL.rightAttachment:	ATTACH_WIDGET
 ++*pwSpaceL.rightWidget:		pwSpace
 ++*pwSpaceL.topAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwSpaceL.topWidget:		pwSpace
 ++*pwSpaceL.bottomAttachment:	ATTACH_OPPOSITE_WIDGET
 ++*pwSpaceL.bottomWidget:		pwSpace
 ++
 ++*pwAddr.orientation:		HORIZONTAL
 ++*pwAddr.leftAttachment:		ATTACH_FORM
 ++*pwAddr.topAttachment:		ATTACH_FORM
 ++*pwAddr.bottomAttachment:	ATTACH_WIDGET
 ++*pwAddr.bottomWidget:		pwSpace
 ++
 ++! Data Window
 ++*datw_popup.title:		Data Window
 ++*datw_popup.geometry:		x225+0-0
 ++*datw.defaultPosition:		False
 ++
 ++*datwH.alignment:		ALIGNMENT_BEGINNING
 ++*datwH.leftAttachment:		ATTACH_FORM
 ++*datwH.rightAttachment:		ATTACH_FORM
 ++*datwH.topAttachment:		ATTACH_FORM
 ++
 ++*datwT.rows:			12
 ++*datwT.editMode:		MULTI_LINE_EDIT
 ++*datwT.editable:		False
 ++*datwT.autoShowCursorPosition:	False
 ++*datwT.cursorPositionVisible:	False
 ++*datwT.resizeWidth:		True
 ++*datwT.leftAttachment:		ATTACH_FORM
 ++*datwT.rightAttachment:		ATTACH_FORM
 ++*datwT.topAttachment:		ATTACH_WIDGET
 ++*datwT.topWidget:		datwH
 ++*datwT.bottomAttachment:	ATTACH_WIDGET
 ++*datwT.bottomWidget:		datwS
 ++*datwT.translations:		#override \n\
 ++				<ConfigureNotify>:	dwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(df)\n\
 ++				<Key>osfPageUp:		SimCmd(db)\n\
 ++				<Key>osfDown:		SimCmd("df 1")\n\
 ++				<Key>osfUp:		SimCmd("db 1")
 ++
 ++*datwS.leftAttachment:		ATTACH_FORM
 ++*datwS.rightAttachment:		ATTACH_FORM
 ++*datwS.bottomAttachment:	ATTACH_WIDGET
 ++*datwS.bottomWidget:		datwRC
 ++
 ++*datwRC.adjustLast:		False
 ++*datwRC.orientation:		HORIZONTAL
 ++*datwRC.spacing:		10
 ++*datwRC.leftAttachment:		ATTACH_FORM
 ++*datwRC.rightAttachment:	ATTACH_FORM
 ++*datwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! VGA Window
 ++*vga_popup.title:		VGA Window
 ++*vga_popup.geometry:		640x480+0-0
 ++*vga.defaultPosition:		False
 ++
 ++*vgaH.alignment:		ALIGNMENT_BEGINNING
 ++*vgaH.leftAttachment:		ATTACH_FORM
 ++*vgaH.rightAttachment:		ATTACH_FORM
 ++*vgaH.topAttachment:		ATTACH_FORM
 ++
 ++*vgaT.rows:			24
 ++*vgaT.editMode:			MULTI_LINE_EDIT
 ++*vgaT.editable:			False
 ++*vgaT.autoShowCursorPosition:	False
 ++*vgaT.cursorPositionVisible:	False
 ++*vgaT.resizeWidth:		True
 ++*vgaT.leftAttachment:		ATTACH_FORM
 ++*vgaT.rightAttachment:		ATTACH_FORM
 ++*vgaT.topAttachment:		ATTACH_WIDGET
 ++*vgaT.topWidget:		vgaH
 ++*vgaT.bottomAttachment:		ATTACH_WIDGET
 ++*vgaT.bottomWidget:		vgaS
 ++*vgaT.translations:		#override\n\
 ++				<ConfigureNotify>:	dwResize()\n\
 ++				<Key>osfPageDown:	SimCmd(vf)\n\
 ++				<Key>osfPageUp:		SimCmd(vb)\n\
 ++				<Key>osfDown:		SimCmd("vf 1")\n\
 ++				<Key>osfUp:		SimCmd("vb 1")
 ++
 ++*vgaS.leftAttachment:		ATTACH_FORM
 ++*vgaS.rightAttachment:		ATTACH_FORM
 ++*vgaS.bottomAttachment:		ATTACH_WIDGET
 ++*vgaS.bottomWidget:		vgaRC
 ++
 ++*vgaRC.adjustLast:		False
 ++*vgaRC.orientation:		HORIZONTAL
 ++*vgaRC.spacing:			10
 ++*vgaRC.leftAttachment:		ATTACH_FORM
 ++*vgaRC.rightAttachment:		ATTACH_FORM
 ++*vgaRC.bottomAttachment:	ATTACH_FORM
 ++*vgaRC.goto.sensitive:		False
 ++
 ++! Registers Window
 ++*regw_popup.title:		Registers Window
 ++*regw.noResize:			False
 ++*regw_popup.geometry:		520x475-0-0
 ++*regw.defaultPosition:		False
 ++
 ++!*regwP.marginHeight:		5
 ++!*regwP.marginWidth:		10
 ++!*regwP.refigureMode:		False
 ++!*regwP.sashHeight:		20
 ++!*regwP.sashWidth:		15
 ++!*regwP.sashIdent:		-20
 ++!*regwP.separatorOn:		False
 ++!*regwP.spacing:			2
 ++!*regwP.shadowThickness:		5
 ++
 ++*regwP.leftAttachment:		ATTACH_FORM
 ++*regwP.rightAttachment:		ATTACH_FORM
 ++*regwP.topAttachment:		ATTACH_FORM
 ++*regwP.bottomAttachment:	ATTACH_WIDGET
 ++*regwP.bottomWidget:		regwS
 ++
 ++*regwS.leftAttachment:		ATTACH_FORM
 ++*regwS.rightAttachment:		ATTACH_FORM
 ++*regwS.bottomAttachment:	ATTACH_WIDGET
 ++*regwS.bottomWidget:		regwRC
 ++
 ++*regwRC.adjustLast:		False
 ++*regwRC.orientation:		HORIZONTAL
 ++*regwRC.spacing:		10
 ++*regwRC.leftAttachment:		ATTACH_FORM
 ++*regwRC.rightAttachment:	ATTACH_FORM
 ++*regwRC.bottomAttachment:	ATTACH_FORM
 ++
 ++! Registers Window Configure Dialog
 ++*rwConf_popup.title:		Registers Window Configuration
 ++
 ++*rwConfRC.adjustLast:		False
 ++*rwConfRC.orientation:		HORIZONTAL
 ++*rwConfRC.spacing:		10
 ++*rwConfRC.leftAttachment:	ATTACH_FORM
 ++*rwConfRC.rightAttachment:	ATTACH_FORM
 ++*rwConfRC.bottomAttachment:	ATTACH_FORM
 ++
 ++*rwConfS.leftAttachment:	ATTACH_FORM
 ++*rwConfS.rightAttachment:	ATTACH_FORM
 ++*rwConfS.bottomAttachment:	ATTACH_WIDGET
 ++*rwConfS.bottomWidget:		rwConfRC
 ++
 ++*rwConfT.orientation:		HORIZONTAL
 ++*rwConfT.numColumns:		2
 ++*rwConfT.packing:		PACK_COLUMN
 ++*rwConfT.leftAttachment:	ATTACH_FORM
 ++*rwConfT.rightAttachment:	ATTACH_FORM
 ++*rwConfT.bottomAttachment:	ATTACH_WIDGET
 ++*rwConfT.bottomWidget:		rwConfS
 ++
 ++*rwConfT.urs.labelString:	URs
 ++*rwConfT.grs.labelString:	GRs
 ++*rwConfT.frs.labelString:	FRs
 ++*rwConfT.srs.labelString:	SRs
 ++
 ++! Symlist Window
 ++*symlist_popup.title:		Symbols
 ++*symlist_popup.geometry:	+300+100
 ++
 ++! Cmdhelp Window
 ++*cmdhelp_popup.title:		Commands
 ++*cmdhelp_popup.geometry:	+400+150
 ++
 ++! Callstack Window
 ++*callstack_popup.title:		Call Stack
 ++*callstack_popup.geometry:	+500+200
 ++
 ++! Breakpoint Window
 ++*breakpoints_popup.title:	Breakpoints
 ++*breakpoints_popup.geometry:	+600+250
 ++
 ++! Register Dump Window
 ++*regdump_popup.title:		Register Dump
 ++*regdump_popup.geometry:	+700+300
 ++
 ++! Program Dump Window
 ++*progdump_popup.title:		Program Dump
 ++*progdump_popup.geometry:	+800+350
 ++
 ++! Data Dump Window
 ++*datadump_popup.title:		Data Dump
 ++*datadump_popup.geometry:	+900+400
 ++
 ++! Instruction TLB Dump Window
 ++*itlblist_popup.title:		Instruction TLB
 ++
 ++! Data TLB Dump Window
 ++*dtlblist_popup.title:		Data TLB
 ++
 ++! See man-page for VirtualBindings(3) (included in OpenMotif):
 ++*defaultVirtualBindings: \
 ++	osfBackSpace:		<Key>BackSpace\n\
 ++	osfPageDown:		<Key>Next\n\
 ++	osfPageUp:		<Key>Prior\n\
 ++	osfDown:		<Key>Down\n\
 ++	osfUp:			<Key>Up\n
 Index: patches/patch-ad
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ad,v
 retrieving revision 1.1.1.1
 diff -u -r1.1.1.1 patch-ad
 --- patches/patch-ad	27 Jul 2011 10:23:48 -0000	1.1.1.1
 +++ patches/patch-ad	12 Aug 2016 02:35:45 -0000
 @@ -1,17 +1,21 @@
  $NetBSD: patch-ad,v 1.1.1.1 2011/07/27 10:23:48 cherry Exp $

 ---- src/Makefile.am.orig	2008-02-05 04:11:38.000000000 +0000
 -+++ src/Makefile.am
 -@@ -130,7 +130,7 @@ if LINUX
 +--- src/Makefile.am.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/Makefile.am	2016-08-11 11:25:48.000000000 -0400
 +@@ -130,7 +130,11 @@
   ski_LDFLAGS = 
   endif

  -ski_LDADD= libski.la -ldl
 ++if NETBSD
 ++ski_LDFLAGS=
 ++endif
 ++
  +ski_LDADD= libski.la

   skiincludedir= $(includedir)/ski-$(SKI_MAJOR_VERSION).$(SKI_MINOR_VERSION)
   skiinclude_HEADERS= \
 -@@ -226,6 +226,23 @@ else
 +@@ -226,6 +230,23 @@
   freebsd_FILES =
   endif

 @@ -35,7 +39,7 @@
   libski_la_SOURCES= \
   	$(COMBFNS_DERIVED) \
   	$(PREDECODE_DERIVED) \
 -@@ -252,6 +269,7 @@ libski_la_SOURCES= \
 +@@ -252,6 +273,7 @@
   	$(linux_FILES) \
   	$(hpux_FILES) \
   	$(freebsd_FILES) \
 @@ -43,7 +47,7 @@
   	libsym.c \
   	$(ASM_HASH_DERIVED) \
   	$(IADAS_DECODER_DERIVED) \
 -@@ -288,6 +306,7 @@ EXTRA_libski_la_SOURCES = \
 +@@ -288,6 +310,7 @@
   	$(EXTRA_linux_FILES) \
   	$(EXTRA_hpux_FILES) \
   	$(EXTRA_freebsd_FILES) \
 Index: patches/patch-ae
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ae,v
 retrieving revision 1.2
 diff -u -r1.2 patch-ae
 --- patches/patch-ae	26 Jan 2013 23:11:14 -0000	1.2
 +++ patches/patch-ae	12 Aug 2016 02:35:45 -0000
 @@ -1,11 +1,8 @@
 -$NetBSD: patch-ae,v 1.2 2013/01/26 23:11:14 wiz Exp $
 +$NetBSD$

 -Second chunk: automake-1.13 compat
 -Rest: ?
 -
 ---- configure.ac.orig	2008-02-05 04:11:37.000000000 +0000
 -+++ configure.ac
 -@@ -33,12 +33,14 @@ case $host_os in
 +--- configure.ac	2008-02-04 23:11:37.000000000 -0500
 ++++ configure.ac	2016-04-20 20:09:24.000000000 -0400
 +@@ -33,12 +33,14 @@
       linux*)	HOST_OS=linux;;
       hpux*)	HOST_OS=hpux;;
       freebsd*)	HOST_OS=freebsd;;
 @@ -20,7 +17,7 @@

   # Version number definitions
   #
 -@@ -80,12 +82,11 @@ AC_PREFIX_DEFAULT(/usr/local)
 +@@ -80,12 +82,11 @@
   AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

   # Specify a configuration file
 @@ -34,7 +31,7 @@
   AM_PROG_AS
   AC_PROG_INSTALL
   AC_PROG_LN_S
 -@@ -259,6 +260,10 @@ if test "$HOST_OS" = freebsd; then
 +@@ -259,6 +260,10 @@
   	LDFLAGS="$LDFLAGS -lutil"
   fi

 @@ -45,7 +42,7 @@
   dnl Check for optional libs
   AC_CHECK_LIB(unwind-ia64, _Uia64_get_proc_name, )

 -@@ -331,6 +336,13 @@ if test "$HOST_OS" = hpux; then
 +@@ -331,6 +336,13 @@
           check_curses=no], [])
   fi    

 @@ -59,7 +56,7 @@
   if test "x$check_curses" != xno; then
   AC_CHECK_LIB(curses, tgetent, [],
       [AC_CHECK_LIB(ncurses, tgetent, ,
 -@@ -347,6 +359,7 @@ case $host_os in
 +@@ -347,6 +359,7 @@
       hpux10*)	CFLAGS="$CFLAGS -DHPUX1020";;
       hpux11*)	CFLAGS="$CFLAGS -DHPUX1100";;
       freebsd*)	CFLAGS="$CFLAGS -DFREEBSD -D__linux__";;
 Index: patches/patch-an
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-an,v
 retrieving revision 1.1.1.1
 diff -u -r1.1.1.1 patch-an
 --- patches/patch-an	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patches/patch-an	12 Aug 2016 02:35:45 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-an,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

  --- src/netbsd/ssc-netbsd.c.orig	2010-11-04 05:01:51.000000000 +0000
 -+++ src/netbsd/ssc-netbsd.c
 -@@ -0,0 +1,463 @@
 ++++ src/netbsd/ssc-netbsd.c	2016-05-06 14:44:42.000000000 -0400
 +@@ -0,0 +1,464 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -103,6 +103,7 @@
  +	tcgetattr(fin, &tios);
  +	saved_tios = tios;
  +	tios.c_lflag &= ~(ICANON|ECHO);
 ++	tios.c_iflag &= ~(ICRNL);	/* do not map CR to NL on input */
  +	tcsetattr(fin, TCSANOW, &tios);
  +	atexit(restore_tios);
  +	fdin = fin;
 Index: patches/patch-ap
 ===================================================================
 RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ap,v
 retrieving revision 1.1.1.1
 diff -u -r1.1.1.1 patch-ap
 --- patches/patch-ap	27 Jul 2011 10:23:50 -0000	1.1.1.1
 +++ patches/patch-ap	12 Aug 2016 02:35:45 -0000
 @@ -1,8 +1,8 @@
 -$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
 +$NetBSD$

 ---- src/netbsd/syscall-netbsd.h.orig	2009-12-16 13:06:31.000000000 +0000
 -+++ src/netbsd/syscall-netbsd.h
 -@@ -0,0 +1,144 @@
 +--- src/netbsd/syscall-netbsd.h.orig	2016-04-19 05:58:13.000000000 -0400
 ++++ src/netbsd/syscall-netbsd.h	2016-04-19 05:59:45.000000000 -0400
 +@@ -0,0 +1,139 @@
  +/*
  + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
  + *
 @@ -63,9 +63,6 @@
  +	long64	tv_nsec;
  +};
  +
 -+
 -+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	*/
 -+
  +struct stat64 {
  +	dev_t	  st_dev;		/* inode's device */
  +	mode_t	  st_mode;		/* inode protection mode */
 @@ -98,8 +95,6 @@
  +	uint32_t  st_spare[2];
  +};
  +
 -+
 -+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	 */
  +struct statvfs64 {
  +	unsigned long	f_flag;		/* copy of mount exported flags */
  +	unsigned long	f_bsize;	/* file system block size */
 Index: patches/patch-src-line_separator.h
 ===================================================================
 RCS file: patches/patch-src-line_separator.h
 diff -N patches/patch-src-line_separator.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-src-line_separator.h	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,13 @@
 +$NetBSD$
 +
 +Do not use carriage returns on unix which messes up ncurses display of code.
 +
 +--- src/line_separator.h.orig	2016-04-17 06:52:45.000000000 -0400
 ++++ src/line_separator.h	2016-04-17 06:27:01.000000000 -0400
 +@@ -0,0 +1,6 @@
 ++/* XXX */
 ++#if  defined(__CYGWIN__) || defined(_WIN32)
 ++#define LINE_SEPARATOR "\r\n"
 ++#else
 ++#define LINE_SEPARATOR "\n"
 ++#endif
 Index: patches/patch-src_eparse.y
 ===================================================================
 RCS file: patches/patch-src_eparse.y
 diff -N patches/patch-src_eparse.y
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-src_eparse.y	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,50 @@
 +$NetBSD$
 +
 +Rename strtonum to strtonumber so will not get errors about duplicate functions.
 +
 +--- src/eparse.y.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/eparse.y	2016-04-17 13:31:45.000000000 -0400
 +@@ -34,7 +34,7 @@
 + extern int yylex (void );
 + static REG convert(char);
 + static REG rd8(REG);
 +-static REG strtonum(char *, int);
 ++static REG strtonumber(char *, int);
 + static void yyerror(char *);
 + 
 + %}
 +@@ -164,18 +164,18 @@
 +         ;
 + 
 + count   : based
 +-        | NOBASE                { $$ = strtonum($1, 10); }
 ++        | NOBASE                { $$ = strtonumber($1, 10); }
 +         ;
 + 
 + number  : based
 +-        | NOBASE                { $$ = strtonum($1, 16); }
 +-        | NPFXHEX               { $$ = strtonum($1, 16); }
 ++        | NOBASE                { $$ = strtonumber($1, 16); }
 ++        | NPFXHEX               { $$ = strtonumber($1, 16); }
 +         ;
 + 
 +-based   : BIN                   { $$ = strtonum($1, 2); }
 +-        | OCT                   { $$ = strtonum($1, 8); }
 +-        | DEC                   { $$ = strtonum($1, 10); }
 +-        | HEX                   { $$ = strtonum($1, 16); }
 ++based   : BIN                   { $$ = strtonumber($1, 2); }
 ++        | OCT                   { $$ = strtonumber($1, 8); }
 ++        | DEC                   { $$ = strtonumber($1, 10); }
 ++        | HEX                   { $$ = strtonumber($1, 16); }
 +         ;
 + 
 + %%
 +@@ -197,7 +197,7 @@
 +     return memMRd(0, addr, 8, &dval) ? dval : 0;
 + }
 + 
 +-static REG strtonum(char *str, int base)
 ++static REG strtonumber(char *str, int base)
 + {
 +     REG num = 0;
 + 
 Index: patches/patch-src_freebsd_signal.h
 ===================================================================
 RCS file: patches/patch-src_freebsd_signal.h
 diff -N patches/patch-src_freebsd_signal.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-src_freebsd_signal.h	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,42 @@
 +$NetBSD$
 +
 +Make FreeBSD version compile
 +
 +--- src/freebsd/signal.h.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/freebsd/signal.h	2016-04-17 13:25:40.000000000 -0400
 +@@ -42,8 +42,35 @@
 + 		int	sigval_int;
 + 		ptr64	sigval_ptr;
 + 	} si_value;
 ++
 ++  /* XXX copied from /usr/include/sys/signal.h since si_band
 ++   * is already #define'd there
 ++   */
 ++#if 0
 + 	long	si_band;
 + 	int	__spare__[7];
 ++#else
 ++	union   {
 ++	  struct {
 ++	    int     _trapno;/* machine specific trap code */
 ++	  } _fault;
 ++	  struct {
 ++	    int     _timerid;
 ++	    int     _overrun;
 ++	  } _timer;
 ++	  struct {
 ++	    int     _mqd;
 ++	  } _mesgq;
 ++	  struct {
 ++	    long    _band;          /* band event for SIGPOLL */
 ++	  } _poll;                        /* was this ever used ? */
 ++	  struct {
 ++	    long    __spare1__;
 ++	    int     __spare2__[7];
 ++	  } __spare__;
 ++	} _reason;
 ++#endif
 ++  
 + };
 + 
 + int signal_get_handler(int, struct sigaction64 *);
 Index: patches/patch-src_program.c
 ===================================================================
 RCS file: patches/patch-src_program.c
 diff -N patches/patch-src_program.c
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-src_program.c	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,43 @@
 +$NetBSD$
 +
 +Use correct line separators.
 +
 +--- src/program.c.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/program.c	2016-04-17 06:24:07.000000000 -0400
 +@@ -43,6 +43,7 @@
 + #include "ia_exec.h"
 + #include "state.h"
 + #include "simmem.h"
 ++#include "line_separator.h"
 + 
 + static char instPtr(ADDR addr, char *dline);
 + static IAinstInfoPtr addrToIAinfo(ADDR adr, BYTE iAmode, unsigned *nbytes);
 +@@ -268,11 +269,11 @@
 + 	dasInit(DasPseudoOps|DasTemplate|DasRegNames, prgColumns - 20);
 + 	dasBundle(&bndl, i0Str, i1Str, i2Str);
 + 	ipp = instPtr(ofs, i0Str);
 +-	p += sprintf(p, "%s%c%c %s %s\r\n", srcp, bpn, ipp, buf, i0Str);
 ++	p += sprintf(p, "%s%c%c %s %s%s", srcp, bpn, ipp, buf, i0Str, LINE_SEPARATOR);
 + 	if (i1Str[0]) {		/* not MLX */
 + 	    bpn = ((i = isbpt(ofs + 4)) >= 0) ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 4, i1Str);
 +-	    p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i1Str);
 ++	    p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i1Str, LINE_SEPARATOR);
 + 	    bpn = ((i = isbpt(ofs + 8)) >= 0) ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 8, i2Str);
 + 	} else {		/* MLX */
 +@@ -280,12 +281,12 @@
 + 		    ? (i + '0') : ' ';
 + 	    ipp = instPtr(ofs + 4, i2Str);
 + 	}
 +-	p += sprintf(p, "%c%c %16s %s\r\n", bpn, ipp, "", i2Str);
 ++	p += sprintf(p, "%c%c %16s %s%s", bpn, ipp, "", i2Str, LINE_SEPARATOR);
 + 	*asmrows = i1Str[0] ? 3 : 2;
 +     } else {
 + xxx:
 + 	ipp = (ipGet(viewPid) == ofs) ? '>' : ' ';
 +-	(void)sprintf(line, "%c%c %s xxxxxxxx\r\n", bpn, ipp, buf);
 ++	(void)sprintf(line, "%c%c %s xxxxxxxx%s", bpn, ipp, buf, LINE_SEPARATOR);
 + 	*srcrows = 0;
 + 	*asmrows = 1;
 +     }
 Index: patches/patch-src_ssDCmd.c
 ===================================================================
 RCS file: patches/patch-src_ssDCmd.c
 diff -N patches/patch-src_ssDCmd.c
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-src_ssDCmd.c	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,32 @@
 +$NetBSD$
 +
 +Use correct line separators.
 +
 +--- src/ssDCmd.c.orig	2008-02-04 23:11:38.000000000 -0500
 ++++ src/ssDCmd.c	2016-04-17 06:26:02.000000000 -0400
 +@@ -42,6 +42,7 @@
 + #include "libcore.h"
 + #include "dos.h"
 + #include "libtrace.h"
 ++#include "line_separator.h"
 + 
 + #define MAXFILEDEPTH	16
 + #define MAXCMDLEN	4000
 +@@ -630,7 +631,7 @@
 + 	    p = strtok(NULL, " \t");
 + 	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
 + 	    adr = (seg << 4) + ofs + start + symOffset;
 +-        if ((p = strtok(NULL, " \t\r\n")))
 ++	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
 + 		symInsert(p, adr, 0);
 + 	}
 + 	(void)fclose(fp);
 +@@ -733,7 +734,7 @@
 + 	    p = strtok(NULL, " \t");
 + 	    ofs = p ? (ADDR)strtoul(p, 0, 16) : 0;
 + 	    adr = (seg << 4) + ofs + start;
 +-	    if ((p = strtok(NULL, " \t\r\n")))
 ++	    if ((p = strtok(NULL, " \t"LINE_SEPARATOR)))
 + 		symInsert(p, adr, 0);
 + 	}
 + 	(void)fclose(fp);
 Index: patches/patch-src_ssX.c
 ===================================================================
 RCS file: patches/patch-src_ssX.c
 diff -N patches/patch-src_ssX.c
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-src_ssX.c	12 Aug 2016 02:35:45 -0000
 @@ -0,0 +1,39 @@
 +$NetBSD$
 +
 +Find default X resource file.
 +
 +--- src/ssX.c.orig	2008-02-04 23:11:37.000000000 -0500
 ++++ src/ssX.c		2016-04-28 09:45:23.000000000 -0400
 +@@ -49,6 +49,7 @@
 + #include "coreui.h"
 + #include "ssDCmd.h"
 + #include "libcore.h"
 ++#include "line_separator.h"
 + 
 + #if 0
 + /* Include files not needed for now in the simulator */
 +@@ -174,6 +175,24 @@
 +     Arg args[10];
 +     unsigned i, n;
 +     int argc = 0;
 ++    const char* xenv = "XENVIRONMENT";
 ++    const char* genv = getenv(xenv);
 ++    const char* xski_rc = "XSKI_RESOURCE_FILE";
 ++    
 ++    /*
 ++     * XXX how to add pkgsrc paths to X app-default search path?  For
 ++     * simplicity, just set environment variable or give warning if
 ++     * already set.  If XSki app-defaults not found, xski will display
 ++     * jumbled gui but doesn't look like it can run.
 ++     */
 ++    if (genv && (strcmp(genv, xski_rc) != 0)) {
 ++	printf("WARNING: If GUI not displayed correctly, try setting "
 ++	       "environment variable \"%s\" to \"%s\"%s",
 ++	       xenv, xski_rc, LINE_SEPARATOR);
 ++    }
 ++    else {
 ++	setenv(xenv, xski_rc, 0);
 ++    }
 + 
 +     addRegwRsrcOpts();
 +     addDatwRsrcOpts();

State-Changed-From-To: open->closed
State-Changed-By: scole@NetBSD.org
State-Changed-When: Mon, 15 Aug 2016 09:14:12 -0400
State-Changed-Why:
Checked into pkgsrc current


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.