summaryrefslogtreecommitdiff
path: root/x11/xview-lib
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2001-12-20 09:19:53 +0000
committertron <tron@pkgsrc.org>2001-12-20 09:19:53 +0000
commit71146f333ee2015a1dc555b20853e181378164cc (patch)
tree4f262d25e837db12d2b8bd96b651b1c07c0cad61 /x11/xview-lib
parent268024ad5e826b779fdedb01575611de8d642d89 (diff)
downloadpkgsrc-71146f333ee2015a1dc555b20853e181378164cc.tar.gz
Cleanup patch files:
- unified format - only one patch per file - no files gets patched twice
Diffstat (limited to 'x11/xview-lib')
-rw-r--r--x11/xview-lib/distinfo133
-rw-r--r--x11/xview-lib/patches/patch-aa98
-rw-r--r--x11/xview-lib/patches/patch-ab77
-rw-r--r--x11/xview-lib/patches/patch-ac50
-rw-r--r--x11/xview-lib/patches/patch-ad2323
-rw-r--r--x11/xview-lib/patches/patch-ae183
-rw-r--r--x11/xview-lib/patches/patch-af46
-rw-r--r--x11/xview-lib/patches/patch-ag34
-rw-r--r--x11/xview-lib/patches/patch-ah32
-rw-r--r--x11/xview-lib/patches/patch-ai79
-rw-r--r--x11/xview-lib/patches/patch-aj80
-rw-r--r--x11/xview-lib/patches/patch-ak42
-rw-r--r--x11/xview-lib/patches/patch-al54
-rw-r--r--x11/xview-lib/patches/patch-am28
-rw-r--r--x11/xview-lib/patches/patch-an35
-rw-r--r--x11/xview-lib/patches/patch-ao37
-rw-r--r--x11/xview-lib/patches/patch-ap34
-rw-r--r--x11/xview-lib/patches/patch-aq95
-rw-r--r--x11/xview-lib/patches/patch-ar35
-rw-r--r--x11/xview-lib/patches/patch-as28
-rw-r--r--x11/xview-lib/patches/patch-at129
-rw-r--r--x11/xview-lib/patches/patch-au44
-rw-r--r--x11/xview-lib/patches/patch-av69
-rw-r--r--x11/xview-lib/patches/patch-aw80
-rw-r--r--x11/xview-lib/patches/patch-ax33
-rw-r--r--x11/xview-lib/patches/patch-ay73
-rw-r--r--x11/xview-lib/patches/patch-az31
-rw-r--r--x11/xview-lib/patches/patch-ba21
-rw-r--r--x11/xview-lib/patches/patch-bb12
-rw-r--r--x11/xview-lib/patches/patch-bc22
-rw-r--r--x11/xview-lib/patches/patch-bd22
-rw-r--r--x11/xview-lib/patches/patch-be13
-rw-r--r--x11/xview-lib/patches/patch-bf22
-rw-r--r--x11/xview-lib/patches/patch-bg22
-rw-r--r--x11/xview-lib/patches/patch-bh22
-rw-r--r--x11/xview-lib/patches/patch-bi13
-rw-r--r--x11/xview-lib/patches/patch-bj16
-rw-r--r--x11/xview-lib/patches/patch-bk12
-rw-r--r--x11/xview-lib/patches/patch-bl60
-rw-r--r--x11/xview-lib/patches/patch-bm12
-rw-r--r--x11/xview-lib/patches/patch-bn15
-rw-r--r--x11/xview-lib/patches/patch-bo24
-rw-r--r--x11/xview-lib/patches/patch-bp32
-rw-r--r--x11/xview-lib/patches/patch-bq12
-rw-r--r--x11/xview-lib/patches/patch-br12
-rw-r--r--x11/xview-lib/patches/patch-bs12
-rw-r--r--x11/xview-lib/patches/patch-bt13
-rw-r--r--x11/xview-lib/patches/patch-bu13
-rw-r--r--x11/xview-lib/patches/patch-bv23
-rw-r--r--x11/xview-lib/patches/patch-bw17
-rw-r--r--x11/xview-lib/patches/patch-bx12
-rw-r--r--x11/xview-lib/patches/patch-by12
-rw-r--r--x11/xview-lib/patches/patch-bz13
-rw-r--r--x11/xview-lib/patches/patch-ca13
-rw-r--r--x11/xview-lib/patches/patch-cb17
-rw-r--r--x11/xview-lib/patches/patch-cc12
-rw-r--r--x11/xview-lib/patches/patch-cd22
-rw-r--r--x11/xview-lib/patches/patch-ce85
-rw-r--r--x11/xview-lib/patches/patch-cf13
-rw-r--r--x11/xview-lib/patches/patch-cg16
-rw-r--r--x11/xview-lib/patches/patch-ch41
-rw-r--r--x11/xview-lib/patches/patch-ci26
-rw-r--r--x11/xview-lib/patches/patch-cj77
-rw-r--r--x11/xview-lib/patches/patch-ck29
-rw-r--r--x11/xview-lib/patches/patch-cl46
-rw-r--r--x11/xview-lib/patches/patch-cm15
-rw-r--r--x11/xview-lib/patches/patch-cn13
-rw-r--r--x11/xview-lib/patches/patch-co13
-rw-r--r--x11/xview-lib/patches/patch-cp28
-rw-r--r--x11/xview-lib/patches/patch-cq17
-rw-r--r--x11/xview-lib/patches/patch-cr27
-rw-r--r--x11/xview-lib/patches/patch-cs12
-rw-r--r--x11/xview-lib/patches/patch-ct13
-rw-r--r--x11/xview-lib/patches/patch-cu14
-rw-r--r--x11/xview-lib/patches/patch-cv15
-rw-r--r--x11/xview-lib/patches/patch-cw102
-rw-r--r--x11/xview-lib/patches/patch-cx35
-rw-r--r--x11/xview-lib/patches/patch-cy59
-rw-r--r--x11/xview-lib/patches/patch-cz13
-rw-r--r--x11/xview-lib/patches/patch-da22
-rw-r--r--x11/xview-lib/patches/patch-db32
-rw-r--r--x11/xview-lib/patches/patch-dc13
-rw-r--r--x11/xview-lib/patches/patch-dd13
-rw-r--r--x11/xview-lib/patches/patch-de31
-rw-r--r--x11/xview-lib/patches/patch-df13
-rw-r--r--x11/xview-lib/patches/patch-dg77
-rw-r--r--x11/xview-lib/patches/patch-dh57
-rw-r--r--x11/xview-lib/patches/patch-di15
-rw-r--r--x11/xview-lib/patches/patch-dj82
-rw-r--r--x11/xview-lib/patches/patch-dk12
-rw-r--r--x11/xview-lib/patches/patch-dl16
-rw-r--r--x11/xview-lib/patches/patch-dm33
-rw-r--r--x11/xview-lib/patches/patch-dn16
-rw-r--r--x11/xview-lib/patches/patch-do16
-rw-r--r--x11/xview-lib/patches/patch-dp16
-rw-r--r--x11/xview-lib/patches/patch-dq45
-rw-r--r--x11/xview-lib/patches/patch-dr29
-rw-r--r--x11/xview-lib/patches/patch-ds38
-rw-r--r--x11/xview-lib/patches/patch-dt22
-rw-r--r--x11/xview-lib/patches/patch-du63
-rw-r--r--x11/xview-lib/patches/patch-dv16
-rw-r--r--x11/xview-lib/patches/patch-dw16
-rw-r--r--x11/xview-lib/patches/patch-dx15
-rw-r--r--x11/xview-lib/patches/patch-dy17
-rw-r--r--x11/xview-lib/patches/patch-dz15
-rw-r--r--x11/xview-lib/patches/patch-ea14
-rw-r--r--x11/xview-lib/patches/patch-eb13
107 files changed, 2755 insertions, 3246 deletions
diff --git a/x11/xview-lib/distinfo b/x11/xview-lib/distinfo
index 44fe7017ae0..1323bd2109a 100644
--- a/x11/xview-lib/distinfo
+++ b/x11/xview-lib/distinfo
@@ -1,29 +1,110 @@
-$NetBSD: distinfo,v 1.4 2001/05/11 20:41:32 dmcmahill Exp $
+$NetBSD: distinfo,v 1.5 2001/12/20 09:19:53 tron Exp $
SHA1 (xview3.2p1-X11R6.tar.gz) = 1cd04231b893c3e6c70b56791d527b498e21a27a
Size (xview3.2p1-X11R6.tar.gz) = 3436814 bytes
-SHA1 (patch-aa) = 4cf1c3f9956ba134f6fa9cc200a6ff3ca909dd1a
-SHA1 (patch-ab) = 6be2df532fd7c45295a63d541e7c2ea7b4e05ef9
-SHA1 (patch-ac) = 743122cc518d3fb0bde26fe15115e09a51972811
-SHA1 (patch-ad) = d04e53681cfec0195483477713ee8c23f5dea876
-SHA1 (patch-ae) = 487e031de5a7fd5a87b77906baf52958029618c2
-SHA1 (patch-af) = 566fbcd79befbd4e76e55a2ba9a314e0694b8ce6
-SHA1 (patch-ag) = 35c93445b7d4b6026ce10499e2618ab90a4893ad
-SHA1 (patch-ah) = 0c04a31a0b02aedf89dc2ecbeac8b4fe3044a6da
-SHA1 (patch-ai) = 47ad1ab1078f10793f2f992a3c9082e0aaf12eca
-SHA1 (patch-aj) = 2da859bde6f6454d6e9636f63153d1b1e9516be5
-SHA1 (patch-ak) = d4af300bd981d01b3c67ca21bf7da4633e04313d
-SHA1 (patch-al) = 33bd9cfe652469db787c2dbf7dd767fc1a7d2c93
-SHA1 (patch-an) = 782bca64801400eedf5f02f507332d1bab621059
-SHA1 (patch-ao) = 47c291b7cb6dbbd59185e317742405e521c0a077
-SHA1 (patch-ap) = 1fffed3db2dd87d0cc8ab37ce27f1bd4c9e688e6
-SHA1 (patch-aq) = 83f956c1ddb8247974e50b3e25de6c9dbdc8920b
-SHA1 (patch-ar) = 14ba128cb87204c7a598f072c05efedd8222abc0
-SHA1 (patch-as) = 921246ec18295d302153699c93236a7248cbbd6b
-SHA1 (patch-at) = f3d2d2882fba49f56f938b9bfafb36536996b0b6
-SHA1 (patch-au) = 9650ee87880b33897441163acd15d94ae55b3f83
-SHA1 (patch-av) = 2468b7f58eefc7ba9b12987667b5c68b1159b778
-SHA1 (patch-aw) = 0cdec09fb4066373db384331f56cf95a8b31b003
-SHA1 (patch-ax) = 613f99d1034a31b4dbbdecc9866b7bb766084e22
-SHA1 (patch-ay) = f86730b138128357eecbda236d75ed05d9e1fcac
-SHA1 (patch-az) = b274804ceccd9795a45e25b26c39ab9cd004b511
+SHA1 (patch-aa) = 8fa528f2569e395fc432c19bc70fd14b16f0f80f
+SHA1 (patch-ab) = f119539e73ce6885a9b1ec155e61076ede89b752
+SHA1 (patch-ac) = 56484fc24a4ad8ccbe8067bb703179b3e74582ca
+SHA1 (patch-ad) = 7260078b17bb0cc905c626965572b3510259cc42
+SHA1 (patch-ae) = 7cc93ff7a26d1b01518b244c7fb0a0e79d7b4b7c
+SHA1 (patch-af) = 87e21efc3f3fe59889136b6ee836fdc49c9edad4
+SHA1 (patch-ag) = 2329e9cb1290f7704e547b328d0e852c7ff56a18
+SHA1 (patch-ah) = 7331c4107005cfc98c6507f62b567f765d56aaff
+SHA1 (patch-ai) = 8f1dfe2f952db58f1ce2ddad80efcddc337199b6
+SHA1 (patch-aj) = 9acc575fb736b7c4ec6448cab1f98f1ff00ea34e
+SHA1 (patch-ak) = 5c59e967d89e379108feae01f41c349d13188b11
+SHA1 (patch-al) = b5a795c0eef28302276b112ee34feb5dc3fbf460
+SHA1 (patch-am) = 1b9e3bef2b06633fb3511ff567b51251293f60ab
+SHA1 (patch-an) = d62ec6aaaf1e8924b12b117c12dae8f9f79c15ff
+SHA1 (patch-ao) = 1e2fbe85d98238145fbcf6aec95c449fed66cf7c
+SHA1 (patch-ap) = 5458cd0e65dcca28da727d17494350369ece59f0
+SHA1 (patch-aq) = 7a13c8cd72b88061308fd85033fe53e1b1b6affe
+SHA1 (patch-ar) = ceaa2183c93e39b65ee48e5d13465c841d80e671
+SHA1 (patch-as) = 5fefb12b0c5f087d371f8241b028adedd0810435
+SHA1 (patch-at) = af83ab47d41ea040d48bea141a1cf038c500aa94
+SHA1 (patch-au) = 4be6221b6b3660d5c74c043b7edf8aae946b7148
+SHA1 (patch-av) = fea7e5575fe913dfedbdd1e744ac60b75be737d2
+SHA1 (patch-aw) = e848355e0b704bdf6d726dc00cd4a49353e5eddb
+SHA1 (patch-ax) = a286aade16c09dec32698cb175e5cf4634260b25
+SHA1 (patch-ay) = 4ca316c0b53c8624070e9ef106799587cba4dc02
+SHA1 (patch-az) = 45e1f2faa2236ababcdda9543be3eb99ea96a44e
+SHA1 (patch-ba) = 2da120b088d67b0e9ef8da57997839fb9eb8bbc6
+SHA1 (patch-bb) = c1e12875a186a54e3ae1b73937dd5138b1d6e369
+SHA1 (patch-bc) = fe68f9c615e18efbead4845c982fd5b45ae6f459
+SHA1 (patch-bd) = 26bf677853829de6e3890a6878f8eb8c5bdd0acb
+SHA1 (patch-be) = cae01f00621001d6b6a6f8caa9fefdb23802ce5f
+SHA1 (patch-bf) = e9ef8998743584639959d07d811c0f7ba4abec50
+SHA1 (patch-bg) = dc144d4782761aa7b1d2c8bece52a72d374240ef
+SHA1 (patch-bh) = 5cbcfc9e39fea96be1bdea67e96fd060c9f8dfae
+SHA1 (patch-bi) = 89209c7b2b74468ca3aae5da5363887f156663b8
+SHA1 (patch-bj) = 644f5111266be02bcf2ea1182ec8fafb46c8e377
+SHA1 (patch-bk) = 38e97fcb4ed18d76fd8f910cf4688ca2e87f2642
+SHA1 (patch-bl) = 67598fa0425dd633e86d3c06d03877d99daa4df2
+SHA1 (patch-bm) = ff33e3cc6ba41f3dfddd6b2a22c060625bce8bd9
+SHA1 (patch-bn) = 44a1a7844627cfc933181d19b6116adb4661601d
+SHA1 (patch-bo) = 219ad93d0daebcc847c6b63b8727bea2ad2a2880
+SHA1 (patch-bp) = 7d77e6aa2f3decec97a427873bfd4df25f1fe0fe
+SHA1 (patch-bq) = f1da72e863f329034ee88ba1cbfefb67bd7b55a9
+SHA1 (patch-br) = 72264dc8bfc46a93a6f77186f6b4e50a94571039
+SHA1 (patch-bs) = cb87cb887804b81d37a734f7aad14471ad99ec51
+SHA1 (patch-bt) = 007ff555e8cea7276b25af708010e25c515a52e9
+SHA1 (patch-bu) = 27e19f44cfc28ab3354c73f9d9463f1a21da9995
+SHA1 (patch-bv) = d5043afd77f21109317e90832c21444f4b2eb61a
+SHA1 (patch-bw) = f93122e3f197c2aa97c8ece8e9c70a9c5fbd71e0
+SHA1 (patch-bx) = 6d93a92a9a1d1177061e6e5c5e9c4c49981159f4
+SHA1 (patch-by) = 6046f9f506cf02a03d035b591265c5d3a51f4618
+SHA1 (patch-bz) = 5e7e6798e2316701e79481be5b66a1fe5c40ada1
+SHA1 (patch-ca) = e449576f1a7fd3b25142e6638ec2d5b364547583
+SHA1 (patch-cb) = 477a0f540d0ce8c9f7cf36dcd81f8b31986a3891
+SHA1 (patch-cc) = d7c31dd95bedcc124372e86a08833352a4fde16c
+SHA1 (patch-cd) = b524da105d049b06406824582e842f6d4938933b
+SHA1 (patch-ce) = 0a4d875d578b51f1ef30eadb0228c0ad5bd44a57
+SHA1 (patch-cf) = 6addd9b52dea9c4646797405904e95853f110635
+SHA1 (patch-cg) = 9c3643e0507a62226447712b1f1173973f6ebd5f
+SHA1 (patch-ch) = 4ca1610b5ede24852dec3b3087e48680e3ec1aa2
+SHA1 (patch-ci) = 645b94302a5d6ba09f29bd5e06f321ac388b592a
+SHA1 (patch-cj) = 4d95e94699fda4a1ed26dcd63a7acece2ce7623d
+SHA1 (patch-ck) = 59b8c342a8bcd32bea0db9003e7da5b7da3d1376
+SHA1 (patch-cl) = 6ada5a7257c2495781c805f55e38d4b2b8bcc323
+SHA1 (patch-cm) = e743e951a0a4b34a60f091df0e37850bc6dde99e
+SHA1 (patch-cn) = 86bede62bc40d3213b5e4801f84707bc2088f747
+SHA1 (patch-co) = cd71d4c794a489129c985877ab45753ae139e7ce
+SHA1 (patch-cp) = d989a4a195622b2aba899d70f1700b602eeb771f
+SHA1 (patch-cq) = 3d9022971b371500bdf14f800a7e392beefefee0
+SHA1 (patch-cr) = 025e5607cd3ecbc0c261f473bf0ddb31e9f70265
+SHA1 (patch-cs) = b4b224a0215dc11e20a1e54588d166a29621a997
+SHA1 (patch-ct) = 36d8a2eaeeed831e307e74ccba97007e037b61f2
+SHA1 (patch-cu) = ce19d2151f259e0cb5358a0c4350b391da94cbd9
+SHA1 (patch-cv) = 56fffeff6ca82ca661ee5ef72deb1d328777fb3e
+SHA1 (patch-cw) = 82b15382360cd212c440bc63474bf09c5299c019
+SHA1 (patch-cx) = 55fb26597f0b6737e157af19ed3752e84d5f71f3
+SHA1 (patch-cy) = a29cbfbe902cf6c0dcb7074a873d54319db7f427
+SHA1 (patch-cz) = c54892c234cf60032b236515d0fd20c1a02a99fb
+SHA1 (patch-da) = 58f289767fd9a6f6a334e0e5a770564b780a1212
+SHA1 (patch-db) = 94c13bd10197c4b209a46da3e8008685db22adb6
+SHA1 (patch-dc) = 40274cd5581f626914bef70df477469773557e3d
+SHA1 (patch-dd) = baf2201c61088de823bb42f49427b3f53c3c4123
+SHA1 (patch-de) = 801cdb453f45a27132ad5d1d3dff158e26435b0d
+SHA1 (patch-df) = c2af3e6d2f74942ad1dd3d97c0462f7f3ffff793
+SHA1 (patch-dg) = 1c757673e8d21f90363997f853492c7d98192098
+SHA1 (patch-dh) = b0b7c1d3b99991c64e4d70a27f601993baa1f91b
+SHA1 (patch-di) = da64503892d0e421bce6f8f07da879884a757bcb
+SHA1 (patch-dj) = 685901dcf270f9028a67f0a414b5bfb83644657c
+SHA1 (patch-dk) = ed02c7f7aa8ee25c4227843e115689952f765caf
+SHA1 (patch-dl) = 0aef1fe619dc5ff228d813d816f5e974d49bf829
+SHA1 (patch-dm) = 6d3dfb8ab718bdfacaa59785304d5ae7978d4f9c
+SHA1 (patch-dn) = 68b66abb8c0b1c6aebbc8df06c193b2e7f377dcf
+SHA1 (patch-do) = 6631be46113498b433b10f8067b0ba8ed0239c5e
+SHA1 (patch-dp) = 65d121b240b0454ff40a2b27c8ed95f5527b139a
+SHA1 (patch-dq) = 951faffa9e5b377f8709c3e155b9bbf36b76e19c
+SHA1 (patch-dr) = ec77026b2c8c5339f5121070f03f96d9a7a9c6fd
+SHA1 (patch-ds) = 25d7937970d520ddd8ebf3c5260b048769694e1b
+SHA1 (patch-dt) = 38168d6d296814f166a528e35cd92c2686e8a98e
+SHA1 (patch-du) = 53a9627038f24c135d6808e737bb018a202a7bad
+SHA1 (patch-dv) = 7326dba16b9043ede173a9aeaa6eabce4a83c730
+SHA1 (patch-dw) = 9002f1f1477d4d8d1e587c19749b01fc46211615
+SHA1 (patch-dx) = 3e437213954b74af62045bc0b650ded6be73ed46
+SHA1 (patch-dy) = b336b712f3fb7964ee4a5ed76ec4cab8a5ad72b7
+SHA1 (patch-dz) = b8304af8ac019af3224f0df0212e5d4da4226eac
+SHA1 (patch-ea) = ac9158bfc79aba18b318f1e2e7ac0fa2427cfbec
+SHA1 (patch-eb) = 05fcefb5b5f0799b92828b72938a57854707a69b
diff --git a/x11/xview-lib/patches/patch-aa b/x11/xview-lib/patches/patch-aa
index e4cbf5afb0f..ecebda530b2 100644
--- a/x11/xview-lib/patches/patch-aa
+++ b/x11/xview-lib/patches/patch-aa
@@ -1,84 +1,16 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 11:18:34 agc Exp $
+$NetBSD: patch-aa,v 1.3 2001/12/20 09:19:54 tron Exp $
-diff -rc ../old/xview3.2p1-X11R6/bitmaps/Imakefile ./bitmaps/Imakefile
-*** ../old/xview3.2p1-X11R6/bitmaps/Imakefile Tue Jun 29 01:19:54 1993
---- ./bitmaps/Imakefile Sun Nov 20 13:38:56 1994
-***************
-*** 36,42 ****
-
-! all: $(SRCS)
-
-! BuildIncludes($(INCLUDES_SRCS),$(BITMAP_INCDIR),/**/)
-
- install:: $(SRCS)
- $(MKDIRHIER) $(HEADER_DEST)/$(BITMAPINC)
---- 36,42 ----
-
-! all:: $(SRCS)
-
-! BuildIncludes($(INCLUDES_SRCS),$(BITMAP_INCDIR),.)
-
- install:: $(SRCS)
- $(MKDIRHIER) $(HEADER_DEST)/$(BITMAPINC)
-diff -rc ../old/xview3.2p1-X11R6/doc/Imakefile ./doc/Imakefile
-*** ../old/xview3.2p1-X11R6/doc/Imakefile Tue Jun 29 01:13:15 1993
---- ./doc/Imakefile Sun Nov 20 13:38:59 1994
-***************
-*** 17,23 ****
- ALLFILES = $(DOCFILES)
-
- install::
-! $(MKDIRHIER) $(DOC_DEST)
-
- InstallNonExecList($(DOCFILES),$(DOC_DEST))
- PopulateSCCSTree(h,$(ALLFILES) README)
---- 17,23 ----
- ALLFILES = $(DOCFILES)
-
- install::
-! $(MKDIRHIER) $(DOC_DEST)
-
- InstallNonExecList($(DOCFILES),$(DOC_DEST))
- PopulateSCCSTree(h,$(ALLFILES) README)
-diff -rc ../old/xview3.2p1-X11R6/images/Imakefile ./images/Imakefile
-*** ../old/xview3.2p1-X11R6/images/Imakefile Tue Jun 29 01:18:41 1993
---- ./images/Imakefile Sun Nov 20 13:38:59 1994
-***************
-*** 101,107 ****
-
-! all: $(SRCS)
-
-! BuildIncludes($(INCLUDES_SRCS),$(IMAGE_INCDIR),/**/)
-
- install:: $(SRCS)
- $(MKDIRHIER) $(HEADER_DEST)/$(IMAGEINC)
---- 101,107 ----
-
-! all:: $(SRCS)
-
-! BuildIncludes($(INCLUDES_SRCS),$(IMAGE_INCDIR),.)
-
- install:: $(SRCS)
- $(MKDIRHIER) $(HEADER_DEST)/$(IMAGEINC)
-diff -rc ../old/xview3.2p1-X11R6/lib/pixrect/Imakefile ./lib/pixrect/Imakefile
-*** ../old/xview3.2p1-X11R6/lib/pixrect/Imakefile Tue Jun 29 01:18:39 1993
---- ./lib/pixrect/Imakefile Sun Nov 20 13:39:15 1994
-***************
-*** 41,48 ****
- all::
-
- #if InstallPixrectHeaders
-! BuildIncludes($(HEADERS),$(PIXRECT_INCDIR),/**/)
-! BuildIncludes($(HEADERS2),$(INCDIR),/**/)
-
- install::
- $(MKDIRHIER) $(PIXRECT_HEADER_DEST)
---- 41,48 ----
- all::
-
- #if InstallPixrectHeaders
-! BuildIncludes($(HEADERS),$(PIXRECT_INCDIR),.)
-! BuildIncludes($(HEADERS2),$(INCDIR),.)
-
- install::
- $(MKDIRHIER) $(PIXRECT_HEADER_DEST)
+--- bitmaps/Imakefile.orig Tue Jun 29 07:19:54 1993
++++ bitmaps/Imakefile Thu Dec 20 10:09:16 2001
+@@ -34,9 +34,9 @@
+
+ ALLFILES = $(BITMAPS)
+
+-all: $(SRCS)
++all:: $(SRCS)
+
+-BuildIncludes($(INCLUDES_SRCS),$(BITMAP_INCDIR),/**/)
++BuildIncludes($(INCLUDES_SRCS),$(BITMAP_INCDIR),.)
+
+ install:: $(SRCS)
+ $(MKDIRHIER) $(HEADER_DEST)/$(BITMAPINC)
diff --git a/x11/xview-lib/patches/patch-ab b/x11/xview-lib/patches/patch-ab
index a2b33d155b5..b3cced157f4 100644
--- a/x11/xview-lib/patches/patch-ab
+++ b/x11/xview-lib/patches/patch-ab
@@ -1,66 +1,13 @@
-$NetBSD: patch-ab,v 1.3 1998/08/07 11:18:35 agc Exp $
+$NetBSD: patch-ab,v 1.4 2001/12/20 09:19:54 tron Exp $
-*** lib/libxview/notify/ndet_loop.c~ Tue Nov 22 04:40:21 1994
---- lib/libxview/notify/ndet_loop.c Tue Nov 22 05:35:17 1994
-***************
-*** 21,27 ****
---- 21,31 ----
- #include <xview_private/nint.h>
- #include <xview_private/ndis.h> /* For ndis_dispatch */
- #ifndef SVR4
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <syscall.h>
-+ #else
-+ #include <sys/syscall.h>
-+ #endif
- #else SVR4
- #include <sys/syscall.h>
- #include <sys/poll.h>
-*** lib/libxview/notify/sys_fcntl.c~ Mon Jun 28 22:18:17 1993
---- lib/libxview/notify/sys_fcntl.c Tue Nov 22 07:48:49 1994
-***************
-*** 15,21 ****
---- 15,25 ----
- */
-
- #ifndef SVR4
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <syscall.h>
-+ #else
-+ #include <sys/syscall.h>
-+ #endif
- #else SVR4
- #include <sys/syscall.h>
- #endif SVR4
-*** lib/libxview/notify/sys_read.c~ Mon Jun 28 22:18:01 1993
---- lib/libxview/notify/sys_read.c Tue Nov 22 08:16:11 1994
-***************
-*** 15,21 ****
---- 15,25 ----
- */
-
- #ifndef SVR4
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <syscall.h>
-+ #else
-+ #include <sys/syscall.h>
-+ #endif
- #else SVR4
- #include <sys/syscall.h>
- #endif SVR4
-*** lib/libxview/notify/sys_select.c~ Mon Jun 28 22:18:11 1993
---- lib/libxview/notify/sys_select.c Tue Nov 22 08:20:27 1994
-***************
-*** 15,21 ****
---- 15,25 ----
- */
-
- #ifndef SVR4
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <syscall.h>
-+ #else
-+ #include <sys/syscall.h>
-+ #endif
- #else SVR4
- #include <values.h>
- #include <sys/time.h>
+--- doc/Imakefile.orig Tue Jun 29 07:13:15 1993
++++ doc/Imakefile Thu Dec 20 10:09:16 2001
+@@ -17,7 +17,7 @@
+ ALLFILES = $(DOCFILES)
+
+ install::
+- $(MKDIRHIER) $(DOC_DEST)
++ $(MKDIRHIER) $(DOC_DEST)
+
+ InstallNonExecList($(DOCFILES),$(DOC_DEST))
+ PopulateSCCSTree(h,$(ALLFILES) README)
diff --git a/x11/xview-lib/patches/patch-ac b/x11/xview-lib/patches/patch-ac
index 3fbf5edd268..b720e1334d9 100644
--- a/x11/xview-lib/patches/patch-ac
+++ b/x11/xview-lib/patches/patch-ac
@@ -1,36 +1,16 @@
-$NetBSD: patch-ac,v 1.2 1998/08/07 11:18:35 agc Exp $
+$NetBSD: patch-ac,v 1.3 2001/12/20 09:19:54 tron Exp $
-diff -rc ../old/xview3.2p1-X11R6/lib/libolgx/ol_init.c ./lib/libolgx/ol_init.c
-*** ../old/xview3.2p1-X11R6/lib/libolgx/ol_init.c Tue Jun 29 01:18:28 1993
---- ./lib/libolgx/ol_init.c Sun Nov 20 13:38:59 1994
-***************
-*** 9,15 ****
---- 9,18 ----
-
- #include <stdio.h>
- #include <stdlib.h>
-+ #include <sys/param.h>
-+ #if !(defined(BSD) && (BSD >= 199103))
- #include <malloc.h>
-+ #endif
- #include <X11/Xlib.h>
- #include "olgx_impl.h"
- #include "busy.h"
-diff -rc ../old/xview3.2p1-X11R6/lib/libolgx/ol_sb.c ./lib/libolgx/ol_sb.c
-*** ../old/xview3.2p1-X11R6/lib/libolgx/ol_sb.c Tue Jun 29 01:18:29 1993
---- ./lib/libolgx/ol_sb.c Sun Nov 20 13:38:59 1994
-***************
-*** 11,17 ****
---- 11,22 ----
- */
-
- #include <stdio.h>
-+ #include <sys/param.h>
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <stdlib.h>
-+ #else
- #include <malloc.h>
-+ #endif
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
- #include "olgx_impl.h"
+--- images/Imakefile.orig Tue Jun 29 07:18:41 1993
++++ images/Imakefile Thu Dec 20 10:09:16 2001
+@@ -99,9 +99,9 @@
+
+ ALLFILES = $(BITMAPS) $(ICONS) $(PIXRECTS) $(CURSORS) $(IMAGES)
+
+-all: $(SRCS)
++all:: $(SRCS)
+
+-BuildIncludes($(INCLUDES_SRCS),$(IMAGE_INCDIR),/**/)
++BuildIncludes($(INCLUDES_SRCS),$(IMAGE_INCDIR),.)
+
+ install:: $(SRCS)
+ $(MKDIRHIER) $(HEADER_DEST)/$(IMAGEINC)
diff --git a/x11/xview-lib/patches/patch-ad b/x11/xview-lib/patches/patch-ad
index 887aa1390ca..7c5a98532b2 100644
--- a/x11/xview-lib/patches/patch-ad
+++ b/x11/xview-lib/patches/patch-ad
@@ -1,2313 +1,16 @@
-$NetBSD: patch-ad,v 1.7 2001/05/02 21:46:09 dmcmahill Exp $
+$NetBSD: patch-ad,v 1.8 2001/12/20 09:19:54 tron Exp $
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/attr/attr_copy.c ./lib/libxview/attr/attr_copy.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/attr/attr_copy.c Tue Jun 29 01:14:35 1993
---- ./lib/libxview/attr/attr_copy.c Sun Nov 20 13:39:00 1994
-***************
-*** 12,17 ****
---- 12,22 ----
-
- #include <xview/attr.h>
-
-+ static int copy_1_attr();
-+ static int copy_counted_list();
-+ static int copy_singleton();
-+ static int copy_null_list();
-+
- /*
- * attr_copy: copy an attribute list, returning the size in bytes
- */
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/base/Imakefile ./lib/libxview/base/Imakefile
-*** ../old/xview3.2p1-X11R6/lib/libxview/base/Imakefile Tue Jun 29 01:14:40 1993
---- ./lib/libxview/base/Imakefile Sun Nov 20 13:39:00 1994
-***************
-*** 37,43 ****
- drawable.o\
- xv_debug.o\
- xv_parse.o\
-! xv_list.o\
- xv_error.o
-
- SRCS=\
---- 37,43 ----
- drawable.o\
- xv_debug.o\
- xv_parse.o\
-! xv_list.o\
- xv_error.o
-
- SRCS=\
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/base/base.h ./lib/libxview/base/base.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/base/base.h Tue Jun 29 01:14:42 1993
---- ./lib/libxview/base/base.h Sun Nov 20 13:39:00 1994
-***************
-*** 6,15 ****
---- 6,20 ----
- * file for terms of the license.
- */
-
-+ #include <sys/param.h>
- #ifndef xview_base_DEFINED
- #define xview_base_DEFINED
- #include <string.h>
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <stdlib.h>
-+ #else
- #include <malloc.h>
-+ #endif
-
- #include <xview/xv_c_types.h>
-
-***************
-*** 54,63 ****
- * non-SVR4 systems.
- */
- #ifndef SUNOS41
- #define XV_OS_SVR4
-- #define XV_USE_TTCOMPAT
- #define SYSV_WAIT
- #define SYSV_UCONTEXT
- #define XV_USE_XVFCNTL
- #endif
-
---- 59,70 ----
- * non-SVR4 systems.
- */
- #ifndef SUNOS41
-+ #if !(defined(BSD) && (BSD >= 199103))
- #define XV_OS_SVR4
- #define SYSV_WAIT
- #define SYSV_UCONTEXT
-+ #endif
-+ #define XV_USE_TTCOMPAT
- #define XV_USE_XVFCNTL
- #endif
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/base/xv_debug.h ./lib/libxview/base/xv_debug.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/base/xv_debug.h Tue Jun 29 01:14:44 1993
---- ./lib/libxview/base/xv_debug.h Sun Nov 20 13:39:00 1994
-***************
-*** 9,19 ****
- #ifndef _xv_debug_h_already_included
- #define _xv_debug_h_already_included
-
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <xview/pkg.h> /* needed to get definition of Xv_private */
- /*
---- 9,24 ----
- #ifndef _xv_debug_h_already_included
- #define _xv_debug_h_already_included
-
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <xview/pkg.h> /* needed to get definition of Xv_private */
- /*
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/dnd/dnd.c ./lib/libxview/dnd/dnd.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/dnd/dnd.c Tue Jun 29 01:15:57 1993
---- ./lib/libxview/dnd/dnd.c Sun Nov 20 13:39:00 1994
-***************
-*** 38,43 ****
---- 38,47 ----
- extern int DndContactDSDM();
- extern int DndFindSite();
- extern XID DndGetCursor();
-+ static int SendTrigger();
-+ static int SendOldDndEvent();
-+ static int WaitForAck();
-+ static int IsV2App();
-
- Xv_public int
- dnd_send_drop(dnd_public)
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/dnd/site.c ./lib/libxview/dnd/site.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/dnd/site.c Tue Jun 29 01:15:58 1993
---- ./lib/libxview/dnd/site.c Sun Nov 20 13:39:00 1994
-***************
-*** 19,24 ****
---- 19,25 ----
- #ifdef SVR4
- #include <stdlib.h>
- #endif SVR4
-+ #include <sys/param.h>
-
- static void TransCoords();
- Xv_private Xv_Window win_get_top_level();
-***************
-*** 246,252 ****
---- 247,257 ----
- /* (rectNode->rect) is of the wrong type. */
- memmove(rect, &(rectNode->rect), sizeof(Rect));
- #else
-+ #if (defined(BSD) && (BSD >= 199103))
-+ bcopy(&(rectNode->rect), rect, sizeof(Rect));
-+ #else
- bcopy(rectNode->rect, rect, sizeof(Rect));
-+ #endif
- #endif SVR4
-
- return((Xv_opaque)rect);
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/Imakefile ./lib/libxview/file_chooser/Imakefile
-*** ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/Imakefile Tue Jun 29 01:17:58 1993
---- ./lib/libxview/file_chooser/Imakefile Sun Nov 20 13:39:00 1994
-***************
-*** 27,61 ****
- path_impl.h hist_impl.h
-
- DATA_OBJS = fchsr_data.o\
-! flist_data.o\
-! path_data.o\
-! hist_data.o
-
- TEXT_OBJS =\
-! file_chsr.o\
- fc_layout.o\
- file_list.o\
- path.o\
- xv_path_util.o\
- hist_list.o\
- hist_menu.o\
-! fchsr_data.o\
-! flist_data.o\
-! path_data.o\
- hist_data.o
-
-
- SRCS =\
-! file_chsr.c\
-! fc_layout.c\
-! file_list.c\
-! path.c\
-! xv_path_util.c\
-! hist_list.c\
-! hist_menu.c\
-! fchsr_data.c\
-! flist_data.c\
-! path_data.c\
- hist_data.c
-
- LIBTARGET = xview
---- 27,61 ----
- path_impl.h hist_impl.h
-
- DATA_OBJS = fchsr_data.o\
-! flist_data.o\
-! path_data.o\
-! hist_data.o
-
- TEXT_OBJS =\
-! file_chsr.o\
- fc_layout.o\
- file_list.o\
- path.o\
- xv_path_util.o\
- hist_list.o\
- hist_menu.o\
-! fchsr_data.o\
-! flist_data.o\
-! path_data.o\
- hist_data.o
-
-
- SRCS =\
-! file_chsr.c\
-! fc_layout.c\
-! file_list.c\
-! path.c\
-! xv_path_util.c\
-! hist_list.c\
-! hist_menu.c\
-! fchsr_data.c\
-! flist_data.c\
-! path_data.c\
- hist_data.c
-
- LIBTARGET = xview
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/fc_layout.c ./lib/libxview/file_chooser/fc_layout.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/fc_layout.c Tue Jun 29 01:17:55 1993
---- ./lib/libxview/file_chooser/fc_layout.c Sun Nov 20 13:39:01 1994
-***************
-*** 464,471 ****
-
- new_height
- = (* private->exten_func)( FC_PUBLIC(private),
-! private->rect,
-! exten_rect,
- COLS(2),
- private->rect.r_width - COLS(2),
- max_height
---- 464,471 ----
-
- new_height
- = (* private->exten_func)( FC_PUBLIC(private),
-! &private->rect,
-! &exten_rect,
- COLS(2),
- private->rect.r_width - COLS(2),
- max_height
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/file_list.c ./lib/libxview/file_chooser/file_list.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/file_list.c Tue Jun 29 01:17:56 1993
---- ./lib/libxview/file_chooser/file_list.c Sun Nov 20 13:39:01 1994
-***************
-*** 23,28 ****
---- 23,31 ----
- #include <xview_private/flist_impl.h>
- #include <xview_private/portable.h>
-
-+ #if defined(__FreeBSD__) || defined(__NetBSD__)
-+ #include <regex.h>
-+ #endif
-
-
- /* X bitmaps for default glyphs */
-***************
-*** 41,46 ****
---- 44,50 ----
- static int flist_list_notify();
- static int validate_new_directory();
- static void flist_new_dir();
-+ static int flist_match_regex();
-
- #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
- static void flist_error(File_list_private *private, char *format, ...);
-***************
-*** 521,527 ****
---- 525,535 ----
- if (status == DESTROY_CLEANUP) {
- xv_free_ref( private->directory );
- xv_free_ref( private->regex_pattern );
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- xv_free_ref( private->regex_compile );
-+ #else
-+ xv_free_regex_t( (regex_t *)private->regex_compile );
-+ #endif
- xv_free_ref( private->dotdot_string );
- if ( private->dir_ptr )
- (void) closedir( private->dir_ptr );
-***************
-*** 1174,1187 ****
- static int step();
- #endif /* SVR4 */
-
-!
- #include <regexp.h>
-
-
- static void
- flist_compile_regex( private )
- File_list_private *private;
- {
- char compile_buf[MAXPATHLEN+1];
- char *end_ptr;
- size_t num_bytes;
---- 1182,1197 ----
- static int step();
- #endif /* SVR4 */
-
-! #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <regexp.h>
-+ #endif
-
-
- static void
- flist_compile_regex( private )
- File_list_private *private;
- {
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- char compile_buf[MAXPATHLEN+1];
- char *end_ptr;
- size_t num_bytes;
-***************
-*** 1197,1202 ****
---- 1207,1223 ----
- xv_free_ref( private->regex_compile );
- private->regex_compile = xv_alloc_n(char, num_bytes);
- (void) XV_BCOPY(compile_buf, private->regex_compile, num_bytes);
-+ #else
-+ regex_t *compile_buf = malloc(sizeof(regex_t));
-+ if (compile_buf == NULL){
-+ fprintf(stderr, "Couldn't allocate compile buffer\n");
-+ exit(-1);
-+ }
-+ regcomp(compile_buf, private->regex_pattern, 0);
-+ xv_free_regex_t((regex_t *)private->regex_compile);
-+ private->regex_compile = (char *)compile_buf;
-+ #endif
-+
- }
-
-
-***************
-*** 1205,1211 ****
---- 1226,1236 ----
- char *s;
- File_list_private *private;
- {
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- return step(s, private->regex_compile);
-+ #else
-+ return !regexec((regex_t *)private->regex_compile, s, 0, NULL, 0);
-+ #endif
- }
-
- /****************************************************************************/
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/xv_path_util.h ./lib/libxview/file_chooser/xv_path_util.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/file_chooser/xv_path_util.h Sat Jun 25 21:05:20 1994
---- ./lib/libxview/file_chooser/xv_path_util.h Sun Nov 20 13:39:01 1994
-***************
-*** 41,46 ****
---- 41,47 ----
-
-
- #define xv_free_ref(str) {if((str)) {xv_free((str)); (str) = NULL;}}
-+ #define xv_free_regex_t(str) {if((str)) {regfree((str)); free ((str)); (str) = NULL;}}
-
-
- EXTERN_FUNCTION(void xv_error_sprintf, (Frame frame, int use_footer, char *format, DOTDOTDOT) );
---- lib/libxview/filter/filter.c.orig Tue Jun 29 06:14:57 1993
-+++ lib/libxview/filter/filter.c Tue Oct 21 23:57:30 1997
-@@ -39,11 +39,12 @@
+--- lib/libxview/attr/attr_copy.c.orig Tue Jun 29 07:14:35 1993
++++ lib/libxview/attr/attr_copy.c Thu Dec 20 10:09:16 2001
+@@ -12,6 +12,11 @@
- char *stream_fgets();
+ #include <xview/attr.h>
--enum CharClass
-+static enum CharClass
- breakProc();
--struct CharAction
-+static struct CharAction
- digits();
--
-+static
-+ any_shell_meta();
-
- struct filter_rec **
- xv_parse_filter_table(in, filename)
-@@ -203,10 +204,10 @@
- {
- int i;
- for (i = 0; table[i] != NULL; i++) {
-- cfree((char *) table[i]->call);
-+ free((char *) table[i]->call);
- free((char *) table[i]);
- }
-- cfree((char *) table);
-+ free((char *) table);
- }
-
- static struct CharAction
-*** ../old/xview3.2p1-X11R6/lib/libxview/font/font.c Tue Jun 29 01:15:01 1993
---- ./lib/libxview/font/font.c Sun Nov 20 13:39:01 1994
-***************
-*** 67,72 ****
---- 67,76 ----
- Xv_private char *xv_font_scale_cmdline();
- Xv_private char *xv_font_scale();
-
-+ static int font_setup_defaults();
-+ static int font_construct_name();
-+ static int font_init_create_attrs();
-+
- /*
- * delimiters
- */
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/fm_get.c ./lib/libxview/frame/fm_get.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/fm_get.c Tue Jun 29 01:16:10 1993
---- ./lib/libxview/frame/fm_get.c Sun Nov 20 13:39:02 1994
-***************
-*** 10,15 ****
---- 10,16 ----
- * file for terms of the license.
- */
-
-+ #include <ctype.h>
- #include <xview_private/fm_impl.h>
- #include <xview_private/draw_impl.h>
- #include <xview/server.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/fm_impl.h ./lib/libxview/frame/fm_impl.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/fm_impl.h Tue Jun 29 01:16:15 1993
---- ./lib/libxview/frame/fm_impl.h Sun Nov 20 13:39:02 1994
-***************
-*** 17,27 ****
- #define _frame_impl_h_already_included
-
- /* standard includes */
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/time.h>
- #ifdef OW_I18N
---- 17,32 ----
- #define _frame_impl_h_already_included
-
- /* standard includes */
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/time.h>
- #ifdef OW_I18N
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/fm_props.h ./lib/libxview/frame/fm_props.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/fm_props.h Tue Jun 29 01:16:14 1993
---- ./lib/libxview/frame/fm_props.h Sun Nov 20 13:39:02 1994
-***************
-*** 13,23 ****
- #define _frame_props_h_already_included
-
- /* standard includes */
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
---- 13,28 ----
- #define _frame_props_h_already_included
-
- /* standard includes */
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/fmcmd_set.c ./lib/libxview/frame/fmcmd_set.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/fmcmd_set.c Tue Jun 29 01:16:07 1993
---- ./lib/libxview/frame/fmcmd_set.c Sun Nov 20 13:39:02 1994
-***************
-*** 18,23 ****
---- 18,25 ----
- #include <xview/panel.h>
- #include <xview/server.h>
-
-+ static int update_default_pin_state();
-+
- Pkg_private Xv_opaque
- frame_cmd_set_avlist(frame_public, avlist)
- Frame frame_public;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/frame_base.h ./lib/libxview/frame/frame_base.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/frame_base.h Tue Jun 29 01:16:14 1993
---- ./lib/libxview/frame/frame_base.h Sun Nov 20 13:39:02 1994
-***************
-*** 17,27 ****
- #define _frame_base_h_already_included
-
- /* standard includes */
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
---- 17,32 ----
- #define _frame_base_h_already_included
-
- /* standard includes */
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/frame_cmd.h ./lib/libxview/frame/frame_cmd.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/frame_cmd.h Tue Jun 29 01:16:14 1993
---- ./lib/libxview/frame/frame_cmd.h Sun Nov 20 13:39:02 1994
-***************
-*** 17,27 ****
- #define _frame_cmd_h_already_included
-
- /* standard includes */
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
---- 17,32 ----
- #define _frame_cmd_h_already_included
-
- /* standard includes */
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/frame/frame_help.h ./lib/libxview/frame/frame_help.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/frame/frame_help.h Tue Jun 29 01:16:10 1993
---- ./lib/libxview/frame/frame_help.h Sun Nov 20 13:39:02 1994
-***************
-*** 17,27 ****
- #define _frame_help_h_already_included
-
- /* standard includes */
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
---- 17,32 ----
- #define _frame_help_h_already_included
-
- /* standard includes */
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/time.h>
- #include <xview/notify.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/io_stream/file_strms.c ./lib/libxview/io_stream/file_strms.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/io_stream/file_strms.c Tue Jun 29 01:15:07 1993
---- ./lib/libxview/io_stream/file_strms.c Sun Nov 20 13:39:02 1994
-***************
-*** 17,23 ****
---- 17,27 ----
-
- #define GetFISData struct xv_file_input_stream_data *data = (struct xv_file_input_stream_data*) in->client_data
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- static struct xv_file_input_stream_data {
-+ #else
-+ struct xv_file_input_stream_data {
-+ #endif
- FILE *fp;
- int lineno;
- };
-***************
-*** 156,162 ****
---- 160,170 ----
-
- #define GetFOSData struct xv_file_output_stream_data *data = (struct xv_file_output_stream_data*) out->client_data
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- static struct xv_file_output_stream_data {
-+ #else
-+ struct xv_file_output_stream_data {
-+ #endif
- FILE *fp;
- int lineno;
- };
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/io_stream/othr_strms.c ./lib/libxview/io_stream/othr_strms.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/io_stream/othr_strms.c Tue Jun 29 01:15:05 1993
---- ./lib/libxview/io_stream/othr_strms.c Sun Nov 20 13:39:03 1994
-***************
-*** 17,23 ****
---- 17,27 ----
-
- #define GetFCSData struct xv_filter_comments_stream_data *data = (struct xv_filter_comments_stream_data*) in->client_data
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- static struct xv_filter_comments_stream_data {
-+ #else
-+ struct xv_filter_comments_stream_data {
-+ #endif
- Bool backed_up;
- char backup, lastchar;
- };
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/io_stream/str_strms.c ./lib/libxview/io_stream/str_strms.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/io_stream/str_strms.c Tue Jun 29 01:15:06 1993
---- ./lib/libxview/io_stream/str_strms.c Sun Nov 20 13:39:03 1994
-***************
-*** 17,23 ****
---- 17,27 ----
-
- #define GetSISData struct string_input_stream_data *data = (struct string_input_stream_data*) in->client_data
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- static struct string_input_stream_data {
-+ #else
-+ struct string_input_stream_data {
-+ #endif
- char *string;
- int charpos;
- };
-***************
-*** 148,154 ****
---- 152,162 ----
-
- #define GetSOSData struct string_output_stream_data *data = (struct string_output_stream_data*) out->client_data
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- static struct string_output_stream_data {
-+ #else
-+ struct string_output_stream_data {
-+ #endif
- char *string;
- int charpos;
- };
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/menu/Imakefile ./lib/libxview/menu/Imakefile
-*** ../old/xview3.2p1-X11R6/lib/libxview/menu/Imakefile Tue Jun 29 01:16:27 1993
---- ./lib/libxview/menu/Imakefile Sun Nov 20 13:39:03 1994
-***************
-*** 28,34 ****
- TEXT_OBJS =\
- omi.o\
- om_public.o\
-! om_render.o\
- om_set.o\
- om_get.o\
- om_compat.o
---- 28,34 ----
- TEXT_OBJS =\
- omi.o\
- om_public.o\
-! om_render.o\
- om_set.o\
- om_get.o\
- om_compat.o
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/menu/om_render.c ./lib/libxview/menu/om_render.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/menu/om_render.c Tue Jun 29 01:16:26 1993
---- ./lib/libxview/menu/om_render.c Sun Nov 20 13:39:03 1994
-***************
-*** 470,478 ****
- * Define the menu and shadow window dimensions. Note: shadow rect width &
- * height = menu rect width & height
- */
-! xv_set(m->window, XV_RECT, m->fs_menurect, 0);
- if (!m->group_info->three_d)
-! xv_set(m->shadow_window, XV_RECT, shadowrect, 0);
-
- XFlush(XV_DISPLAY_FROM_WINDOW(m->window));
-
---- 470,478 ----
- * Define the menu and shadow window dimensions. Note: shadow rect width &
- * height = menu rect width & height
- */
-! xv_set(m->window, XV_RECT, &m->fs_menurect, 0);
- if (!m->group_info->three_d)
-! xv_set(m->shadow_window, XV_RECT, &shadowrect, 0);
-
- XFlush(XV_DISPLAY_FROM_WINDOW(m->window));
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/menu/om_set.c ./lib/libxview/menu/om_set.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/menu/om_set.c Tue Jun 29 01:16:24 1993
---- ./lib/libxview/menu/om_set.c Sun Nov 20 13:39:03 1994
-***************
-*** 12,17 ****
---- 12,18 ----
-
- /* --------------------------------------------------------------------- */
- #include <sys/types.h>
-+ #include <ctype.h>
- #include <xview_private/om_impl.h>
- #include <xview_private/draw_impl.h>
- #include <xview_private/fm_impl.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/misc/Imakefile ./lib/libxview/misc/Imakefile
-*** ../old/xview3.2p1-X11R6/lib/libxview/misc/Imakefile Tue Jun 29 01:16:36 1993
---- ./lib/libxview/misc/Imakefile Sun Nov 20 13:39:03 1994
-***************
-*** 29,36 ****
- xv_i18n.c \
- xv_path.c
-
-! OFILES.misc.3 = ${CFILES.misc.3:%.c=%.o}
-! OFILES.misc.4 = ${CFILES.misc.4:%.c=%.o}
-
- HFILES.misc.3 =
- HFILES.misc.4 =
---- 29,36 ----
- xv_i18n.c \
- xv_path.c
-
-! OFILES.misc.3 = ${CFILES.misc.3:.c=.o}
-! OFILES.misc.4 = ${CFILES.misc.4:.c=.o}
-
- HFILES.misc.3 =
- HFILES.misc.4 =
-***************
-*** 43,49 ****
- GETTEXT.C =
- #endif
-
-! GETTEXT.O = ${GETTEXT.C:%.c=%.o}
-
- HDRSPUBLIC= cms_grays.h cms_mono.h cmsrainbow.h cms_rgb.h sun.h \
- window_hs.h expandname.h xv_c_types.h attrol.h db.h \
---- 43,49 ----
- GETTEXT.C =
- #endif
-
-! GETTEXT.O = ${GETTEXT.C:.c=.o}
-
- HDRSPUBLIC= cms_grays.h cms_mono.h cmsrainbow.h cms_rgb.h sun.h \
- window_hs.h expandname.h xv_c_types.h attrol.h db.h \
-***************
-*** 57,63 ****
- demorandom.o\
- getlogindr.o\
- expandname.o\
-! expandpath.o\
- bitmask.o\
- hashfn.o\
- db_conv.o\
---- 57,63 ----
- demorandom.o\
- getlogindr.o\
- expandname.o\
-! expandpath.o\
- bitmask.o\
- hashfn.o\
- db_conv.o\
-***************
-*** 76,82 ****
- demorandom.c\
- getlogindr.c\
- expandname.c\
-! expandpath.c\
- bitmask.c\
- hashfn.c\
- db_conv.c\
---- 76,82 ----
- demorandom.c\
- getlogindr.c\
- expandname.c\
-! expandpath.c\
- bitmask.c\
- hashfn.c\
- db_conv.c\
-***************
-*** 95,101 ****
- demorandom.o\
- getlogindr.o\
- expandname.o\
-! expandpath.o\
- bitmask.o\
- hashfn.o\
- db_conv.o\
---- 95,101 ----
- demorandom.o\
- getlogindr.o\
- expandname.o\
-! expandpath.o\
- bitmask.o\
- hashfn.o\
- db_conv.o\
-***************
-*** 115,121 ****
- demorandom.c\
- getlogindr.c\
- expandname.c\
-! expandpath.c\
- bitmask.c\
- hashfn.c\
- db_conv.c\
---- 115,121 ----
- demorandom.c\
- getlogindr.c\
- expandname.c\
-! expandpath.c\
- bitmask.c\
- hashfn.c\
- db_conv.c\
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/misc/getlogindr.c ./lib/libxview/misc/getlogindr.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/misc/getlogindr.c Tue Jun 29 01:16:30 1993
---- ./lib/libxview/misc/getlogindr.c Sun Nov 20 13:39:03 1994
-***************
-*** 17,22 ****
---- 17,23 ----
-
- #include <stdio.h>
- #include <pwd.h>
-+ #include <sys/param.h>
- #include <xview_private/i18n_impl.h>
- #include <xview/xv_error.h>
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/misc/i18n_impl.h ./lib/libxview/misc/i18n_impl.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/misc/i18n_impl.h Tue Jun 29 01:16:31 1993
---- ./lib/libxview/misc/i18n_impl.h Sun Nov 20 13:39:04 1994
-***************
-*** 25,30 ****
---- 25,34 ----
-
- #include <locale.h>
-
-+ #ifndef LC_MESSAGES
-+ #define LC_MESSAGES 0
-+ #endif
-+
- extern char *dgettext();
-
- #define XV_I18N_MSG(d,s) (dgettext(d,s))
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/misc/portable.h ./lib/libxview/misc/portable.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/misc/portable.h Tue Jun 29 01:16:34 1993
---- ./lib/libxview/misc/portable.h Sun Nov 20 13:39:04 1994
-***************
-*** 10,15 ****
---- 10,16 ----
- #ifndef xview_portable_h_DEFINED
- #define xview_portable_h_DEFINED
-
-+ #include <sys/param.h>
- #include <xview/attr.h>
-
- #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-***************
-*** 70,76 ****
---- 71,81 ----
- #define XV_USE_TERMIOS
- #define XV_USE_SVR4_PTYS
- #else /* SVR4 */
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #define XV_USE_TERMIOS
-+ #else
- #undef XV_USE_TERMIOS
-+ #endif
- #undef XV_USE_SVR4_PTYS
- #endif /* SVR4 */
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notice/notice_pt.c ./lib/libxview/notice/notice_pt.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/notice/notice_pt.c Tue Jun 29 01:16:40 1993
---- ./lib/libxview/notice/notice_pt.c Sun Nov 20 13:39:04 1994
-***************
-*** 58,63 ****
---- 58,64 ----
- static void notice_copy_event();
- static Xv_window notice_get_focus_win();
- static int notice_show_focus_win();
-+ static int notice_quadrant();
-
- /*
- * --------------------------- STATICS ------------------------------
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet.h ./lib/libxview/notify/ndet.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet.h Tue Jun 29 01:18:12 1993
---- ./lib/libxview/notify/ndet.h Sun Nov 20 13:39:04 1994
-***************
-*** 17,22 ****
---- 17,27 ----
- #ifndef NDET_DEFINED
- #define NDET_DEFINED
-
-+ #include <sys/param.h>
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <signal.h>
-+ #endif
-+
- /*
- ********************** Detector Loop Notes ****************************
- Here is some notes on the detector loop:
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet_fcntl.c ./lib/libxview/notify/ndet_fcntl.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet_fcntl.c Tue Jun 29 01:18:03 1993
---- ./lib/libxview/notify/ndet_fcntl.c Sun Nov 20 13:39:04 1994
-***************
-*** 17,38 ****
-
- #include <xview_private/ntfy.h>
- #include <xview_private/ndet.h>
- #include <signal.h>
- #include <fcntl.h>
- #ifdef SVR4
- #include <sys/file.h>
- #endif SVR4
-!
- extern int
- #ifdef SVR4
- xv_fcntl(fd, cmd, arg)
- #else
- fcntl(fd, cmd, arg)
- #endif SVR4
- int fd, cmd, arg;
- {
- fd_set bit;
- int res;
-
- /* Set fd bit */
- FD_ZERO(&bit);
---- 17,55 ----
-
- #include <xview_private/ntfy.h>
- #include <xview_private/ndet.h>
-+ #include <sys/param.h>
- #include <signal.h>
- #include <fcntl.h>
- #ifdef SVR4
- #include <sys/file.h>
- #endif SVR4
-! #if (defined(BSD) && (BSD >= 199103))
-! #include <stdarg.h>
-! #endif
- extern int
- #ifdef SVR4
- xv_fcntl(fd, cmd, arg)
- #else
-+ #if (defined(BSD) && (BSD >= 199103))
-+ fcntl(int fd, int cmd, ...)
-+ #else
- fcntl(fd, cmd, arg)
-+ #endif
- #endif SVR4
-+ #if !(defined(BSD) && (BSD >= 199103))
- int fd, cmd, arg;
-+ #endif
- {
- fd_set bit;
- int res;
-+
-+ #if (defined(BSD) && (BSD >= 199103))
-+ int arg;
-+ va_list valist;
-+ va_start(valist, cmd);
-+ arg = va_arg(valist, int);
-+ va_end(valist);
-+ #endif
-
- /* Set fd bit */
- FD_ZERO(&bit);
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet_loop.c ./lib/libxview/notify/ndet_loop.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet_loop.c Tue Jun 29 01:18:19 1993
---- ./lib/libxview/notify/ndet_loop.c Sun Nov 20 13:39:04 1994
-***************
-*** 14,19 ****
---- 14,20 ----
- * Ndet_loop.c - Notification loop.
- */
-
-+ #include <sys/param.h>
- #include <xview_private/i18n_impl.h>
- #include <xview_private/ntfy.h>
- #include <xview_private/ndet.h>
-***************
-*** 224,230 ****
- * will return with an EINTR when a signal arrives while IN
- * select, not ON THE WAY into select).
- */
-! #ifndef SVR4
- nfds = syscall(SYS_select,
- FD_SETSIZE, &ibits, &obits, &ebits,
- (sigisempty(&ndet_sigs_received)) ? timer : &ndet_polling_tv);
---- 225,232 ----
- * will return with an EINTR when a signal arrives while IN
- * select, not ON THE WAY into select).
- */
-!
-! #if !defined(SVR4) && !(defined(BSD) && (BSD >= 199103))
- nfds = syscall(SYS_select,
- FD_SETSIZE, &ibits, &obits, &ebits,
- (sigisempty(&ndet_sigs_received)) ? timer : &ndet_polling_tv);
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet_read.c ./lib/libxview/notify/ndet_read.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ndet_read.c Tue Jun 29 01:18:04 1993
---- ./lib/libxview/notify/ndet_read.c Sun Nov 20 13:39:05 1994
-***************
-*** 15,20 ****
---- 15,21 ----
- * not already in the middle of it.
- */
-
-+ #include <sys/param.h>
- #include <xview_private/ntfy.h>
- #include <xview_private/ndet.h>
- #include <xview_private/ndis.h> /* For ndis_client == NTFY_CLIENT_NULL check */
-***************
-*** 29,39 ****
---- 30,45 ----
-
- static Notify_client ndet_read_nclient = (Notify_client) & ndet_read_done;
-
-+ #if !(defined(BSD) && (BSD >= 199103))
- extern int
- read(fd, buf, nbytes)
- register int fd;
- char *buf;
- int nbytes;
-+ #else
-+ extern int
-+ read(int fd, void *buf, size_t nbytes)
-+ #endif
- {
- int ndelay;
- Notify_error return_code;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ntfy.h ./lib/libxview/notify/ntfy.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ntfy.h Tue Jun 29 01:18:14 1993
---- ./lib/libxview/notify/ntfy.h Sun Nov 20 13:39:05 1994
-***************
-*** 22,27 ****
---- 22,31 ----
- #include <sys/rusage.h>
- #endif
- #include <sys/resource.h>
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <sys/wait.h>
-+ #include <sys/signal.h>
-+ #endif
- #include <xview/notify.h>
-
- /*
-***************
-*** 149,155 ****
- */
- typedef struct ntfy_wait3_data {
- int pid; /* Process waiting for */
-! #ifndef SVR4
- union wait status; /* Return value from wait3 */
- #else SVR4
- int status; /* Return value from wait3 */
---- 153,159 ----
- */
- typedef struct ntfy_wait3_data {
- int pid; /* Process waiting for */
-! #if !defined(SVR4) && !(defined(BSD) && (BSD >= 199103))
- union wait status; /* Return value from wait3 */
- #else SVR4
- int status; /* Return value from wait3 */
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ntfy_test.c ./lib/libxview/notify/ntfy_test.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ntfy_test.c Tue Jun 29 01:18:12 1993
---- ./lib/libxview/notify/ntfy_test.c Sun Nov 20 13:39:05 1994
-***************
-*** 989,995 ****
- fprintf(stderr, "%s in unknown destroy status\n", arg1);
- goto Error;
- }
-! if ((ne = notify_post_destroy(client, status)) != NOTIFY_OK) {
- if (!(status == DESTROY_CHECKING &&
- ne == NOTIFY_DESTROY_VETOED)) {
- notify_perror("notify_destroy");
---- 989,995 ----
- fprintf(stderr, "%s in unknown destroy status\n", arg1);
- goto Error;
- }
-! if ((ne = notify_post_destroy(client, status), NOTIFY_IMMEDIATE) != NOTIFY_OK) {
- if (!(status == DESTROY_CHECKING &&
- ne == NOTIFY_DESTROY_VETOED)) {
- notify_perror("notify_destroy");
-***************
-*** 1781,1787 ****
- }
- /* Send only last client event */
- if (*event_count_ptr > 0) {
-! (void) notify_event(nclient, *(events + (*event_count_ptr) - 1));
- *event_count_ptr--;
- }
- /* Send fd 1 input */
---- 1781,1787 ----
- }
- /* Send only last client event */
- if (*event_count_ptr > 0) {
-! (void) notify_event(nclient, *(events + (*event_count_ptr) - 1), 0);
- *event_count_ptr--;
- }
- /* Send fd 1 input */
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/notify/ntfyclient.c ./lib/libxview/notify/ntfyclient.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/notify/ntfyclient.c Tue Jun 29 01:18:11 1993
---- ./lib/libxview/notify/ntfyclient.c Sun Nov 20 13:39:05 1994
-***************
-*** 18,24 ****
---- 18,26 ----
- #include <xview_private/ntfy.h>
- #include <xview_private/ndis.h> /* For ndis_default_prioritizer */
- #include <xview_private/ndet.h>
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <search.h>
-+ #endif
- #include <xview_private/portable.h>
-
- /* Variables used in paranoid enumerator (see ntfy_condition) */
-***************
-*** 60,65 ****
---- 62,68 ----
- if (*client_latest && (*client_latest)->nclient == nclient)
- return (*client_latest);
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- if(( client_list == ndet_clients ) && ndet_clients ) {
- dummy_client.nclient = nclient;
- /* Find client */
-***************
-*** 73,79 ****
- return (client);
- }
- }
-!
- else
- /* Search entire list */
- for (client = client_list; client; client = next) {
---- 76,84 ----
- return (client);
- }
- }
-! #else
-! if(0);
-! #endif
- else
- /* Search entire list */
- for (client = client_list; client; client = next) {
-***************
-*** 100,105 ****
---- 105,111 ----
- register NTFY_CLIENT *client;
- static NTFY_CLIENT *new_client;
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- if( client_list == &ndet_clients ) {
- if( new_client == NTFY_CLIENT_NULL ) {
- if ((new_client = ntfy_alloc_client()) == NTFY_CLIENT_NULL)
-***************
-*** 119,125 ****
- else
- return client;
- }
-!
- else if ((client = ntfy_find_nclient(*client_list, nclient,
- client_latest)) != NTFY_CLIENT_NULL)
- return client;
---- 125,133 ----
- else
- return client;
- }
-! #else
-! if(0);
-! #endif
- else if ((client = ntfy_find_nclient(*client_list, nclient,
- client_latest)) != NTFY_CLIENT_NULL)
- return client;
-***************
-*** 163,170 ****
---- 171,180 ----
- ntfy_remove_condition(client, condition, who);
- }
- /* Remove & free client from client_list */
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- if( client_list == &ndet_clients )
- tdelete( client, ndet_root, ndet_compar );
-+ #endif
- ntfy_remove_node((NTFY_NODE **) client_list, (NTFY_NODE *) client);
- /* Invalidate condition hint */
- *client_latest = NTFY_CLIENT_NULL;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/openwin/ow_view.c ./lib/libxview/openwin/ow_view.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/openwin/ow_view.c Tue Jun 29 01:16:43 1993
---- ./lib/libxview/openwin/ow_view.c Sun Nov 20 13:39:05 1994
-***************
-*** 48,53 ****
---- 48,54 ----
- static openwin_init_view();
- static openwin_free_view();
- static openwin_remove_scrollbars();
-+ static int openwin_check_view();
- static openwin_create_viewwindow();
- static openwin_test_for_sb();
- static openwin_link_view();
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/item_set.c ./lib/libxview/panel/item_set.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/item_set.c Tue Jun 29 01:16:50 1993
---- ./lib/libxview/panel/item_set.c Sun Nov 20 13:39:06 1994
-***************
-*** 28,33 ****
---- 28,35 ----
-
- extern Notify_value panel_base_event_handler();
-
-+ static fix_positions();
-+
- Pkg_private Xv_opaque
- item_set_avlist(item_public, avlist)
- Panel_item item_public;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_btn.c ./lib/libxview/panel/p_btn.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_btn.c Tue Jun 29 01:16:52 1993
---- ./lib/libxview/panel/p_btn.c Sun Nov 20 13:39:06 1994
-***************
-*** 203,209 ****
- if (pin_is_default) {
- image.im_type = PIT_STRING;
- image_string(&image) = NULL;
-! label = "";
- } else if (!(image_string(&image) = (char *) xv_get(default_menu_item,
- MENU_STRING))) {
- olgx_state |= OLGX_LABEL_IS_PIXMAP;
---- 203,209 ----
- if (pin_is_default) {
- image.im_type = PIT_STRING;
- image_string(&image) = NULL;
-! label = (Xv_opaque) "";
- } else if (!(image_string(&image) = (char *) xv_get(default_menu_item,
- MENU_STRING))) {
- olgx_state |= OLGX_LABEL_IS_PIXMAP;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_choice.c ./lib/libxview/panel/p_choice.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_choice.c Tue Jun 29 01:16:57 1993
---- ./lib/libxview/panel/p_choice.c Sun Nov 20 13:39:06 1994
-***************
-*** 106,111 ****
---- 106,115 ----
- static int choice_number();
- static int choice_x_gap();
- static int choice_y_gap();
-+ static int find_choice();
-+ static int modify_choice();
-+ static int move_specified();
-+ static int re_alloc_choices();
- static unsigned int choice_value();
- static void choice_create_menu();
- static void choice_images_to_menu_items();
-***************
-*** 120,126 ****
- static void update_item_rect();
- static void update_value_rect();
- static Xv_opaque choice_do_menu_item();
--
-
- static Panel_ops ops = {
- panel_default_handle_event, /* handle_event() */
---- 124,129 ----
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_drop.c ./lib/libxview/panel/p_drop.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_drop.c Tue Jun 29 01:17:04 1993
---- ./lib/libxview/panel/p_drop.c Sun Nov 20 13:39:06 1994
-***************
-*** 10,16 ****
---- 10,21 ----
- * file for terms of the license.
- */
-
-+ #include <sys/param.h>
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <stdlib.h>
-+ #else
- #include <malloc.h>
-+ #endif
- #include <xview_private/draw_impl.h>
- #include <xview_private/i18n_impl.h>
- #include <xview_private/panel_impl.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_gauge.c ./lib/libxview/panel/p_gauge.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_gauge.c Tue Jun 29 01:17:04 1993
---- ./lib/libxview/panel/p_gauge.c Sun Nov 20 13:39:07 1994
-***************
-*** 47,52 ****
---- 47,53 ----
- /* Local functions */
- static void paint_gauge();
- static void update_rects();
-+ static int etoi();
-
- static Panel_ops ops = {
- panel_default_handle_event, /* handle_event() */
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_get.c ./lib/libxview/panel/p_get.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_get.c Tue Jun 29 01:16:49 1993
---- ./lib/libxview/panel/p_get.c Sun Nov 20 13:39:07 1994
-***************
-*** 16,21 ****
---- 16,22 ----
- #include <xview/scrollbar.h>
-
- static int shrink_to_fit();
-+ static panel_shrink_margin();
-
- #define MAX_NEGATIVE_SHRINK 2000
- #define SHRINK_MARGIN 4
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_set.c ./lib/libxview/panel/p_set.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_set.c Tue Jun 29 01:16:59 1993
---- ./lib/libxview/panel/p_set.c Sun Nov 20 13:39:07 1994
-***************
-*** 25,30 ****
---- 25,32 ----
-
- static void panel_set_fonts();
-
-+ static int column_from_absolute_x();
-+ static int row_from_absolute_y();
-
- Pkg_private Xv_opaque
- panel_set_avlist(panel_public, avlist)
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_slider.c ./lib/libxview/panel/p_slider.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_slider.c Tue Jun 29 01:17:02 1993
---- ./lib/libxview/panel/p_slider.c Sun Nov 20 13:39:08 1994
-***************
-*** 54,59 ****
---- 54,61 ----
- static Panel_setting get_value();
- static void paint_slider();
- static void update_rects();
-+ static int etoi();
-+ static int itoe();
-
- static Panel_ops ops = {
- panel_default_handle_event, /* handle_event() */
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/p_txt.c ./lib/libxview/panel/p_txt.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/p_txt.c Tue Jun 29 01:16:55 1993
---- ./lib/libxview/panel/p_txt.c Sun Nov 20 13:39:09 1994
-***************
-*** 10,16 ****
---- 10,21 ----
- * file for terms of the license.
- */
-
-+ #include <sys/param.h>
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <stdlib.h>
-+ #else
- #include <malloc.h>
-+ #endif
- #include <string.h>
- #include <ctype.h>
- #include <X11/X.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/panel.c ./lib/libxview/panel/panel.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/panel.c Tue Jun 29 01:16:57 1993
---- ./lib/libxview/panel/panel.c Sun Nov 20 13:39:09 1994
-***************
-*** 27,32 ****
---- 27,33 ----
- Pkg_private int panel_destroy();
-
- static int panel_layout();
-+ static int panel_unregister_view();
-
- Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/panel/panel_impl.h ./lib/libxview/panel/panel_impl.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/panel/panel_impl.h Tue Jun 29 01:16:50 1993
---- ./lib/libxview/panel/panel_impl.h Sun Nov 20 13:39:09 1994
-***************
-*** 9,19 ****
- #ifndef panel_impl_defined
- #define panel_impl_defined
-
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/types.h>
- #include <X11/Xlib.h>
---- 9,24 ----
- #ifndef panel_impl_defined
- #define panel_impl_defined
-
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/types.h>
- #include <X11/Xlib.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/rect/rect_util.c ./lib/libxview/rect/rect_util.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/rect/rect_util.c Tue Jun 29 01:15:17 1993
---- ./lib/libxview/rect/rect_util.c Sun Nov 20 13:39:09 1994
-***************
-*** 16,21 ****
---- 16,23 ----
-
- #include <xview/rect.h>
-
-+ static int rect_nearest_edge();
-+
- /*
- * Compute the distance from rect to (x, y). If (x, y) is in rect, zero is
- * returned. If x_used or y_used are non-zero, the projection point is
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/sel/sel_agent.c ./lib/libxview/sel/sel_agent.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/sel/sel_agent.c Sun Jun 26 14:46:20 1994
---- ./lib/libxview/sel/sel_agent.c Sun Nov 20 13:39:09 1994
-***************
-*** 63,69 ****
- static void selection_agent_do_function();
- static Atom get_atom();
- static Seln_attribute save_atom();
-!
-
- Xv_private Seln_result seln_convert_request_to_property();
- /* called by seln_svc.c
---- 63,69 ----
- static void selection_agent_do_function();
- static Atom get_atom();
- static Seln_attribute save_atom();
-! static int waitforReadableTimeout();
-
- Xv_private Seln_result seln_convert_request_to_property();
- /* called by seln_svc.c
-***************
-*** 309,315 ****
---- 309,319 ----
- struct stat stat_buf;
- int count, size;
- char *destp;
-+ #if (defined(BSD) && (BSD >= 199306))
-+ extern off_t lseek();
-+ #else
- extern long lseek();
-+ #endif
-
- if (fstat(fd, &stat_buf) != 0) {
- perror(XV_MSG("Agent couldn't reply about a file"));
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/sel/seln_impl.h ./lib/libxview/sel/seln_impl.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/sel/seln_impl.h Tue Jun 29 01:15:25 1993
---- ./lib/libxview/sel/seln_impl.h Sun Nov 20 13:39:09 1994
-***************
-*** 9,20 ****
- * file for terms of the license.
- */
-
- #include <errno.h>
- #ifndef FILE
- #ifndef SVR4
-- #undef NULL
- #endif SVR4
- #include <stdio.h>
- #endif FILE
- #include <sys/time.h>
- #include <sys/types.h>
---- 9,25 ----
- * file for terms of the license.
- */
-
-+ #ifdef NULL
-+ #undef NULL
-+ #endif
- #include <errno.h>
- #ifndef FILE
- #ifndef SVR4
- #endif SVR4
- #include <stdio.h>
-+ #ifndef NULL
-+ #define NULL 0
-+ #endif
- #endif FILE
- #include <sys/time.h>
- #include <sys/types.h>
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/selection/sel_own.c ./lib/libxview/selection/sel_own.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/selection/sel_own.c Sat Jun 25 21:05:22 1994
---- ./lib/libxview/selection/sel_own.c Sun Nov 20 13:39:10 1994
-***************
-*** 35,40 ****
---- 35,41 ----
- static int sel_set_ownership(/* sel_owner */);
- static int (*OldErrorHandler)();
- static int SelOwnerErrorHandler();
-+ static int SendIncr();
- static int ValidatePropertyEvent();
-
- static void SelClean();
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/selection/sel_req.c ./lib/libxview/selection/sel_req.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/selection/sel_req.c Sat Jun 25 21:05:21 1994
---- ./lib/libxview/selection/sel_req.c Sun Nov 20 13:39:10 1994
-***************
-*** 55,61 ****
- static int GetSelection();
- static int ProcessReply();
- static Requestor *SelGetReq();
-!
-
- /*ARGSUSED*/
- Pkg_private int
---- 55,64 ----
- static int GetSelection();
- static int ProcessReply();
- static Requestor *SelGetReq();
-! static int XvGetRequestedValue();
-! static int ProcessNonBlkIncr();
-! static int ProcessReq();
-! static int OldPkgIsOwner();
-
- /*ARGSUSED*/
- Pkg_private int
-***************
-*** 1226,1232 ****
- }
-
-
-! static XID
- SelGetOwnerXID( selReq )
- Sel_req_info *selReq;
- {
---- 1229,1235 ----
- }
-
-
-! Pkg_private XID
- SelGetOwnerXID( selReq )
- Sel_req_info *selReq;
- {
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/selection/sel_util.c ./lib/libxview/selection/sel_util.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/selection/sel_util.c Tue Jun 29 01:16:03 1993
---- ./lib/libxview/selection/sel_util.c Sun Nov 20 13:39:10 1994
-***************
-*** 23,28 ****
---- 23,29 ----
- static void FreeMultiProp();
- static int SelMatchReply();
- static Sel_req_tbl *SelMatchReqTbl();
-+ static int SelFindReply();
-
- Pkg_private struct timeval *
- xv_sel_cvt_xtime_to_timeval( XTime )
-***************
-*** 601,607 ****
- reqTbl->reply = reply;
- reqTbl->next = NULL;
- (void)XSaveContext( dpy, DefaultRootWindow(dpy),replyCtx,
-! (caddr_t *)reqTbl);
- return reqTbl;
- }
- return (Sel_req_tbl *) xv_sel_add_new_req( reqTbl, reply );
---- 602,608 ----
- reqTbl->reply = reply;
- reqTbl->next = NULL;
- (void)XSaveContext( dpy, DefaultRootWindow(dpy),replyCtx,
-! (XPointer)reqTbl);
- return reqTbl;
- }
- return (Sel_req_tbl *) xv_sel_add_new_req( reqTbl, reply );
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/server/server.c ./lib/libxview/server/server.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/server/server.c Sun Jun 26 14:53:40 1994
---- ./lib/libxview/server/server.c Sun Nov 20 13:39:10 1994
-***************
-*** 65,70 ****
---- 65,71 ----
- static unsigned int string_to_modmask();
- static Server_atom_type save_atom();
- static void server_yield_modifiers();
-+ static int xv_set_scheduler();
-
- Xv_private char *xv_strtok();
-
-***************
-*** 440,446 ****
- /* lumpi@dobag.in-berlin.de */
- if (XrmGetDatabase((Display *)server->xdisplay)) {
- server->db = XrmGetStringDatabase(
-! (XrmGetDatabase((Display *)server->xdisplay)));
- #else
- if (((Display *)server->xdisplay)->xdefaults) {
- server->db = XrmGetStringDatabase(
---- 441,447 ----
- /* lumpi@dobag.in-berlin.de */
- if (XrmGetDatabase((Display *)server->xdisplay)) {
- server->db = XrmGetStringDatabase(
-! (char *) (XrmGetDatabase((Display *)server->xdisplay)));
- #else
- if (((Display *)server->xdisplay)->xdefaults) {
- server->db = XrmGetStringDatabase(
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/ei_text.c ./lib/libxview/textsw/ei_text.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/ei_text.c Tue Jun 29 01:17:37 1993
---- ./lib/libxview/textsw/ei_text.c Sun Nov 20 13:39:11 1994
-***************
-*** 121,126 ****
---- 121,127 ----
- #endif
- static struct ei_span_result ei_plain_text_span_of_group();
- static struct ei_process_result ei_plain_text_expand();
-+ static paint_batch();
-
- struct ei_ops ei_plain_text_ops = {
- ei_plain_text_destroy,
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/es_attr.c ./lib/libxview/textsw/es_attr.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/es_attr.c Tue Jun 29 01:17:31 1993
---- ./lib/libxview/textsw/es_attr.c Sun Nov 20 13:39:11 1994
-***************
-*** 22,28 ****
-
- Pkg_private int
- #ifdef ANSI_FUNC_PROTO
-! es_set(register Es_handle esh, ...)
- #else
- es_set(esh, va_alist)
- register Es_handle esh;
---- 22,28 ----
-
- Pkg_private int
- #ifdef ANSI_FUNC_PROTO
-! es_set(Es_handle esh, ...)
- #else
- es_set(esh, va_alist)
- register Es_handle esh;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/ev_op_bdry.c ./lib/libxview/textsw/ev_op_bdry.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/ev_op_bdry.c Tue Jun 29 01:17:30 1993
---- ./lib/libxview/textsw/ev_op_bdry.c Sun Nov 20 13:39:11 1994
-***************
-*** 28,33 ****
---- 28,36 ----
- static Ev_finger_handle ev_insert_finger();
- static Ev_mark_object last_generated_id;
-
-+ static int ev_find_finger_internal();
-+ static ev_remove_finger_internal();
-+
- #define FORALL(index_var) \
- for (index_var = 0; index_var < fingers->last_plus_one; index_var++)
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/ps_impl.c ./lib/libxview/textsw/ps_impl.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/ps_impl.c Tue Jun 29 01:17:39 1993
---- ./lib/libxview/textsw/ps_impl.c Sun Nov 20 13:39:12 1994
-***************
-*** 62,67 ****
---- 62,71 ----
- static Es_index ps_replace(), ps_scratch_replace();
- static int ps_set();
-
-+ static int get_current_offset();
-+
-+ static copy_pieces();
-+
- static Es_index write_header_etc();
-
- static struct es_ops ps_ops = {
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_again.c ./lib/libxview/textsw/txt_again.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_again.c Tue Jun 29 01:17:32 1993
---- ./lib/libxview/textsw/txt_again.c Sun Nov 20 13:39:12 1994
-***************
-*** 28,33 ****
---- 28,35 ----
- Pkg_private Es_index textsw_do_input();
- Pkg_private Es_index textsw_do_pending_delete();
-
-+ static int textsw_string_min_free();
-+
- string_t null_string = {0, 0, 0};
-
- #define TEXT_DELIMITER "\\"
-***************
-*** 182,187 ****
---- 184,190 ----
- * Following is stolen from 3.2ALPHA sprintf(str, fmt, va_alist) SIDE_EFFECT:
- * TXTSW_STRING_FREE(ptr_to_string) is modified by this routine.
- */
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
- #ifndef SVR4
-
- /* VARARGS2 */
-***************
-*** 325,330 ****
---- 328,358 ----
-
- #endif /* SVR4 */
-
-+ #else /* __FreeBSD__ */
-+ /*inspiration taken from sprintf.c */
-+
-+ static int
-+ textsw_printf(register string_t *ptr_to_string, char *fmt, ...)
-+ {
-+ FILE _strbuf;
-+ int result;
-+ va_list args;
-+ _strbuf._flags = __SWR | __SSTR;
-+ _strbuf._bf._base = _strbuf._p = (char *) TXTSW_STRING_FREE(ptr_to_string);
-+ _strbuf._bf._size = _strbuf._w = ptr_to_string->max_length - TXTSW_STRING_LENGTH(ptr_to_string);
-+ VA_START(args, fmt);
-+ result = vfprintf (&_strbuf, fmt, args);
-+ va_end(args);
-+ TXTSW_STRING_FREE(ptr_to_string) = (char *) _strbuf._p;
-+ #ifndef lint
-+ if (result >= 0)
-+ putc('\0', &_strbuf);
-+ #endif
-+ return (result);
-+ }
-+
-+ #endif /* __FreeBSD__ */
-+
- static void
- textsw_record_buf(again, buffer, buffer_length)
- register string_t *again;
-***************
-*** 619,624 ****
---- 647,654 ----
- */
- /* VARARGS2 */
-
-+ #if !defined(__FreeBSD__) && !defined(__NetBSD__)
-+
- static int
- #ifdef ANSI_FUNC_PROTO
- textsw_scanf(register string_t *ptr_to_string, register char *fmt, ...)
-***************
-*** 705,710 ****
---- 735,773 ----
-
- #endif /* OW_I18N */
- }
-+ #else /* __FreeBSD__ */
-+ /*inspiration/code taken from sscanf.c */
-+
-+ static int
-+ eofread(cookie, buf, len)
-+ void *cookie;
-+ char *buf;
-+ int len;
-+ {
-+
-+ return (0);
-+ }
-+
-+ static int
-+ textsw_scanf(register string_t *ptr_to_string, char *fmt, ...)
-+ {
-+ FILE _strbuf;
-+ int result;
-+ va_list args;
-+
-+ _strbuf._flags = __SRD;
-+ _strbuf._bf._base = _strbuf._p = (char *) TXTSW_STRING_BASE(ptr_to_string);
-+ _strbuf._bf._size = _strbuf._r = TXTSW_STRING_LENGTH(ptr_to_string);
-+ _strbuf._read = eofread;
-+ _strbuf._ub._base = NULL;
-+ _strbuf._lb._base = NULL;
-+ VA_START(args, fmt);
-+ result = __svfscanf(&_strbuf, fmt, args);
-+ va_end(args);
-+ TXTSW_STRING_BASE(ptr_to_string) = (char *) _strbuf._p;
-+ return (result);
-+ }
-+ #endif /* __FreeBSD__ */
-
- static int
- textsw_next_is_delimiter(again)
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_e_menu.c ./lib/libxview/textsw/txt_e_menu.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_e_menu.c Tue Jun 29 01:17:42 1993
---- ./lib/libxview/textsw/txt_e_menu.c Sun Nov 20 13:39:12 1994
-***************
-*** 50,57 ****
---- 50,61 ----
- #define ERROR -1
-
- #define MAX_FILES 40
-+ #ifndef MAXPATHLEN
- #define MAXPATHLEN 1024
-+ #endif
-+ #ifndef EXTRASMENU
- #define EXTRASMENU "text_extras_menu"
-+ #endif
- #define MAXSTRLEN 256
- #define MAXARGS 20
-
-***************
-*** 78,83 ****
---- 82,89 ----
-
- extern int EXTRASMENU_FILENAME_KEY;
-
-+ static any_shell_meta();
-+
- Pkg_private char *
- textsw_get_extras_filename(mi)
- Menu_item mi;
-***************
-*** 136,142 ****
- goto found;
- }
-
-! #ifdef notdef
- /* Gee, still?... We will try the old fashioned way */
- (void) sprintf(tmp, "%s/lib/.%s",
- filename, EXTRASMENU);
---- 142,148 ----
- goto found;
- }
-
-! #if defined(__FreeBSD__) || defined(__NetBSD__)
- /* Gee, still?... We will try the old fashioned way */
- (void) sprintf(tmp, "%s/lib/.%s",
- filename, EXTRASMENU);
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_file.c ./lib/libxview/textsw/txt_file.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_file.c Tue Jun 29 01:17:48 1993
---- ./lib/libxview/textsw/txt_file.c Sun Nov 20 13:39:12 1994
-***************
-*** 51,57 ****
---- 51,61 ----
- extern char *getwd();
- #endif /* SVR4 */
- extern int errno, sys_nerr;
-+ #if (defined(BSD) && (BSD >= 199306))
-+ extern const char *const sys_errlist[];
-+ #else
- extern char *sys_errlist[];
-+ #endif
-
- Pkg_private int textsw_change_directory();
- Pkg_private void textsw_display(), textsw_display_view_margins();
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_input.c ./lib/libxview/textsw/txt_input.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_input.c Tue Jun 29 01:17:42 1993
---- ./lib/libxview/textsw/txt_input.c Sun Nov 20 13:39:13 1994
-***************
-*** 57,62 ****
---- 57,64 ----
- Pkg_private void textsw_implicit_commit_doit();
- #endif
-
-+ static int textsw_do_newline();
-+
- #define SPACE_CHAR 0x20
-
- Pkg_private int
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_move.c ./lib/libxview/textsw/txt_move.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_move.c Tue Jun 29 01:17:47 1993
---- ./lib/libxview/textsw/txt_move.c Sun Nov 20 13:39:13 1994
-***************
-*** 55,61 ****
-
- static int dnd_data_key = 0; /* XXX: Don't do this at home kids. */
- static int dnd_view_key = 0;
-! static int DndConvertProc();
-
- Pkg_private Es_handle textsw_esh_for_span();
- Pkg_private Es_index ev_resolve_xy();
---- 55,61 ----
-
- static int dnd_data_key = 0; /* XXX: Don't do this at home kids. */
- static int dnd_view_key = 0;
-! int DndConvertProc();
-
- Pkg_private Es_handle textsw_esh_for_span();
- Pkg_private Es_index ev_resolve_xy();
-***************
-*** 688,694 ****
- xv_destroy(dnd_accept_cursor);
- }
-
-! static int
- DndConvertProc(dnd, type, data, length, format)
- Dnd dnd;
- Atom *type;
---- 688,694 ----
- xv_destroy(dnd_accept_cursor);
- }
-
-! int
- DndConvertProc(dnd, type, data, length, format)
- Dnd dnd;
- Atom *type;
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_popup.c ./lib/libxview/textsw/txt_popup.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_popup.c Tue Jun 29 01:17:38 1993
---- ./lib/libxview/textsw/txt_popup.c Sun Nov 20 13:39:13 1994
-***************
-*** 95,100 ****
---- 95,104 ----
- static int TEXTSW_POPUP_KEY; /* key data holding one of the above
- key names */
-
-+ static void add_exten_item();
-+ static int fc_exten_func();
-+ static void show_dot_files_proc();
-+
- Panel_item store_panel_items[MAX_FILE_PANEL_ITEMS];
- Panel_item load_panel_items[MAX_FILE_PANEL_ITEMS];
- Panel_item include_panel_items[MAX_FILE_PANEL_ITEMS];
-***************
-*** 135,141 ****
- Frame popup_frame, base_frame;
- Panel panel = NULL;
- char *label;
-- void add_exten_item();
- #ifdef OW_I18N
- int win_use_im = ((popup_type != TEXTSW_MENU_SEL_MARK_TEXT) &&
- (popup_type != TEXTSW_MENU_NORMALIZE_LINE));
---- 139,144 ----
-***************
-*** 502,509 ****
- int frame_width;
- int frame_height;
- Panel_item item;
-- void show_dot_files_proc();
-- int fc_exten_func();
-
-
- panel = xv_get(fc, FRAME_CMD_PANEL);
---- 505,510 ----
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_putkey.c ./lib/libxview/textsw/txt_putkey.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_putkey.c Tue Jun 29 01:17:41 1993
---- ./lib/libxview/textsw/txt_putkey.c Sun Nov 20 13:39:13 1994
-***************
-*** 21,26 ****
---- 21,28 ----
-
- extern int errno;
-
-+ static int textsw_do_put();
-+
- Pkg_private Ev_finger_handle ev_add_finger();
- Pkg_private int ev_get_selection();
- Pkg_private Es_handle textsw_esh_for_span();
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_selsvc.c ./lib/libxview/textsw/txt_selsvc.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/textsw/txt_selsvc.c Sat Jun 25 21:05:23 1994
---- ./lib/libxview/textsw/txt_selsvc.c Sun Nov 20 13:39:13 1994
-***************
-*** 24,29 ****
---- 24,31 ----
- #include <stdlib.h>
- #endif /* SVR4 */
-
-+ static int textsw_should_ask_seln_svc();
-+
- extern int errno;
-
- Pkg_private Es_status es_copy();
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/cim_change.c ./lib/libxview/ttysw/cim_change.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/cim_change.c Tue Jun 29 01:17:12 1993
---- ./lib/libxview/ttysw/cim_change.c Sun Nov 20 13:39:14 1994
-***************
-*** 17,26 ****
- #include <xview_private/i18n_impl.h>
- #include <sys/types.h>
- #include <pixrect/pixrect.h>
-- #include <xview_private/ttyansi.h>
- #include <xview_private/charimage.h>
- #include <xview_private/charscreen.h>
- #include <xview_private/tty_impl.h>
-
- char boldify;
-
---- 17,26 ----
- #include <xview_private/i18n_impl.h>
- #include <sys/types.h>
- #include <pixrect/pixrect.h>
- #include <xview_private/charimage.h>
- #include <xview_private/charscreen.h>
- #include <xview_private/tty_impl.h>
-+ #include <xview_private/ttyansi.h>
-
- char boldify;
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_gtty.c ./lib/libxview/ttysw/tty_gtty.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_gtty.c Tue Jun 29 01:17:20 1993
---- ./lib/libxview/ttysw/tty_gtty.c Sun Nov 20 13:39:14 1994
-***************
-*** 14,19 ****
---- 14,20 ----
- * Ttysw parameter retrieval mechanism to get original tty settings to pty.
- */
-
-+ #include <sys/param.h>
- #include <sys/types.h>
- #include <stdio.h>
- #include <xview_private/portable.h> /* for tty_mode_t and XV* defines */
-***************
-*** 34,39 ****
---- 35,41 ----
- */
- #ifdef XV_USE_TERMIOS
-
-+ #if !(defined(BSD) && (BSD >= 199103))
- static struct termios default_modes = {
- BRKINT|ICRNL|IXON|IGNPAR|IMAXBEL, /* input modes */
- OPOST|ONLCR, /* output modes */
-***************
-*** 57,62 ****
---- 59,78 ----
- CWERASE, /* VWERASE */
- CLNEXT, /* VLNEXT */
- };
-+ #else
-+ #include <sys/ttydefaults.h>
-+ static struct termios default_modes = {
-+ TTYDEF_IFLAG, /* input modes */
-+ TTYDEF_OFLAG, /* output modes */
-+ TTYDEF_CFLAG, /* control modes */
-+ TTYDEF_LFLAG, /* local modes */
-+ /* control characters */
-+ { CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
-+ _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
-+ CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE },
-+ TTYDEF_SPEED, TTYDEF_SPEED /* input and output speeds */
-+ };
-+ #endif
-
- #else /* XV_USE_TERMIOS */
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_impl.h ./lib/libxview/ttysw/tty_impl.h
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_impl.h Tue Jun 29 01:17:18 1993
---- ./lib/libxview/ttysw/tty_impl.h Sun Nov 20 13:39:14 1994
-***************
-*** 14,19 ****
---- 14,20 ----
- * terminal emulation for teletype based programs.
- */
-
-+ #include <sys/param.h>
- #include <xview_private/portable.h> /* tty and pty configuration info */
-
- #ifdef XV_USE_TERMIOS
-***************
-*** 210,216 ****
---- 211,223 ----
- * Access functions for tty characteristics.
- */
- #ifdef XV_USE_TERMIOS
-+ #if (defined(BSD) && (BSD >= 199103))
-+ #include <sys/ioctl.h>
-+ #include <sys/ioctl_compat.h>
-+ #define tty_gettabs(t) ((t)->termios.c_oflag & OXTABS)
-+ #else
- #define tty_gettabs(t) ((t)->termios.c_oflag & XTABS)
-+ #endif
- #define tty_getdsuspc(t) ((int) ((t)->termios.c_cc[VDSUSP]))
- #define tty_geteofc(t) ((int) ((t)->termios.c_cc[VEOF]))
- #define tty_geteolc(t) ((int) ((t)->termios.c_cc[VEOL]))
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_init.c ./lib/libxview/ttysw/tty_init.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_init.c Tue Jun 29 01:17:19 1993
---- ./lib/libxview/ttysw/tty_init.c Sun Nov 20 13:39:14 1994
-***************
-*** 14,19 ****
---- 14,20 ----
- * Ttysw initialization, destruction and error procedures
- */
-
-+ #include <sys/param.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-***************
-*** 82,88 ****
---- 83,93 ----
-
- extern char *strncpy();
- extern char *strcpy();
-+ #if (defined(BSD) && (BSD >= 199306))
-+ extern off_t lseek();
-+ #else
- extern long lseek();
-+ #endif
- char *textsw_checkpoint_undo();
-
- /* static */ void ttysw_parseargs();
-***************
-*** 106,111 ****
---- 111,117 ----
-
- extern int ttysel_use_seln_service;
-
-+ static int ttyinit();
-
- struct ttysw_createoptions {
- int becomeconsole; /* be the console */
-***************
-*** 518,523 ****
---- 524,532 ----
- (void) dup2(ttysw->ttysw_tty, 2);
- (void) close(ttysw->ttysw_tty);
-
-+ #if (defined(BSD) && (BSD >= 199103))
-+ (void) ioctl(0, TIOCSCTTY, NULL);
-+ #endif
- if (*argv == (char *) NULL || strcmp("-c", *argv) == 0) {
- /* Process arg list */
- int argc;
-***************
-*** 955,961 ****
---- 964,974 ----
- struct utmpx utmp;
- #endif
- struct passwd *passwdent;
-+ #if !(defined(BSD) && (BSD >= 199103))
- extern struct passwd *getpwuid();
-+ #else
-+ struct passwd *getpwuid __P((uid_t));
-+ #endif
- int f;
- char *ttyn;
- extern char *ttyname();
-***************
-*** 1007,1019 ****
---- 1020,1041 ----
- XV_MSG("Add tty[qrs][0-f] to /etc/ttys file.\n"));
- return (0);
- }
-+ #if !(defined(BSD) && (BSD >= 199103))
- if ((f = open("/etc/utmp", 1)) >= 0) {
-+ #else
-+ if ((f = open(_PATH_UTMP, 1)) >= 0) {
-+ #endif
- (void) lseek(f, (long) (ttyslotuse * sizeof(utmp)), 0);
- (void) write(f, (char *) &utmp, sizeof(utmp));
- (void) close(f);
- } else {
- (void) fprintf(stderr,
-+ #if !(defined(BSD) && (BSD >= 199103))
- XV_MSG("make sure that you can write /etc/utmp!\n"));
-+ #else
-+ XV_MSG("make sure that you can write "));
-+ (void) fprintf(stderr, "%s!\n", _PATH_UTMP);
-+ #endif
- return (0);
- }
- return (ttyslotuse);
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_main.c ./lib/libxview/ttysw/tty_main.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_main.c Tue Jun 29 01:17:22 1993
---- ./lib/libxview/ttysw/tty_main.c Sun Nov 20 13:39:14 1994
-***************
-*** 75,80 ****
---- 75,85 ----
- int committed_left = 0;
- #endif
-
-+ static int ttysw_process_point();
-+ static int ttysw_process_adjust();
-+ static int ttysw_process_motion();
-+ static int ttysw_process_keyboard();
-+
- extern Textsw_index textsw_insert();
- #ifdef OW_I18N
- extern Textsw_index textsw_insert_wcs();
-***************
-*** 906,913 ****
---- 911,922 ----
-
- if (int_ucntl == (tiocsti & 0xff))
- ttysw_process_STI(ttysw, owbp, cc - 1);
-+ #ifndef XV_USE_TERMIOS
- (void) ioctl(ttysw->ttysw_tty, TIOCGETC, &ttysw->tchars);
- (void) ioctl(ttysw->ttysw_tty, TIOCGLTC, &ttysw->ltchars);
-+ #else
-+ (void) tcgetattr(ttysw->ttysw_tty, &ttysw->termios);
-+ #endif
- ttysw_getp(TTY_VIEW_HANDLE_FROM_TTY_FOLIO(ttysw)); /* jcb for nng */
- } else
- #ifdef OW_I18N
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_ntfy.c ./lib/libxview/ttysw/tty_ntfy.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/tty_ntfy.c Tue Jun 29 01:17:17 1993
---- ./lib/libxview/ttysw/tty_ntfy.c Sun Nov 20 13:39:14 1994
-***************
-*** 171,180 ****
---- 171,184 ----
- * SIGWINCHes on resize.
- */
- /* Notify process group that terminal has changed. */
-+ #if !(defined(BSD) && (BSD >= 199103))
- if (ioctl(ttysw->ttysw_tty, TIOCGPGRP, &pgrp) == -1) {
- perror(XV_MSG("ttysw_sigwinch, can't get tty process group"));
- return;
- }
-+ #else
-+ pgrp = tcgetpgrp(ttysw->ttysw_pty);
-+ #endif
- /*
- * Only killpg when pgrp is not tool's. This is the case of haven't
- * completed ttysw_fork yet (or even tried to do it yet).
-***************
-*** 204,210 ****
---- 208,218 ----
- return;
- }
- /* Send the signal to the process group of the controlling tty */
-+ #if !(defined(BSD) && (BSD >= 199103))
- if (ioctl(ttysw->ttysw_tty, TIOCGPGRP, &control_pg) >= 0) {
-+ #else
-+ if ((control_pg = tcgetpgrp(ttysw->ttysw_pty)) >= 0) {
-+ #endif
- /*
- * Flush our buffers of completed and partial commands. Be sure to do
- * this BEFORE killpg, or we'll flush the prompt coming back from the
-***************
-*** 227,237 ****
- termsw->cmd_started = 0;
- termsw->pty_owes_newline = 0;
- }
-! # if defined(XV_USE_SVR4_PTYS) || defined(sun)
- (void) ioctl(ttysw->ttysw_pty, TIOCSIGNAL, &sig);;
-! # else
- (void) killpg(control_pg, sig);
-! # endif
- } else
- perror(XV_MSG("ioctl"));
- }
---- 235,245 ----
- termsw->cmd_started = 0;
- termsw->pty_owes_newline = 0;
- }
-! #if defined(XV_USE_SVR4_PTYS) || defined(sun)
- (void) ioctl(ttysw->ttysw_pty, TIOCSIGNAL, &sig);;
-! #else
- (void) killpg(control_pg, sig);
-! #endif
- } else
- perror(XV_MSG("ioctl"));
- }
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/ttyansi.c ./lib/libxview/ttysw/ttyansi.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/ttyansi.c Tue Jun 29 01:17:21 1993
---- ./lib/libxview/ttysw/ttyansi.c Sun Nov 20 13:39:15 1994
-***************
-*** 31,36 ****
---- 31,40 ----
-
- #include <xview/sel_attrs.h>
-
-+ static int send_input_to_textsw();
-+ static int ansi_lf();
-+ static int ansi_char();
-+
- char *strncpy();
- char *textsw_checkpoint_undo();
- Textsw_index textsw_replace_i18n(), textsw_erase_i18n();
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/ttysw/ttyselect.c ./lib/libxview/ttysw/ttyselect.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/ttysw/ttyselect.c Sat Jun 25 21:05:23 1994
---- ./lib/libxview/ttysw/ttyselect.c Sun Nov 20 13:39:15 1994
-***************
-*** 75,80 ****
---- 75,82 ----
- #endif
- ttysel_reply();
-
-+ static ttysel_resynch();
-+
- static struct ttyselection *
- ttysel_from_rank();
-
-diff -rc ../old/xview3.2p1-X11R6/lib/libxview/win/win_input.c ./lib/libxview/win/win_input.c
-*** ../old/xview3.2p1-X11R6/lib/libxview/win/win_input.c Sun Jun 26 18:27:53 1994
---- ./lib/libxview/win/win_input.c Sun Nov 20 13:39:15 1994
-***************
-*** 56,61 ****
---- 56,62 ----
- static int GetButtonEvent();
- static int win_translate_KP_keysym();
- static int translate_key();
-+ static int xevent_to_event();
-
- extern struct rectlist *win_get_damage();
- extern void server_set_timestamp();
++static int copy_1_attr();
++static int copy_counted_list();
++static int copy_singleton();
++static int copy_null_list();
++
+ /*
+ * attr_copy: copy an attribute list, returning the size in bytes
+ */
diff --git a/x11/xview-lib/patches/patch-ae b/x11/xview-lib/patches/patch-ae
index a3cf201a016..c66a7713720 100644
--- a/x11/xview-lib/patches/patch-ae
+++ b/x11/xview-lib/patches/patch-ae
@@ -1,170 +1,13 @@
-$NetBSD: patch-ae,v 1.3 1998/08/07 11:18:35 agc Exp $
-
-*** lib/libxview/win/win_input.c~ Tue Oct 8 22:51:45 1996
---- lib/libxview/win/win_input.c Wed Apr 17 02:26:55 1996
-***************
-*** 854,860 ****
- #ifdef X11R6
- /* lumpi@dobag.in-berlin.de */
- int ksym_pcc;
-! XGetKeyboardMapping(display,NoSymbol,0,&ksym_pcc);
- for (index = 0; index < ksym_pcc; index++) {
- #else
- for (index = 0; index < display->keysyms_per_keycode; index++) {
---- 854,862 ----
- #ifdef X11R6
- /* lumpi@dobag.in-berlin.de */
- int ksym_pcc;
-! int tc_min_keycode, tc_max_keycode;
-! XDisplayKeycodes(display, &tc_min_keycode, &tc_max_keycode);
-! XGetKeyboardMapping(display,tc_min_keycode,tc_max_keycode-tc_min_keycode-1,&ksym_pcc);
- for (index = 0; index < ksym_pcc; index++) {
- #else
- for (index = 0; index < display->keysyms_per_keycode; index++) {
-***************
-*** 862,868 ****
- if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
- if (IsKeypadKey(ksym)) {
- /* See if key has been rebound. */
-! if (!translate_key(display, ksym, ek->state,
- buffer, BUFFERSIZE)) {
- (void)win_translate_KP_keysym(ksym, buffer);
- }
---- 864,870 ----
- if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
- if (IsKeypadKey(ksym)) {
- /* See if key has been rebound. */
-! if (translate_key(display, ksym, ek->state,
- buffer, BUFFERSIZE)) {
- (void)win_translate_KP_keysym(ksym, buffer);
- }
-***************
-*** 2721,2728 ****
- * Xlib's.
- */
-
-! #ifdef X11R6
-! /* lumpi@dobag.in-berlin.de */
- static int
- translate_key(dpy, symbol, modifiers, buffer, nbytes)
- Display *dpy;
---- 2723,2732 ----
- * Xlib's.
- */
-
-! #ifdef X11R6
-! /* lumpi@dobag.in-berlin.de
-! tom@sees.bangor.ac.uk this replacement for X11R6 doesn't work. At least
-! it should now return sensible values though. */
- static int
- translate_key(dpy, symbol, modifiers, buffer, nbytes)
- Display *dpy;
-***************
-*** 2732,2742 ****
- int nbytes;
- {
- /* This is _very_ rude ! */
-! strcpy(buffer,XKeysymToString(symbol));
- }
-
-- #else
-
- static int
- translate_key(dpy, symbol, modifiers, buffer, nbytes)
- Display *dpy;
---- 2736,2753 ----
- int nbytes;
- {
- /* This is _very_ rude ! */
-! char *string;
-! string = XKeysymToString(symbol);
-! if (string) {
-! strncpy(buffer,XKeysymToString(symbol),nbytes);
-! return(strlen(buffer));
-! }
-! else
-! return 0;
- }
-
-
-+ #else
- static int
- translate_key(dpy, symbol, modifiers, buffer, nbytes)
- Display *dpy;
-***************
-*** 2762,2765 ****
- }
- return 0;
- }
-! #endif
---- 2773,2776 ----
- }
- return 0;
- }
-! #endif
-
-3.
-
-
-*** lib/libxview/ttysw/tty_mapkey.c~ Tue Jun 29 06:17:20 1993
---- lib/libxview/ttysw/tty_mapkey.c Tue Jan 16 23:58:56 1996
-***************
-*** 500,506 ****
- * have more time.
- */
-
-! #ifdef i386
- static void
- ttysw_arrow_keys_to_string(xv_id, str)
- unsigned xv_id;
---- 500,506 ----
- * have more time.
- */
-
-! #if defined(i386) && !defined (__FreeBSD__) && !defined(__NetBSD__)
- static void
- ttysw_arrow_keys_to_string(xv_id, str)
- unsigned xv_id;
-*** lib/libxview/ttysw/cim_size.c.orig Tue Jun 29 06:17:14 1993
---- lib/libxview/ttysw/cim_size.c Sat Oct 25 00:53:49 1997
-***************
-*** 156,174 ****
- {
-
- if (lines_ptr) {
-! cfree((CHAR *) (lines_ptr));
- lines_ptr = NULL;
- }
- if (image) {
-! cfree((CHAR **) image);
- image = NULL;
- }
- if (mode_ptr) {
-! cfree((char *) (mode_ptr));
- mode_ptr = NULL;
- }
- if (screenmode) {
-! cfree((char **) screenmode);
- screenmode = NULL;
- }
- }
---- 156,174 ----
- {
-
- if (lines_ptr) {
-! free((CHAR *) (lines_ptr));
- lines_ptr = NULL;
- }
- if (image) {
-! free((CHAR **) image);
- image = NULL;
- }
- if (mode_ptr) {
-! free((char *) (mode_ptr));
- mode_ptr = NULL;
- }
- if (screenmode) {
-! free((char **) screenmode);
- screenmode = NULL;
- }
- }
+$NetBSD: patch-ae,v 1.4 2001/12/20 09:19:54 tron Exp $
+
+--- lib/libxview/base/Imakefile.orig Tue Jun 29 07:14:40 1993
++++ lib/libxview/base/Imakefile Thu Dec 20 10:09:16 2001
+@@ -37,7 +37,7 @@
+ drawable.o\
+ xv_debug.o\
+ xv_parse.o\
+- xv_list.o\
++ xv_list.o\
+ xv_error.o
+
+ SRCS=\
diff --git a/x11/xview-lib/patches/patch-af b/x11/xview-lib/patches/patch-af
index bc6bbf8b004..7bd4c787550 100644
--- a/x11/xview-lib/patches/patch-af
+++ b/x11/xview-lib/patches/patch-af
@@ -1,16 +1,34 @@
-$NetBSD: patch-af,v 1.2 1998/08/07 11:18:36 agc Exp $
+$NetBSD: patch-af,v 1.3 2001/12/20 09:19:55 tron Exp $
---- ../alt/lib/libxview/notify/ndet_fd.c Tue Jun 29 07:18:08 1993
-+++ lib/libxview/notify/ndet_fd.c Sat Jul 26 00:42:21 1997
-@@ -27,8 +27,9 @@
- #define GETDTABLESIZE() \
- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=(int)sysconf(_SC_OPEN_MAX)))
- #else
--#define GETDTABLESIZE() \
-- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
-+#define GETDTABLESIZE() \
-+ (dtablesize_cache ? dtablesize_cache : \
-+ (dtablesize_cache = MIN(getdtablesize(), FD_SETSIZE)))
- #endif SVR4
+--- lib/libxview/base/base.h.orig Tue Jun 29 07:14:42 1993
++++ lib/libxview/base/base.h Thu Dec 20 10:09:16 2001
+@@ -6,10 +6,15 @@
+ * file for terms of the license.
+ */
- static int ndet_fd_table_size; /* Number of descriptor slots
++#include <sys/param.h>
+ #ifndef xview_base_DEFINED
+ #define xview_base_DEFINED
+ #include <string.h>
++#if (defined(BSD) && (BSD >= 199103))
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+
+ #include <xview/xv_c_types.h>
+
+@@ -54,10 +59,12 @@
+ * non-SVR4 systems.
+ */
+ #ifndef SUNOS41
++#if !(defined(BSD) && (BSD >= 199103))
+ #define XV_OS_SVR4
+-#define XV_USE_TTCOMPAT
+ #define SYSV_WAIT
+ #define SYSV_UCONTEXT
++#endif
++#define XV_USE_TTCOMPAT
+ #define XV_USE_XVFCNTL
+ #endif
+
diff --git a/x11/xview-lib/patches/patch-ag b/x11/xview-lib/patches/patch-ag
index e0394498691..dc18dcd5481 100644
--- a/x11/xview-lib/patches/patch-ag
+++ b/x11/xview-lib/patches/patch-ag
@@ -1,16 +1,22 @@
-$NetBSD: patch-ag,v 1.2 1998/08/07 11:18:37 agc Exp $
+$NetBSD: patch-ag,v 1.3 2001/12/20 09:19:55 tron Exp $
---- ../alt/lib/libxview/notify/ndisdispch.c Tue Jun 29 07:18:06 1993
-+++ lib/libxview/notify/ndisdispch.c Sat Jul 26 00:55:47 1997
-@@ -30,8 +30,9 @@
- #define GETDTABLESIZE() \
- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=(int)sysconf(_SC_OPEN_MAX)))
- #else
--#define GETDTABLESIZE() \
-- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
-+#define GETDTABLESIZE() \
-+ (dtablesize_cache ? dtablesize_cache : \
-+ (dtablesize_cache = MIN(getdtablesize(), FD_SETSIZE)))
- #endif SVR4
+--- lib/libxview/base/xv_debug.h.orig Tue Jun 29 07:14:44 1993
++++ lib/libxview/base/xv_debug.h Thu Dec 20 10:09:16 2001
+@@ -9,11 +9,16 @@
+ #ifndef _xv_debug_h_already_included
+ #define _xv_debug_h_already_included
- pkg_private_data u_int ndis_flags = 0;
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <xview/pkg.h> /* needed to get definition of Xv_private */
+ /*
diff --git a/x11/xview-lib/patches/patch-ah b/x11/xview-lib/patches/patch-ah
index 0575cf5b404..e92f214e665 100644
--- a/x11/xview-lib/patches/patch-ah
+++ b/x11/xview-lib/patches/patch-ah
@@ -1,14 +1,26 @@
-$NetBSD: patch-ah,v 1.2 1998/08/07 11:18:37 agc Exp $
+$NetBSD: patch-ah,v 1.3 2001/12/20 09:19:55 tron Exp $
---- misc/support/Imakefile.orig Tue Jun 29 07:14:23 1993
-+++ misc/support/Imakefile Sat Jul 4 16:18:58 1998
-@@ -5,8 +5,7 @@
- /**/# Imakefile for misc/support files.
+--- lib/libxview/base/xv_error.c.orig Tue Jun 29 07:14:42 1993
++++ lib/libxview/base/xv_error.c Thu Dec 20 10:10:01 2001
+@@ -11,15 +11,20 @@
+ */
- SUPPORTFILES = text_extras_menu textswrc ttyswrc
--INFOFILES = textsw.info ttysw.info xview.info clock.info olwm.info props.info \
-- textedit.info
-+INFOFILES = textsw.info ttysw.info xview.info props.info textedit.info
+ #include <stdio.h>
++#include <sys/param.h>
+ #include <xview/pkg_public.h>
+ #include <X11/Xlib.h>
+ #include <xview_private/i18n_impl.h>
+ #include <xview_private/portable.h>
- ALLFILES = $(SUPPORTFILES) $(INFOFILES)
+ /* Unix system error variables */
++#if (defined(BSD) && (BSD >= 199306))
++#include <errno.h>
++#else
+ extern int sys_nerr;
+-extern char *sys_errlist[];
+ extern int errno;
++extern char *sys_errlist[];
++#endif
+ Xv_private_data char *xv_app_name;
+ Xv_private int (*xv_error_proc) ();
diff --git a/x11/xview-lib/patches/patch-ai b/x11/xview-lib/patches/patch-ai
index 685089e3168..e7531c67ca1 100644
--- a/x11/xview-lib/patches/patch-ai
+++ b/x11/xview-lib/patches/patch-ai
@@ -1,18 +1,65 @@
-$NetBSD: patch-ai,v 1.1 1998/12/28 18:52:05 tron Exp $
+$NetBSD: patch-ai,v 1.2 2001/12/20 09:19:55 tron Exp $
---- lib/libxview/notify/ntfy.h~ Sun Dec 6 18:45:02 1998
-+++ lib/libxview/notify/ntfy.h Sat Dec 19 13:49:24 1998
-@@ -188,9 +188,12 @@
- extern sigset_t ntfy_sigs_delayed;/* Bit mask of signals received while in
- critical section */
+--- lib/libxview/canvas/cnvs_input.c.orig Tue Jun 29 07:14:46 1993
++++ lib/libxview/canvas/cnvs_input.c Thu Dec 20 10:10:42 2001
+@@ -415,20 +415,25 @@
+ register Event *event;
+ {
+ Xv_Window paint_window;
+- Event tmp_event;
++ Event *tmp_event;
+ int x, y;
+
++ if ( (tmp_event = (Event *) malloc(sizeof(Event))) == NULL){
++ fprintf(stderr,"canvas_window_event: malloc failed\n");
++ exit(1);
++ }
+ paint_window = xv_get(canvas_public, CANVAS_NTH_PAINT_WINDOW, 0);
+ if (paint_window == NULL) {
+ /* call xv_error */
+ return (event);
+ }
+- tmp_event = *event;
++
++ memcpy(tmp_event,event,sizeof(Event));
+ win_translate_xy(paint_window, canvas_public,
+ event_x(event), event_y(event), &x, &y);
+- event_set_x(&tmp_event, x);
+- event_set_y(&tmp_event, y);
+- return (&tmp_event);
++ event_set_x(tmp_event, x);
++ event_set_y(tmp_event, y);
++ return (tmp_event);
+ }
+
+ /*
+@@ -440,20 +445,24 @@
+ register Event *event;
+ {
+ Xv_Window paint_window;
+- Event tmp_event;
++ Event *tmp_event;
+ int x, y;
+
++ if ( (tmp_event = (Event *) malloc(sizeof(Event))) == NULL){
++ fprintf(stderr,"canvas_window_event: malloc failed\n");
++ exit(1);
++ }
+ paint_window = xv_get(canvas_public, CANVAS_NTH_PAINT_WINDOW, 0);
+ if (paint_window == NULL) {
+ /* call xv_error */
+ return (event);
+ }
+- tmp_event = *event;
++ memcpy(tmp_event,event,sizeof(Event));
+ win_translate_xy(paint_window, canvas_public,
+ event_x(event), event_y(event), &x, &y);
+- event_set_x(&tmp_event, x);
+- event_set_y(&tmp_event, y);
+- return (&tmp_event);
++ event_set_x(tmp_event, x);
++ event_set_y(tmp_event, y);
++ return (tmp_event);
+ }
+
--#ifdef SVR4
-+#if defined(SVR4)
- #define sigisempty(s) (!(((s)->__sigbits[0]) | ((s)->__sigbits[1]) \
- | ((s)->__sigbits[2]) | ((s)->__sigbits[3])))
-+#elif defined(__NetBSD__) && (__NetBSD_Version__ > 103080000)
-+#define sigisempty(s) (!(((s)->__bits[0]) | ((s)->__bits[1]) \
-+ | ((s)->__bits[2]) | ((s)->__bits[3])))
- #else
- #define sigisempty(s) (!(*(s)))
- #endif
diff --git a/x11/xview-lib/patches/patch-aj b/x11/xview-lib/patches/patch-aj
index ce683e14231..88442a9b30d 100644
--- a/x11/xview-lib/patches/patch-aj
+++ b/x11/xview-lib/patches/patch-aj
@@ -1,55 +1,33 @@
-$NetBSD: patch-aj,v 1.2 2000/06/16 14:16:54 pooka Exp $
---- lib/libxview/textsw/txt_file.c.orig Sat Jan 8 03:32:48 2000
-+++ lib/libxview/textsw/txt_file.c Sat Jan 8 03:57:02 2000
-@@ -45,14 +45,23 @@
+$NetBSD: patch-aj,v 1.3 2001/12/20 09:19:55 tron Exp $
+
+--- lib/libxview/filter/filter.c.orig Tue Jun 29 07:14:57 1993
++++ lib/libxview/filter/filter.c Thu Dec 20 10:09:16 2001
+@@ -39,11 +39,12 @@
- extern CHAR *STRCAT();
- extern CHAR *STRNCAT();
--#ifdef SVR4
-+
-+#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000))
-+#define GETCWD
-+#endif
-+
-+#ifdef GETCWD
- extern char *getcwd();
- #else
- extern char *getwd();
--#endif /* SVR4 */
-+#endif /* GETCWD */
- extern int errno, sys_nerr;
- #if (defined(BSD) && (BSD >= 199306))
-+#if __NetBSD_Version__ > 103080000
-+#include <errno.h>
-+#else
- extern const char *const sys_errlist[];
-+#endif
- #else
- extern char *sys_errlist[];
- #endif
-@@ -358,21 +367,21 @@
- }
-
- #ifdef OW_I18N
--#ifdef SVR4
-+#ifdef GETCWD
- if (getcwd(pathname_mb, MAXPATHLEN) == 0)
- #else
- if (getwd(pathname_mb) == 0)
--#endif /* SVR4 */
-+#endif /* GETCWD */
- return (0);
- (void) mbstowcs(pathname, pathname_mb, MAXPATHLEN-1);
+ char *stream_fgets();
- #else /* OW_I18N */
+-enum CharClass
++static enum CharClass
+ breakProc();
+-struct CharAction
++static struct CharAction
+ digits();
+-
++static
++ any_shell_meta();
--#ifdef SVR4
-+#ifdef GETCWD
- if (getcwd(pathname, MAXPATHLEN) == 0)
- #else
- if (getwd(pathname) == 0)
--#endif /* SVR4 */
-+#endif /* GETCWD */
- return (0);
- #endif /* OW_I18N */
+ struct filter_rec **
+ xv_parse_filter_table(in, filename)
+@@ -203,10 +204,10 @@
+ {
+ int i;
+ for (i = 0; table[i] != NULL; i++) {
+- cfree((char *) table[i]->call);
++ free((char *) table[i]->call);
+ free((char *) table[i]);
+ }
+- cfree((char *) table);
++ free((char *) table);
+ }
+ static struct CharAction
diff --git a/x11/xview-lib/patches/patch-ak b/x11/xview-lib/patches/patch-ak
index c994366ace7..88ab9a59de3 100644
--- a/x11/xview-lib/patches/patch-ak
+++ b/x11/xview-lib/patches/patch-ak
@@ -1,31 +1,15 @@
-$NetBSD: patch-ak,v 1.1 1999/03/31 14:25:40 hubertf Exp $
+$NetBSD: patch-ak,v 1.2 2001/12/20 09:19:55 tron Exp $
---- lib/libxview/textsw/es_file.c.orig Tue Jun 29 07:17:34 1993
-+++ lib/libxview/textsw/es_file.c Wed Mar 31 15:32:31 1999
-@@ -88,10 +88,11 @@
- #ifdef SVR4
- #include <stdlib.h>
- #include <dirent.h>
-+#include <sys/errno.h>
- #else
- #include <sys/dir.h>
-+#include <errno.h>
- #endif /* SVR4 */
--#include <sys/errno.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -110,8 +111,13 @@
+--- lib/libxview/font/font.c.orig Tue Jun 29 07:15:01 1993
++++ lib/libxview/font/font.c Thu Dec 20 10:09:16 2001
+@@ -67,6 +67,10 @@
+ Xv_private char *xv_font_scale_cmdline();
+ Xv_private char *xv_font_scale();
-
- extern int errno, sys_nerr;
-+#if (defined(BSD) && (BSD >= 199306))
-+extern const char *const sys_err_list[];
-+extern off_t lseek();
-+#else
- extern char *sys_errlist[];
- extern long lseek();
-+#endif
-
- static void update_read_buf(); /* update the read buf if overlaps write buf */
- static Es_status es_file_commit();
++static int font_setup_defaults();
++static int font_construct_name();
++static int font_init_create_attrs();
++
+ /*
+ * delimiters
+ */
diff --git a/x11/xview-lib/patches/patch-al b/x11/xview-lib/patches/patch-al
index a0574aa62bd..dfe72c173cf 100644
--- a/x11/xview-lib/patches/patch-al
+++ b/x11/xview-lib/patches/patch-al
@@ -1,26 +1,34 @@
-$NetBSD: patch-al,v 1.1 1999/12/15 23:51:04 dmcmahill Exp $
+$NetBSD: patch-al,v 1.2 2001/12/20 09:19:55 tron Exp $
---- ./lib/libxview/misc/expandname.c.orig Tue Jun 29 01:16:30 1993
-+++ ./lib/libxview/misc/expandname.c Sun Dec 12 21:41:40 1999
-@@ -24,4 +24,7 @@
- #include <sgtty.h>
+--- lib/libxview/font/font_get.c.orig Tue Jun 29 07:15:00 1993
++++ lib/libxview/font/font_get.c Thu Dec 20 10:10:24 2001
+@@ -43,7 +43,6 @@
+ XFontStruct *x_font_info = (XFontStruct *)font->x_font_info;
+ Xv_opaque v;
+ int attr_is_char_width = 0;
+- Attr_avlist avlist = (Attr_avlist) args;
-+#if defined(BSD) && (BSD >= 199306)
-+#include <unistd.h>
-+#else
- #ifdef sparc
- #ifdef SVR4
-@@ -31,4 +34,5 @@
- #endif SVR4
- #endif
-+#endif
+ #ifdef OW_I18N
+ if (font->type == FONT_TYPE_TEXT) {
+@@ -138,8 +137,8 @@
+ }
- #ifdef SVR4
-@@ -121,5 +125,7 @@
- (void) close(pivec[0]);
- #ifndef SVR4
-+#if !(defined(BSD) && (BSD >= 199103))
- while (wait((union wait *) & status) != pid);
-+#endif
- #else SVR4
- while (wait( & status) != pid);
+ case FONT_STRING_DIMS:{
+- char *string = (char *) avlist[0];
+- Font_string_dims *size = (Font_string_dims *) avlist[1];
++ char *string = (char *)va_arg(args, Attr_attribute);
++ Font_string_dims *size = (Font_string_dims *)va_arg(args, Attr_attribute);
+ struct pr_size my_pf_size;
+ if (string) {
+ my_pf_size = xv_pf_textwidth(strlen(string), font_public, string);
+@@ -264,8 +263,8 @@
+
+ #ifdef OW_I18N
+ case FONT_STRING_DIMS_WC:{
+- wchar_t *ws = (wchar_t *) avlist[0];
+- Font_string_dims *size = (Font_string_dims *) avlist[1];
++ wchar_t *ws = (wchar_t *) va_arg(args, Attr_attribute);
++ Font_string_dims *size = (Font_string_dims *) va_arg(args, Attr_attribute);
+ struct pr_size my_pf_size;
+
+ if (ws) {
diff --git a/x11/xview-lib/patches/patch-am b/x11/xview-lib/patches/patch-am
new file mode 100644
index 00000000000..f5eea6ad7e6
--- /dev/null
+++ b/x11/xview-lib/patches/patch-am
@@ -0,0 +1,28 @@
+$NetBSD: patch-am,v 1.3 2001/12/20 09:19:55 tron Exp $
+
+--- lib/libxview/io_stream/file_strms.c.orig Tue Jun 29 07:15:07 1993
++++ lib/libxview/io_stream/file_strms.c Thu Dec 20 10:09:16 2001
+@@ -17,7 +17,11 @@
+
+ #define GetFISData struct xv_file_input_stream_data *data = (struct xv_file_input_stream_data*) in->client_data
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ static struct xv_file_input_stream_data {
++#else
++struct xv_file_input_stream_data {
++#endif
+ FILE *fp;
+ int lineno;
+ };
+@@ -156,7 +160,11 @@
+
+ #define GetFOSData struct xv_file_output_stream_data *data = (struct xv_file_output_stream_data*) out->client_data
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ static struct xv_file_output_stream_data {
++#else
++struct xv_file_output_stream_data {
++#endif
+ FILE *fp;
+ int lineno;
+ };
diff --git a/x11/xview-lib/patches/patch-an b/x11/xview-lib/patches/patch-an
index 555a982624a..1dc5275eae7 100644
--- a/x11/xview-lib/patches/patch-an
+++ b/x11/xview-lib/patches/patch-an
@@ -1,23 +1,16 @@
-$NetBSD: patch-an,v 1.2 2000/02/05 16:27:25 wiz Exp $
---- ./lib/libxview/wmgr/wmgr_menu.c.orig Tue Jun 29 01:17:24 1993
-+++ ./lib/libxview/wmgr/wmgr_menu.c Sun Dec 12 22:12:12 1999
-@@ -11,8 +11,13 @@
- */
+$NetBSD: patch-an,v 1.3 2001/12/20 09:19:55 tron Exp $
+
+--- lib/libxview/io_stream/othr_strms.c.orig Tue Jun 29 07:15:05 1993
++++ lib/libxview/io_stream/othr_strms.c Thu Dec 20 10:09:16 2001
+@@ -17,7 +17,11 @@
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
-+
-+#if defined(BSD) && (BSD >= 199306)
-+#include <unistd.h>
-+#else
- #ifdef sparc
- #ifdef SVR4
-@@ -21,4 +26,5 @@
- #include <vfork.h>
- #endif SVR4
-+#endif sparc
- #endif
+ #define GetFCSData struct xv_filter_comments_stream_data *data = (struct xv_filter_comments_stream_data*) in->client_data
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ static struct xv_filter_comments_stream_data {
++#else
++struct xv_filter_comments_stream_data {
++#endif
+ Bool backed_up;
+ char backup, lastchar;
+ };
diff --git a/x11/xview-lib/patches/patch-ao b/x11/xview-lib/patches/patch-ao
index 208d7aae40c..abef8a0f08d 100644
--- a/x11/xview-lib/patches/patch-ao
+++ b/x11/xview-lib/patches/patch-ao
@@ -1,11 +1,28 @@
-$NetBSD: patch-ao,v 1.1 1999/12/15 23:51:04 dmcmahill Exp $
+$NetBSD: patch-ao,v 1.2 2001/12/20 09:19:55 tron Exp $
---- ./lib/libxview/textsw/txt_filter.c.orig Tue Jun 29 01:17:39 1993
-+++ ./lib/libxview/textsw/txt_filter.c Mon Dec 13 09:38:22 1999
-@@ -32,5 +32,5 @@
- #include <string.h>
-
--#ifdef sparc
-+#if defined(sparc) && !(defined(BSD) && (BSD >= 199306))
- #ifdef SVR4
- #include <unistd.h>
+--- lib/libxview/io_stream/str_strms.c.orig Tue Jun 29 07:15:06 1993
++++ lib/libxview/io_stream/str_strms.c Thu Dec 20 10:09:16 2001
+@@ -17,7 +17,11 @@
+
+ #define GetSISData struct string_input_stream_data *data = (struct string_input_stream_data*) in->client_data
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ static struct string_input_stream_data {
++#else
++struct string_input_stream_data {
++#endif
+ char *string;
+ int charpos;
+ };
+@@ -148,7 +152,11 @@
+
+ #define GetSOSData struct string_output_stream_data *data = (struct string_output_stream_data*) out->client_data
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ static struct string_output_stream_data {
++#else
++struct string_output_stream_data {
++#endif
+ char *string;
+ int charpos;
+ };
diff --git a/x11/xview-lib/patches/patch-ap b/x11/xview-lib/patches/patch-ap
index fdb462d30f8..8ee575ae17a 100644
--- a/x11/xview-lib/patches/patch-ap
+++ b/x11/xview-lib/patches/patch-ap
@@ -1,25 +1,13 @@
-$NetBSD: patch-ap,v 1.1 2000/06/16 14:16:55 pooka Exp $
---- lib/libxview/base/xv_error.c.orig Tue Jun 29 07:14:42 1993
-+++ lib/libxview/base/xv_error.c Sat Jan 8 02:04:40 2000
-@@ -11,15 +11,20 @@
- */
+$NetBSD: patch-ap,v 1.2 2001/12/20 09:19:55 tron Exp $
+
+--- lib/libxview/rect/rect_util.c.orig Tue Jun 29 07:15:17 1993
++++ lib/libxview/rect/rect_util.c Thu Dec 20 10:09:17 2001
+@@ -16,6 +16,8 @@
- #include <stdio.h>
-+#include <sys/param.h>
- #include <xview/pkg_public.h>
- #include <X11/Xlib.h>
- #include <xview_private/i18n_impl.h>
- #include <xview_private/portable.h>
+ #include <xview/rect.h>
- /* Unix system error variables */
-+#if (defined(BSD) && (BSD >= 199306))
-+#include <errno.h>
-+#else
- extern int sys_nerr;
--extern char *sys_errlist[];
- extern int errno;
-+extern char *sys_errlist[];
-+#endif
-
- Xv_private_data char *xv_app_name;
- Xv_private int (*xv_error_proc) ();
++static int rect_nearest_edge();
++
+ /*
+ * Compute the distance from rect to (x, y). If (x, y) is in rect, zero is
+ * returned. If x_used or y_used are non-zero, the projection point is
diff --git a/x11/xview-lib/patches/patch-aq b/x11/xview-lib/patches/patch-aq
index ae24efa6c16..5c11505a474 100644
--- a/x11/xview-lib/patches/patch-aq
+++ b/x11/xview-lib/patches/patch-aq
@@ -1,76 +1,25 @@
-$NetBSD: patch-aq,v 1.1 2000/06/16 14:16:55 pooka Exp $
---- lib/libxview/textsw/txt_incl.c.orig Sat Jan 8 03:59:12 2000
-+++ lib/libxview/textsw/txt_incl.c Sat Jan 8 04:00:25 2000
-@@ -35,6 +35,12 @@
- #include <string.h>
- #endif /* SVR4 */
+$NetBSD: patch-aq,v 1.2 2001/12/20 09:19:55 tron Exp $
+
+--- lib/libxview/sel/sel_agent.c.orig Sun Jun 26 20:46:20 1994
++++ lib/libxview/sel/sel_agent.c Thu Dec 20 10:09:17 2001
+@@ -63,7 +63,7 @@
+ static void selection_agent_do_function();
+ static Atom get_atom();
+ static Seln_attribute save_atom();
+-
++static int waitforReadableTimeout();
-+#include <sys/param.h>
-+
-+#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000))
-+#define GETCWD
+ Xv_private Seln_result seln_convert_request_to_property();
+ /* called by seln_svc.c
+@@ -309,7 +309,11 @@
+ struct stat stat_buf;
+ int count, size;
+ char *destp;
++#if (defined(BSD) && (BSD >= 199306))
++ extern off_t lseek();
++#else
+ extern long lseek();
+#endif
-+
- #define MAX_DISPLAY_LENGTH 50
- #define MAX_STR_LENGTH 1024
-@@ -108,18 +114,18 @@
-
- /* if "cd" is not disabled and the "cd" dir is not the current dir */
- #ifdef OW_I18N
--#ifdef SVR4
-+#ifdef GETCWD
- (void) getcwd(curr_dir_mb, MAX_STR_LENGTH);
- #else
- (void) getwd(curr_dir_mb);
--#endif /* SVR4 */
-+#endif /* GETCWD */
- (void) mbstowcs(curr_dir, curr_dir_mb, MAX_STR_LENGTH);
- #else /* OW_I18N */
--#ifdef SVR4
-+#ifdef GETCWD
- (void) getcwd(curr_dir, MAX_STR_LENGTH);
- #else
- (void) getwd(curr_dir);
--#endif /* SVR4 */
-+#endif /* GETCWD */
- #endif /* OW_I18N */
-
- textsw_changed_directory = FALSE;
-@@ -272,11 +278,11 @@
- include_string[0] = NULL;
- (void) textsw_get_selection(view, &dummy, &dummy, include_string,
- MAX_STR_LENGTH);
--#ifdef SVR4
-+#ifdef GETCWD
- (void) getcwd(current_dir_include_string, MAX_STR_LENGTH);
- #else
- (void) getwd(current_dir_include_string);
--#endif /* SVR4 */
-+#endif /* GETCWD */
- include_panel_items[(int) DIR_STRING_ITEM] =
- panel_create_item(panel, PANEL_TEXT,
- PANEL_LABEL_X, ATTR_COL(0),
-@@ -384,18 +390,18 @@
-
- /* if "cd" is not disabled and the "cd" dir is not the current dir */
- #ifdef OW_I18N
--#ifdef SVR4
-+#ifdef GETCWD
- (void) getcwd(curr_dir_mb, MAX_STR_LENGTH);
- #else
- (void) getwd(curr_dir_mb);
--#endif /* SVR4 */
-+#endif /* GETCWD */
- (void) mbstowcs(curr_dir, curr_dir_mb, MAX_STR_LENGTH);
- #else /* OW_I18N */
--#ifdef SVR4
-+#ifdef GETCWD
- (void) getcwd(curr_dir, MAX_STR_LENGTH);
- #else
- (void) getwd(curr_dir);
--#endif /* SVR4 */
-+#endif /* GETCWD */
- #endif /* OW_I18N */
-
- textsw_changed_directory = FALSE;
+ if (fstat(fd, &stat_buf) != 0) {
+ perror(XV_MSG("Agent couldn't reply about a file"));
diff --git a/x11/xview-lib/patches/patch-ar b/x11/xview-lib/patches/patch-ar
index 70e8baa099f..b9e9a66847d 100644
--- a/x11/xview-lib/patches/patch-ar
+++ b/x11/xview-lib/patches/patch-ar
@@ -1,16 +1,23 @@
-$NetBSD: patch-ar,v 1.1 2000/06/16 14:16:55 pooka Exp $
---- lib/libxview/ttysw/termsw.c.orig Sat Jan 8 05:26:42 2000
-+++ lib/libxview/ttysw/termsw.c Sat Jan 8 05:29:21 2000
-@@ -252,8 +252,12 @@
+$NetBSD: patch-ar,v 1.2 2001/12/20 09:19:56 tron Exp $
+
+--- lib/libxview/sel/seln_impl.h.orig Tue Jun 29 07:15:25 1993
++++ lib/libxview/sel/seln_impl.h Thu Dec 20 10:09:17 2001
+@@ -9,12 +9,17 @@
+ * file for terms of the license.
+ */
- /* Generate a new temporary file name and open the file up. */
- (void) strcpy(tmpfile_name, "/tmp/tty.txt.XXXXXX");
-+#if (defined(BSD) && (BSD >= 199103))
-+ if ((fd = mkstemp(tmpfile_name)) < 0) {
-+#else
- (void) mktemp(tmpfile_name);
- if ((fd = open(tmpfile_name, O_CREAT | O_RDWR | O_EXCL, 0600)) < 0) {
++#ifdef NULL
++#undef NULL
+#endif
- return (XV_ERROR);
- }
- (void) close(fd);
+ #include <errno.h>
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/time.h>
+ #include <sys/types.h>
diff --git a/x11/xview-lib/patches/patch-as b/x11/xview-lib/patches/patch-as
index 6e19e4d8fff..142078f4943 100644
--- a/x11/xview-lib/patches/patch-as
+++ b/x11/xview-lib/patches/patch-as
@@ -1,13 +1,21 @@
-$NetBSD: patch-as,v 1.1 2000/09/13 20:24:38 jlam Exp $
+$NetBSD: patch-as,v 1.2 2001/12/20 09:19:56 tron Exp $
---- util/Imakefile.orig Tue Jun 29 01:14:22 1993
-+++ util/Imakefile
-@@ -16,7 +16,7 @@
+--- lib/libxview/server/server.c.orig Sun Jun 26 20:53:40 1994
++++ lib/libxview/server/server.c Thu Dec 20 10:09:17 2001
+@@ -65,6 +65,7 @@
+ static unsigned int string_to_modmask();
+ static Server_atom_type save_atom();
+ static void server_yield_modifiers();
++static int xv_set_scheduler();
- CONV_DIR = conversion
-
--MSG_UTIL = xgettext msgfmt
-+#MSG_UTIL = xgettext msgfmt
-
- SUBDIRS = $(CPP_DIR) $(SOELIM_DIR) $(CONV_DIR) $(MSG_UTIL)
+ Xv_private char *xv_strtok();
+@@ -440,7 +441,7 @@
+ /* lumpi@dobag.in-berlin.de */
+ if (XrmGetDatabase((Display *)server->xdisplay)) {
+ server->db = XrmGetStringDatabase(
+- (XrmGetDatabase((Display *)server->xdisplay)));
++ (char *) (XrmGetDatabase((Display *)server->xdisplay)));
+ #else
+ if (((Display *)server->xdisplay)->xdefaults) {
+ server->db = XrmGetStringDatabase(
diff --git a/x11/xview-lib/patches/patch-at b/x11/xview-lib/patches/patch-at
index 572752539a8..d661040521e 100644
--- a/x11/xview-lib/patches/patch-at
+++ b/x11/xview-lib/patches/patch-at
@@ -1,63 +1,72 @@
-$NetBSD: patch-at,v 1.1 2001/05/02 21:46:09 dmcmahill Exp $
+$NetBSD: patch-at,v 1.2 2001/12/20 09:19:56 tron Exp $
---- ./lib/libxview/color/cms_pblc.c.nbsd Sat Apr 28 14:01:37 2001
-+++ ./lib/libxview/color/cms_pblc.c Sat Apr 28 14:35:42 2001
-@@ -316,14 +316,13 @@
+--- lib/libxview/win/win_input.c.orig Mon Jun 27 00:27:53 1994
++++ lib/libxview/win/win_input.c Thu Dec 20 10:09:19 2001
+@@ -56,6 +56,7 @@
+ static int GetButtonEvent();
+ static int win_translate_KP_keysym();
+ static int translate_key();
++static int xevent_to_event();
+
+ extern struct rectlist *win_get_damage();
+ extern void server_set_timestamp();
+@@ -853,7 +854,9 @@
+ #ifdef X11R6
+ /* lumpi@dobag.in-berlin.de */
+ int ksym_pcc;
+- XGetKeyboardMapping(display,NoSymbol,0,&ksym_pcc);
++ int tc_min_keycode, tc_max_keycode;
++ XDisplayKeycodes(display, &tc_min_keycode, &tc_max_keycode);
++ XGetKeyboardMapping(display,tc_min_keycode,tc_max_keycode-tc_min_keycode-1,&ksym_pcc);
+ for (index = 0; index < ksym_pcc; index++) {
+ #else
+ for (index = 0; index < display->keysyms_per_keycode; index++) {
+@@ -861,7 +864,7 @@
+ if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
+ if (IsKeypadKey(ksym)) {
+ /* See if key has been rebound. */
+- if (!translate_key(display, ksym, ek->state,
++ if (translate_key(display, ksym, ek->state,
+ buffer, BUFFERSIZE)) {
+ (void)win_translate_KP_keysym(ksym, buffer);
+ }
+@@ -2720,8 +2723,10 @@
+ * Xlib's.
+ */
+
+-#ifdef X11R6
+-/* lumpi@dobag.in-berlin.de */
++#ifdef X11R6
++/* lumpi@dobag.in-berlin.de
++ tom@sees.bangor.ac.uk this replacement for X11R6 doesn't work. At least
++ it should now return sensible values though. */
+ static int
+ translate_key(dpy, symbol, modifiers, buffer, nbytes)
+ Display *dpy;
+@@ -2731,11 +2736,18 @@
+ int nbytes;
{
- Cms_info *cms = CMS_PRIVATE(cms_public);
- Xv_opaque value;
-- Attr_avlist avlist = (Attr_avlist) args;
- int cms_status = 0;
+ /* This is _very_ rude ! */
+- strcpy(buffer,XKeysymToString(symbol));
++ char *string;
++ string = XKeysymToString(symbol);
++ if (string) {
++ strncpy(buffer,XKeysymToString(symbol),nbytes);
++ return(strlen(buffer));
++ }
++ else
++ return 0;
+ }
+
+-#else
- switch (attr) {
- case CMS_PIXEL: {
- unsigned long index;
-
-- index = (unsigned long)avlist[0];
-+ index = (unsigned long)va_arg(args, Attr_attribute);
- if (index >= cms->size) {
- index = cms->size - 1;
- } else if (index < 0) {
-@@ -397,30 +396,28 @@
- value = (Xv_opaque)cms->cmap->id;
- break;
-
-- case CMS_COLORS:
-- if (cms_get_colors(cms, (unsigned long)0, cms->size,
-- (Xv_singlecolor *)avlist[0], (XColor *)NULL,
-- (unsigned char *)NULL, (unsigned char *)NULL,
-- (unsigned char *)NULL) == XV_OK) {
-- value = (Xv_opaque)avlist[0];
-- } else {
-+ case CMS_COLORS:
-+ value = (Xv_opaque)va_arg(args,Attr_attribute);
-+ if (!cms_get_colors(cms, (unsigned long)0, cms->size,
-+ value, (XColor *)NULL,
-+ (unsigned char *)NULL, (unsigned char *)NULL,
-+ (unsigned char *)NULL) == XV_OK) {
- value = NULL;
- }
- break;
-
- case CMS_X_COLORS:
-- if (cms_get_colors(cms, (unsigned long)0, cms->size,
-- (Xv_singlecolor *)NULL, (XColor *)avlist[0],
-- (unsigned char *)NULL, (unsigned char *)NULL,
-- (unsigned char *)NULL) == XV_OK) {
-- value = (Xv_opaque)avlist[0];
-- } else {
-+ value = (Xv_opaque)va_arg(args, Attr_attribute);
-+ if (!cms_get_colors(cms, (unsigned long)0, cms->size,
-+ (Xv_singlecolor *)NULL, value,
-+ (unsigned char *)NULL, (unsigned char *)NULL,
-+ (unsigned char *)NULL) == XV_OK) {
- value = NULL;
- }
- break;
-
- case CMS_CMS_DATA: {
-- Xv_cmsdata *cms_data = (Xv_cmsdata *)avlist[0];
-+ Xv_cmsdata *cms_data = (Xv_cmsdata *)va_arg(args,Attr_attribute);
-
- cms_data->type = cms->type;
- cms_data->size = cms->size;
++#else
+ static int
+ translate_key(dpy, symbol, modifiers, buffer, nbytes)
+ Display *dpy;
+@@ -2761,4 +2773,4 @@
+ }
+ return 0;
+ }
+-#endif
++#endif
diff --git a/x11/xview-lib/patches/patch-au b/x11/xview-lib/patches/patch-au
index 9818fcafb31..6091cd623a1 100644
--- a/x11/xview-lib/patches/patch-au
+++ b/x11/xview-lib/patches/patch-au
@@ -1,34 +1,12 @@
-$NetBSD: patch-au,v 1.1 2001/05/02 21:46:09 dmcmahill Exp $
+$NetBSD: patch-au,v 1.2 2001/12/20 09:19:56 tron Exp $
---- ./lib/libxview/font/font_get.c.nbsd Sat Apr 28 21:26:26 2001
-+++ ./lib/libxview/font/font_get.c Sat Apr 28 21:30:27 2001
-@@ -43,7 +43,6 @@
- XFontStruct *x_font_info = (XFontStruct *)font->x_font_info;
- Xv_opaque v;
- int attr_is_char_width = 0;
-- Attr_avlist avlist = (Attr_avlist) args;
-
- #ifdef OW_I18N
- if (font->type == FONT_TYPE_TEXT) {
-@@ -138,8 +137,8 @@
- }
-
- case FONT_STRING_DIMS:{
-- char *string = (char *) avlist[0];
-- Font_string_dims *size = (Font_string_dims *) avlist[1];
-+ char *string = (char *)va_arg(args, Attr_attribute);
-+ Font_string_dims *size = (Font_string_dims *)va_arg(args, Attr_attribute);
- struct pr_size my_pf_size;
- if (string) {
- my_pf_size = xv_pf_textwidth(strlen(string), font_public, string);
-@@ -264,8 +263,8 @@
-
- #ifdef OW_I18N
- case FONT_STRING_DIMS_WC:{
-- wchar_t *ws = (wchar_t *) avlist[0];
-- Font_string_dims *size = (Font_string_dims *) avlist[1];
-+ wchar_t *ws = (wchar_t *) va_arg(args, Attr_attribute);
-+ Font_string_dims *size = (Font_string_dims *) va_arg(args, Attr_attribute);
- struct pr_size my_pf_size;
-
- if (ws) {
+--- lib/libxview/win/win_env.c.orig Tue Jun 29 07:15:40 1993
++++ lib/libxview/win/win_env.c Thu Dec 20 10:10:47 2001
+@@ -15,6 +15,7 @@
+ * other functions)
+ */
+
++#include <string.h>
+ #include <xview/rect.h>
+ #include <xview/win_env.h>
+ #include <xview/win_struct.h>
diff --git a/x11/xview-lib/patches/patch-av b/x11/xview-lib/patches/patch-av
index 8013a4ac91f..495780cbd5c 100644
--- a/x11/xview-lib/patches/patch-av
+++ b/x11/xview-lib/patches/patch-av
@@ -1,12 +1,63 @@
-$NetBSD: patch-av,v 1.1 2001/05/02 21:46:09 dmcmahill Exp $
+$NetBSD: patch-av,v 1.2 2001/12/20 09:19:56 tron Exp $
---- ./lib/libxview/notice/notice_get.c.nbsd Sat Apr 28 21:34:01 2001
-+++ ./lib/libxview/notice/notice_get.c Sat Apr 28 21:34:44 2001
-@@ -29,7 +29,6 @@
- va_list valist;
+--- lib/libxview/color/cms_pblc.c.orig Tue Jun 29 07:15:53 1993
++++ lib/libxview/color/cms_pblc.c Thu Dec 20 10:10:18 2001
+@@ -316,14 +316,13 @@
{
- Notice_info *notice = NOTICE_PRIVATE(notice_public);
-- Attr_avlist avlist = (Attr_avlist) valist;
- Xv_opaque v = (Xv_opaque)NULL;
+ Cms_info *cms = CMS_PRIVATE(cms_public);
+ Xv_opaque value;
+- Attr_avlist avlist = (Attr_avlist) args;
+ int cms_status = 0;
- switch (attr) {
+ switch (attr) {
+ case CMS_PIXEL: {
+ unsigned long index;
+
+- index = (unsigned long)avlist[0];
++ index = (unsigned long)va_arg(args, Attr_attribute);
+ if (index >= cms->size) {
+ index = cms->size - 1;
+ } else if (index < 0) {
+@@ -397,30 +396,28 @@
+ value = (Xv_opaque)cms->cmap->id;
+ break;
+
+- case CMS_COLORS:
+- if (cms_get_colors(cms, (unsigned long)0, cms->size,
+- (Xv_singlecolor *)avlist[0], (XColor *)NULL,
+- (unsigned char *)NULL, (unsigned char *)NULL,
+- (unsigned char *)NULL) == XV_OK) {
+- value = (Xv_opaque)avlist[0];
+- } else {
++ case CMS_COLORS:
++ value = (Xv_opaque)va_arg(args,Attr_attribute);
++ if (!cms_get_colors(cms, (unsigned long)0, cms->size,
++ value, (XColor *)NULL,
++ (unsigned char *)NULL, (unsigned char *)NULL,
++ (unsigned char *)NULL) == XV_OK) {
+ value = NULL;
+ }
+ break;
+
+ case CMS_X_COLORS:
+- if (cms_get_colors(cms, (unsigned long)0, cms->size,
+- (Xv_singlecolor *)NULL, (XColor *)avlist[0],
+- (unsigned char *)NULL, (unsigned char *)NULL,
+- (unsigned char *)NULL) == XV_OK) {
+- value = (Xv_opaque)avlist[0];
+- } else {
++ value = (Xv_opaque)va_arg(args, Attr_attribute);
++ if (!cms_get_colors(cms, (unsigned long)0, cms->size,
++ (Xv_singlecolor *)NULL, value,
++ (unsigned char *)NULL, (unsigned char *)NULL,
++ (unsigned char *)NULL) == XV_OK) {
+ value = NULL;
+ }
+ break;
+
+ case CMS_CMS_DATA: {
+- Xv_cmsdata *cms_data = (Xv_cmsdata *)avlist[0];
++ Xv_cmsdata *cms_data = (Xv_cmsdata *)va_arg(args,Attr_attribute);
+
+ cms_data->type = cms->type;
+ cms_data->size = cms->size;
diff --git a/x11/xview-lib/patches/patch-aw b/x11/xview-lib/patches/patch-aw
index 0929cc11261..8206378cf15 100644
--- a/x11/xview-lib/patches/patch-aw
+++ b/x11/xview-lib/patches/patch-aw
@@ -1,67 +1,15 @@
-$NetBSD: patch-aw,v 1.1 2001/05/02 21:46:09 dmcmahill Exp $
+$NetBSD: patch-aw,v 1.2 2001/12/20 09:19:56 tron Exp $
---- lib/libxview/panel/p_list.c.orig Tue May 1 21:23:17 2001
-+++ lib/libxview/panel/p_list.c Tue May 1 21:23:24 2001
-@@ -1240,5 +1240,5 @@
-
- case PANEL_ITEM_NTH_WINDOW:
-- if (*(int *) valist == 0)
-+ if (va_arg(valist, int *) == 0)
- return (Xv_opaque) dp->list_sb;
- else
-@@ -1267,5 +1267,5 @@
-
- case PANEL_LIST_SELECTED:
-- row = *(int *) valist;
-+ row = *va_arg(valist, int *);
- node = find_or_create_nth_row(dp, row, FALSE);
- return (node ? (Xv_opaque) node->f.selected : (Xv_opaque) XV_ERROR);
-@@ -1279,5 +1279,5 @@
-
- case PANEL_LIST_NEXT_SELECTED:
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- if (!node)
-@@ -1290,5 +1290,5 @@
-
- case PANEL_LIST_CLIENT_DATA:
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- return (node ? (Xv_opaque) node->client_data : (Xv_opaque) XV_ERROR);
-@@ -1298,5 +1298,5 @@
- case PANEL_LIST_STRING_WCS:
- #endif
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- #ifdef OW_I18N
-@@ -1313,5 +1313,5 @@
-
- case PANEL_LIST_GLYPH:
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- return (node ? (Xv_opaque) node->glyph : (Xv_opaque) XV_ERROR);
-@@ -1329,5 +1329,5 @@
-
- case PANEL_LIST_FONT:
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- return (node ? (Xv_opaque) node->font : (Xv_opaque) XV_ERROR);
-@@ -1353,5 +1353,5 @@
-
- case PANEL_LIST_INACTIVE:
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- return (node ? (Xv_opaque) node->f.row_inactive : (Xv_opaque) XV_ERROR);
-@@ -1408,5 +1408,5 @@
-
- case PANEL_LIST_EXTENSION_DATA:
-- row = *(int *) valist;
-+ row = va_arg(valist, int);
- node = find_or_create_nth_row(dp, row, FALSE);
- return (node ? (Xv_opaque) node->exten_data : (Xv_opaque) XV_ERROR);
+--- lib/libxview/dnd/dnd.c.orig Tue Jun 29 07:15:57 1993
++++ lib/libxview/dnd/dnd.c Thu Dec 20 10:09:16 2001
+@@ -38,6 +38,10 @@
+ extern int DndContactDSDM();
+ extern int DndFindSite();
+ extern XID DndGetCursor();
++static int SendTrigger();
++static int SendOldDndEvent();
++static int WaitForAck();
++static int IsV2App();
+
+ Xv_public int
+ dnd_send_drop(dnd_public)
diff --git a/x11/xview-lib/patches/patch-ax b/x11/xview-lib/patches/patch-ax
index b839c008767..c4c64a5f905 100644
--- a/x11/xview-lib/patches/patch-ax
+++ b/x11/xview-lib/patches/patch-ax
@@ -1,13 +1,24 @@
-$NetBSD: patch-ax,v 1.1 2001/05/02 21:46:09 dmcmahill Exp $
+$NetBSD: patch-ax,v 1.2 2001/12/20 09:19:56 tron Exp $
---- ./lib/libxview/panel/p_mlinetxt.c.nbsd Sat Apr 28 21:49:11 2001
-+++ ./lib/libxview/panel/p_mlinetxt.c Sat Apr 28 21:49:49 2001
-@@ -449,7 +449,7 @@
- return (Xv_opaque) dp->rows_displayed;
+--- lib/libxview/dnd/site.c.orig Tue Jun 29 07:15:58 1993
++++ lib/libxview/dnd/site.c Thu Dec 20 10:09:16 2001
+@@ -19,6 +19,7 @@
+ #ifdef SVR4
+ #include <stdlib.h>
+ #endif SVR4
++#include <sys/param.h>
- case PANEL_ITEM_NTH_WINDOW:
-- switch (*(int *) valist) {
-+ switch (va_arg(valist, int)) {
- case 0:
- return dp->view;
- case 1:
+ static void TransCoords();
+ Xv_private Xv_Window win_get_top_level();
+@@ -246,7 +247,11 @@
+ /* (rectNode->rect) is of the wrong type. */
+ memmove(rect, &(rectNode->rect), sizeof(Rect));
+ #else
++#if (defined(BSD) && (BSD >= 199103))
++ bcopy(&(rectNode->rect), rect, sizeof(Rect));
++#else
+ bcopy(rectNode->rect, rect, sizeof(Rect));
++#endif
+ #endif SVR4
+
+ return((Xv_opaque)rect);
diff --git a/x11/xview-lib/patches/patch-ay b/x11/xview-lib/patches/patch-ay
index d2ac581c9df..cda3d697a0e 100644
--- a/x11/xview-lib/patches/patch-ay
+++ b/x11/xview-lib/patches/patch-ay
@@ -1,63 +1,12 @@
-$NetBSD: patch-ay,v 1.1 2001/05/11 20:41:32 dmcmahill Exp $
+$NetBSD: patch-ay,v 1.2 2001/12/20 09:19:56 tron Exp $
-don't return the address of a local variable
-
---- lib/libxview/canvas/cnvs_input.c.orig Tue Jun 29 01:14:46 1993
-+++ lib/libxview/canvas/cnvs_input.c Fri May 11 15:17:51 2001
-@@ -416,7 +416,11 @@
- {
- Xv_Window paint_window;
-- Event tmp_event;
-+ Event *tmp_event;
- int x, y;
-
-+ if ( (tmp_event = (Event *) malloc(sizeof(Event))) == NULL){
-+ fprintf(stderr,"canvas_window_event: malloc failed\n");
-+ exit(1);
-+ }
- paint_window = xv_get(canvas_public, CANVAS_NTH_PAINT_WINDOW, 0);
- if (paint_window == NULL) {
-@@ -424,10 +428,11 @@
- return (event);
- }
-- tmp_event = *event;
-+
-+ memcpy(tmp_event,event,sizeof(Event));
- win_translate_xy(paint_window, canvas_public,
- event_x(event), event_y(event), &x, &y);
-- event_set_x(&tmp_event, x);
-- event_set_y(&tmp_event, y);
-- return (&tmp_event);
-+ event_set_x(tmp_event, x);
-+ event_set_y(tmp_event, y);
-+ return (tmp_event);
- }
-
-@@ -441,7 +446,11 @@
- {
- Xv_Window paint_window;
-- Event tmp_event;
-+ Event *tmp_event;
- int x, y;
-
-+ if ( (tmp_event = (Event *) malloc(sizeof(Event))) == NULL){
-+ fprintf(stderr,"canvas_window_event: malloc failed\n");
-+ exit(1);
-+ }
- paint_window = xv_get(canvas_public, CANVAS_NTH_PAINT_WINDOW, 0);
- if (paint_window == NULL) {
-@@ -449,10 +458,10 @@
- return (event);
- }
-- tmp_event = *event;
-+ memcpy(tmp_event,event,sizeof(Event));
- win_translate_xy(paint_window, canvas_public,
- event_x(event), event_y(event), &x, &y);
-- event_set_x(&tmp_event, x);
-- event_set_y(&tmp_event, y);
-- return (&tmp_event);
-+ event_set_x(tmp_event, x);
-+ event_set_y(tmp_event, y);
-+ return (tmp_event);
- }
-
+--- lib/libxview/selection/sel_own.c.orig Sun Jun 26 03:05:22 1994
++++ lib/libxview/selection/sel_own.c Thu Dec 20 10:09:17 2001
+@@ -35,6 +35,7 @@
+ static int sel_set_ownership(/* sel_owner */);
+ static int (*OldErrorHandler)();
+ static int SelOwnerErrorHandler();
++static int SendIncr();
+ static int ValidatePropertyEvent();
+
+ static void SelClean();
diff --git a/x11/xview-lib/patches/patch-az b/x11/xview-lib/patches/patch-az
index a3b8ccd06fb..74c61243d29 100644
--- a/x11/xview-lib/patches/patch-az
+++ b/x11/xview-lib/patches/patch-az
@@ -1,10 +1,25 @@
-$NetBSD: patch-az,v 1.1 2001/05/11 20:41:32 dmcmahill Exp $
+$NetBSD: patch-az,v 1.2 2001/12/20 09:19:56 tron Exp $
---- lib/libxview/win/win_env.c.orig Tue Jun 29 01:15:40 1993
-+++ lib/libxview/win/win_env.c Fri May 11 15:16:15 2001
-@@ -16,4 +16,5 @@
- */
+--- lib/libxview/selection/sel_req.c.orig Sun Jun 26 03:05:21 1994
++++ lib/libxview/selection/sel_req.c Thu Dec 20 10:09:17 2001
+@@ -55,7 +55,10 @@
+ static int GetSelection();
+ static int ProcessReply();
+ static Requestor *SelGetReq();
+-
++static int XvGetRequestedValue();
++static int ProcessNonBlkIncr();
++static int ProcessReq();
++static int OldPkgIsOwner();
-+#include <string.h>
- #include <xview/rect.h>
- #include <xview/win_env.h>
+ /*ARGSUSED*/
+ Pkg_private int
+@@ -1226,7 +1229,7 @@
+ }
+
+
+-static XID
++Pkg_private XID
+ SelGetOwnerXID( selReq )
+ Sel_req_info *selReq;
+ {
diff --git a/x11/xview-lib/patches/patch-ba b/x11/xview-lib/patches/patch-ba
new file mode 100644
index 00000000000..8f976a7e3e1
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ba
@@ -0,0 +1,21 @@
+$NetBSD: patch-ba,v 1.1 2001/12/20 09:19:56 tron Exp $
+
+--- lib/libxview/selection/sel_util.c.orig Tue Jun 29 07:16:03 1993
++++ lib/libxview/selection/sel_util.c Thu Dec 20 10:09:17 2001
+@@ -23,6 +23,7 @@
+ static void FreeMultiProp();
+ static int SelMatchReply();
+ static Sel_req_tbl *SelMatchReqTbl();
++static int SelFindReply();
+
+ Pkg_private struct timeval *
+ xv_sel_cvt_xtime_to_timeval( XTime )
+@@ -601,7 +602,7 @@
+ reqTbl->reply = reply;
+ reqTbl->next = NULL;
+ (void)XSaveContext( dpy, DefaultRootWindow(dpy),replyCtx,
+- (caddr_t *)reqTbl);
++ (XPointer)reqTbl);
+ return reqTbl;
+ }
+ return (Sel_req_tbl *) xv_sel_add_new_req( reqTbl, reply );
diff --git a/x11/xview-lib/patches/patch-bb b/x11/xview-lib/patches/patch-bb
new file mode 100644
index 00000000000..7cf2ea25a47
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bb
@@ -0,0 +1,12 @@
+$NetBSD: patch-bb,v 1.1 2001/12/20 09:19:56 tron Exp $
+
+--- lib/libxview/frame/fm_get.c.orig Tue Jun 29 07:16:10 1993
++++ lib/libxview/frame/fm_get.c Thu Dec 20 10:09:16 2001
+@@ -10,6 +10,7 @@
+ * file for terms of the license.
+ */
+
++#include <ctype.h>
+ #include <xview_private/fm_impl.h>
+ #include <xview_private/draw_impl.h>
+ #include <xview/server.h>
diff --git a/x11/xview-lib/patches/patch-bc b/x11/xview-lib/patches/patch-bc
new file mode 100644
index 00000000000..39eebc7dfd1
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bc
@@ -0,0 +1,22 @@
+$NetBSD: patch-bc,v 1.1 2001/12/20 09:19:57 tron Exp $
+
+--- lib/libxview/frame/fm_impl.h.orig Tue Jun 29 07:16:15 1993
++++ lib/libxview/frame/fm_impl.h Thu Dec 20 10:09:16 2001
+@@ -17,11 +17,16 @@
+ #define _frame_impl_h_already_included
+
+ /* standard includes */
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/time.h>
+ #ifdef OW_I18N
diff --git a/x11/xview-lib/patches/patch-bd b/x11/xview-lib/patches/patch-bd
new file mode 100644
index 00000000000..4d66c612bd3
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bd
@@ -0,0 +1,22 @@
+$NetBSD: patch-bd,v 1.1 2001/12/20 09:19:57 tron Exp $
+
+--- lib/libxview/frame/fm_props.h.orig Tue Jun 29 07:16:14 1993
++++ lib/libxview/frame/fm_props.h Thu Dec 20 10:09:16 2001
+@@ -13,11 +13,16 @@
+ #define _frame_props_h_already_included
+
+ /* standard includes */
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/time.h>
+ #include <xview/notify.h>
diff --git a/x11/xview-lib/patches/patch-be b/x11/xview-lib/patches/patch-be
new file mode 100644
index 00000000000..4c8184b6f1c
--- /dev/null
+++ b/x11/xview-lib/patches/patch-be
@@ -0,0 +1,13 @@
+$NetBSD: patch-be,v 1.1 2001/12/20 09:19:57 tron Exp $
+
+--- lib/libxview/frame/fmcmd_set.c.orig Tue Jun 29 07:16:07 1993
++++ lib/libxview/frame/fmcmd_set.c Thu Dec 20 10:09:16 2001
+@@ -18,6 +18,8 @@
+ #include <xview/panel.h>
+ #include <xview/server.h>
+
++static int update_default_pin_state();
++
+ Pkg_private Xv_opaque
+ frame_cmd_set_avlist(frame_public, avlist)
+ Frame frame_public;
diff --git a/x11/xview-lib/patches/patch-bf b/x11/xview-lib/patches/patch-bf
new file mode 100644
index 00000000000..8541441fb03
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bf
@@ -0,0 +1,22 @@
+$NetBSD: patch-bf,v 1.1 2001/12/20 09:19:57 tron Exp $
+
+--- lib/libxview/frame/frame_base.h.orig Tue Jun 29 07:16:14 1993
++++ lib/libxview/frame/frame_base.h Thu Dec 20 10:09:16 2001
+@@ -17,11 +17,16 @@
+ #define _frame_base_h_already_included
+
+ /* standard includes */
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/time.h>
+ #include <xview/notify.h>
diff --git a/x11/xview-lib/patches/patch-bg b/x11/xview-lib/patches/patch-bg
new file mode 100644
index 00000000000..0b5e86ff610
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bg
@@ -0,0 +1,22 @@
+$NetBSD: patch-bg,v 1.1 2001/12/20 09:19:57 tron Exp $
+
+--- lib/libxview/frame/frame_cmd.h.orig Tue Jun 29 07:16:14 1993
++++ lib/libxview/frame/frame_cmd.h Thu Dec 20 10:09:16 2001
+@@ -17,11 +17,16 @@
+ #define _frame_cmd_h_already_included
+
+ /* standard includes */
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/time.h>
+ #include <xview/notify.h>
diff --git a/x11/xview-lib/patches/patch-bh b/x11/xview-lib/patches/patch-bh
new file mode 100644
index 00000000000..f8f2177c087
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bh
@@ -0,0 +1,22 @@
+$NetBSD: patch-bh,v 1.1 2001/12/20 09:19:57 tron Exp $
+
+--- lib/libxview/frame/frame_help.h.orig Tue Jun 29 07:16:10 1993
++++ lib/libxview/frame/frame_help.h Thu Dec 20 10:09:16 2001
+@@ -17,11 +17,16 @@
+ #define _frame_help_h_already_included
+
+ /* standard includes */
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/time.h>
+ #include <xview/notify.h>
diff --git a/x11/xview-lib/patches/patch-bi b/x11/xview-lib/patches/patch-bi
new file mode 100644
index 00000000000..508f7f92de0
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bi
@@ -0,0 +1,13 @@
+$NetBSD: patch-bi,v 1.1 2001/12/20 09:19:58 tron Exp $
+
+--- lib/libxview/menu/Imakefile.orig Tue Jun 29 07:16:27 1993
++++ lib/libxview/menu/Imakefile Thu Dec 20 10:09:16 2001
+@@ -28,7 +28,7 @@
+ TEXT_OBJS =\
+ omi.o\
+ om_public.o\
+- om_render.o\
++ om_render.o\
+ om_set.o\
+ om_get.o\
+ om_compat.o
diff --git a/x11/xview-lib/patches/patch-bj b/x11/xview-lib/patches/patch-bj
new file mode 100644
index 00000000000..ed447e2d6b7
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bj
@@ -0,0 +1,16 @@
+$NetBSD: patch-bj,v 1.1 2001/12/20 09:19:58 tron Exp $
+
+--- lib/libxview/menu/om_render.c.orig Tue Jun 29 07:16:26 1993
++++ lib/libxview/menu/om_render.c Thu Dec 20 10:09:16 2001
+@@ -470,9 +470,9 @@
+ * Define the menu and shadow window dimensions. Note: shadow rect width &
+ * height = menu rect width & height
+ */
+- xv_set(m->window, XV_RECT, m->fs_menurect, 0);
++ xv_set(m->window, XV_RECT, &m->fs_menurect, 0);
+ if (!m->group_info->three_d)
+- xv_set(m->shadow_window, XV_RECT, shadowrect, 0);
++ xv_set(m->shadow_window, XV_RECT, &shadowrect, 0);
+
+ XFlush(XV_DISPLAY_FROM_WINDOW(m->window));
+
diff --git a/x11/xview-lib/patches/patch-bk b/x11/xview-lib/patches/patch-bk
new file mode 100644
index 00000000000..423b44b13af
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bk
@@ -0,0 +1,12 @@
+$NetBSD: patch-bk,v 1.1 2001/12/20 09:19:58 tron Exp $
+
+--- lib/libxview/menu/om_set.c.orig Tue Jun 29 07:16:24 1993
++++ lib/libxview/menu/om_set.c Thu Dec 20 10:09:16 2001
+@@ -12,6 +12,7 @@
+
+ /* --------------------------------------------------------------------- */
+ #include <sys/types.h>
++#include <ctype.h>
+ #include <xview_private/om_impl.h>
+ #include <xview_private/draw_impl.h>
+ #include <xview_private/fm_impl.h>
diff --git a/x11/xview-lib/patches/patch-bl b/x11/xview-lib/patches/patch-bl
new file mode 100644
index 00000000000..bb3c23ae4dc
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bl
@@ -0,0 +1,60 @@
+$NetBSD: patch-bl,v 1.1 2001/12/20 09:19:58 tron Exp $
+
+--- lib/libxview/misc/Imakefile.orig Tue Jun 29 07:16:36 1993
++++ lib/libxview/misc/Imakefile Thu Dec 20 10:09:16 2001
+@@ -29,8 +29,8 @@
+ xv_i18n.c \
+ xv_path.c
+
+-OFILES.misc.3 = ${CFILES.misc.3:%.c=%.o}
+-OFILES.misc.4 = ${CFILES.misc.4:%.c=%.o}
++OFILES.misc.3 = ${CFILES.misc.3:.c=.o}
++OFILES.misc.4 = ${CFILES.misc.4:.c=.o}
+
+ HFILES.misc.3 =
+ HFILES.misc.4 =
+@@ -43,7 +43,7 @@
+ GETTEXT.C =
+ #endif
+
+-GETTEXT.O = ${GETTEXT.C:%.c=%.o}
++GETTEXT.O = ${GETTEXT.C:.c=.o}
+
+ HDRSPUBLIC= cms_grays.h cms_mono.h cmsrainbow.h cms_rgb.h sun.h \
+ window_hs.h expandname.h xv_c_types.h attrol.h db.h \
+@@ -57,7 +57,7 @@
+ demorandom.o\
+ getlogindr.o\
+ expandname.o\
+- expandpath.o\
++ expandpath.o\
+ bitmask.o\
+ hashfn.o\
+ db_conv.o\
+@@ -76,7 +76,7 @@
+ demorandom.c\
+ getlogindr.c\
+ expandname.c\
+- expandpath.c\
++ expandpath.c\
+ bitmask.c\
+ hashfn.c\
+ db_conv.c\
+@@ -95,7 +95,7 @@
+ demorandom.o\
+ getlogindr.o\
+ expandname.o\
+- expandpath.o\
++ expandpath.o\
+ bitmask.o\
+ hashfn.o\
+ db_conv.o\
+@@ -115,7 +115,7 @@
+ demorandom.c\
+ getlogindr.c\
+ expandname.c\
+- expandpath.c\
++ expandpath.c\
+ bitmask.c\
+ hashfn.c\
+ db_conv.c\
diff --git a/x11/xview-lib/patches/patch-bm b/x11/xview-lib/patches/patch-bm
new file mode 100644
index 00000000000..abcb531dcaa
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bm
@@ -0,0 +1,12 @@
+$NetBSD: patch-bm,v 1.1 2001/12/20 09:19:58 tron Exp $
+
+--- lib/libxview/misc/getlogindr.c.orig Tue Jun 29 07:16:30 1993
++++ lib/libxview/misc/getlogindr.c Thu Dec 20 10:09:16 2001
+@@ -17,6 +17,7 @@
+
+ #include <stdio.h>
+ #include <pwd.h>
++#include <sys/param.h>
+ #include <xview_private/i18n_impl.h>
+ #include <xview/xv_error.h>
+
diff --git a/x11/xview-lib/patches/patch-bn b/x11/xview-lib/patches/patch-bn
new file mode 100644
index 00000000000..f4d684255db
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bn
@@ -0,0 +1,15 @@
+$NetBSD: patch-bn,v 1.1 2001/12/20 09:19:59 tron Exp $
+
+--- lib/libxview/misc/i18n_impl.h.orig Tue Jun 29 07:16:31 1993
++++ lib/libxview/misc/i18n_impl.h Thu Dec 20 10:09:16 2001
+@@ -25,6 +25,10 @@
+
+ #include <locale.h>
+
++#ifndef LC_MESSAGES
++#define LC_MESSAGES 0
++#endif
++
+ extern char *dgettext();
+
+ #define XV_I18N_MSG(d,s) (dgettext(d,s))
diff --git a/x11/xview-lib/patches/patch-bo b/x11/xview-lib/patches/patch-bo
new file mode 100644
index 00000000000..dfb7e536ae9
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bo
@@ -0,0 +1,24 @@
+$NetBSD: patch-bo,v 1.1 2001/12/20 09:19:59 tron Exp $
+
+--- lib/libxview/misc/portable.h.orig Tue Jun 29 07:16:34 1993
++++ lib/libxview/misc/portable.h Thu Dec 20 10:09:16 2001
+@@ -10,6 +10,7 @@
+ #ifndef xview_portable_h_DEFINED
+ #define xview_portable_h_DEFINED
+
++#include <sys/param.h>
+ #include <xview/attr.h>
+
+ #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
+@@ -70,7 +71,11 @@
+ #define XV_USE_TERMIOS
+ #define XV_USE_SVR4_PTYS
+ #else /* SVR4 */
++#if (defined(BSD) && (BSD >= 199103))
++#define XV_USE_TERMIOS
++#else
+ #undef XV_USE_TERMIOS
++#endif
+ #undef XV_USE_SVR4_PTYS
+ #endif /* SVR4 */
+
diff --git a/x11/xview-lib/patches/patch-bp b/x11/xview-lib/patches/patch-bp
new file mode 100644
index 00000000000..6c43b5caa60
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bp
@@ -0,0 +1,32 @@
+$NetBSD: patch-bp,v 1.1 2001/12/20 09:19:59 tron Exp $
+
+--- lib/libxview/misc/expandname.c.orig Tue Jun 29 07:16:30 1993
++++ lib/libxview/misc/expandname.c Thu Dec 20 10:09:49 2001
+@@ -23,6 +23,9 @@
+ #include <string.h>
+ #include <sgtty.h>
+
++#if defined(BSD) && (BSD >= 199306)
++#include <unistd.h>
++#else
+ #ifdef sparc
+ #ifdef SVR4
+ #include <unistd.h>
+@@ -30,6 +33,7 @@
+ #include <vfork.h>
+ #endif SVR4
+ #endif
++#endif
+
+ #ifdef SVR4
+ #include <sys/signal.h>
+@@ -120,7 +124,9 @@
+ }
+ (void) close(pivec[0]);
+ #ifndef SVR4
++#if !(defined(BSD) && (BSD >= 199103))
+ while (wait((union wait *) & status) != pid);
++#endif
+ #else SVR4
+ while (wait( & status) != pid);
+ #endif SVR4
diff --git a/x11/xview-lib/patches/patch-bq b/x11/xview-lib/patches/patch-bq
new file mode 100644
index 00000000000..421f55c4ac0
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bq
@@ -0,0 +1,12 @@
+$NetBSD: patch-bq,v 1.1 2001/12/20 09:19:59 tron Exp $
+
+--- lib/libxview/notice/notice_pt.c.orig Tue Jun 29 07:16:40 1993
++++ lib/libxview/notice/notice_pt.c Thu Dec 20 10:09:16 2001
+@@ -58,6 +58,7 @@
+ static void notice_copy_event();
+ static Xv_window notice_get_focus_win();
+ static int notice_show_focus_win();
++static int notice_quadrant();
+
+ /*
+ * --------------------------- STATICS ------------------------------
diff --git a/x11/xview-lib/patches/patch-br b/x11/xview-lib/patches/patch-br
new file mode 100644
index 00000000000..f3082a02bc4
--- /dev/null
+++ b/x11/xview-lib/patches/patch-br
@@ -0,0 +1,12 @@
+$NetBSD: patch-br,v 1.1 2001/12/20 09:20:00 tron Exp $
+
+--- lib/libxview/notice/notice_get.c.orig Tue Jun 29 07:16:39 1993
++++ lib/libxview/notice/notice_get.c Thu Dec 20 10:10:28 2001
+@@ -29,7 +29,6 @@
+ va_list valist;
+ {
+ Notice_info *notice = NOTICE_PRIVATE(notice_public);
+- Attr_avlist avlist = (Attr_avlist) valist;
+ Xv_opaque v = (Xv_opaque)NULL;
+
+ switch (attr) {
diff --git a/x11/xview-lib/patches/patch-bs b/x11/xview-lib/patches/patch-bs
new file mode 100644
index 00000000000..93ee80d6995
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bs
@@ -0,0 +1,12 @@
+$NetBSD: patch-bs,v 1.1 2001/12/20 09:20:00 tron Exp $
+
+--- lib/libxview/openwin/ow_view.c.orig Tue Jun 29 07:16:43 1993
++++ lib/libxview/openwin/ow_view.c Thu Dec 20 10:09:16 2001
+@@ -48,6 +48,7 @@
+ static openwin_init_view();
+ static openwin_free_view();
+ static openwin_remove_scrollbars();
++static int openwin_check_view();
+ static openwin_create_viewwindow();
+ static openwin_test_for_sb();
+ static openwin_link_view();
diff --git a/x11/xview-lib/patches/patch-bt b/x11/xview-lib/patches/patch-bt
new file mode 100644
index 00000000000..4b848ab746f
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bt
@@ -0,0 +1,13 @@
+$NetBSD: patch-bt,v 1.1 2001/12/20 09:20:00 tron Exp $
+
+--- lib/libxview/panel/item_set.c.orig Tue Jun 29 07:16:50 1993
++++ lib/libxview/panel/item_set.c Thu Dec 20 10:09:16 2001
+@@ -28,6 +28,8 @@
+
+ extern Notify_value panel_base_event_handler();
+
++static fix_positions();
++
+ Pkg_private Xv_opaque
+ item_set_avlist(item_public, avlist)
+ Panel_item item_public;
diff --git a/x11/xview-lib/patches/patch-bu b/x11/xview-lib/patches/patch-bu
new file mode 100644
index 00000000000..6a888098522
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bu
@@ -0,0 +1,13 @@
+$NetBSD: patch-bu,v 1.1 2001/12/20 09:20:00 tron Exp $
+
+--- lib/libxview/panel/p_btn.c.orig Tue Jun 29 07:16:52 1993
++++ lib/libxview/panel/p_btn.c Thu Dec 20 10:09:16 2001
+@@ -203,7 +203,7 @@
+ if (pin_is_default) {
+ image.im_type = PIT_STRING;
+ image_string(&image) = NULL;
+- label = "";
++ label = (Xv_opaque) "";
+ } else if (!(image_string(&image) = (char *) xv_get(default_menu_item,
+ MENU_STRING))) {
+ olgx_state |= OLGX_LABEL_IS_PIXMAP;
diff --git a/x11/xview-lib/patches/patch-bv b/x11/xview-lib/patches/patch-bv
new file mode 100644
index 00000000000..9cdfc317775
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bv
@@ -0,0 +1,23 @@
+$NetBSD: patch-bv,v 1.1 2001/12/20 09:20:00 tron Exp $
+
+--- lib/libxview/panel/p_choice.c.orig Tue Jun 29 07:16:57 1993
++++ lib/libxview/panel/p_choice.c Thu Dec 20 10:09:16 2001
+@@ -106,6 +106,10 @@
+ static int choice_number();
+ static int choice_x_gap();
+ static int choice_y_gap();
++static int find_choice();
++static int modify_choice();
++static int move_specified();
++static int re_alloc_choices();
+ static unsigned int choice_value();
+ static void choice_create_menu();
+ static void choice_images_to_menu_items();
+@@ -120,7 +124,6 @@
+ static void update_item_rect();
+ static void update_value_rect();
+ static Xv_opaque choice_do_menu_item();
+-
+
+ static Panel_ops ops = {
+ panel_default_handle_event, /* handle_event() */
diff --git a/x11/xview-lib/patches/patch-bw b/x11/xview-lib/patches/patch-bw
new file mode 100644
index 00000000000..29d22691bae
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bw
@@ -0,0 +1,17 @@
+$NetBSD: patch-bw,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/p_drop.c.orig Tue Jun 29 07:17:04 1993
++++ lib/libxview/panel/p_drop.c Thu Dec 20 10:09:16 2001
+@@ -10,7 +10,12 @@
+ * file for terms of the license.
+ */
+
++#include <sys/param.h>
++#if (defined(BSD) && (BSD >= 199103))
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <xview_private/draw_impl.h>
+ #include <xview_private/i18n_impl.h>
+ #include <xview_private/panel_impl.h>
diff --git a/x11/xview-lib/patches/patch-bx b/x11/xview-lib/patches/patch-bx
new file mode 100644
index 00000000000..5cba0063ed0
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bx
@@ -0,0 +1,12 @@
+$NetBSD: patch-bx,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/p_gauge.c.orig Tue Jun 29 07:17:04 1993
++++ lib/libxview/panel/p_gauge.c Thu Dec 20 10:09:16 2001
+@@ -47,6 +47,7 @@
+ /* Local functions */
+ static void paint_gauge();
+ static void update_rects();
++static int etoi();
+
+ static Panel_ops ops = {
+ panel_default_handle_event, /* handle_event() */
diff --git a/x11/xview-lib/patches/patch-by b/x11/xview-lib/patches/patch-by
new file mode 100644
index 00000000000..d3f712d7259
--- /dev/null
+++ b/x11/xview-lib/patches/patch-by
@@ -0,0 +1,12 @@
+$NetBSD: patch-by,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/p_get.c.orig Tue Jun 29 07:16:49 1993
++++ lib/libxview/panel/p_get.c Thu Dec 20 10:09:16 2001
+@@ -16,6 +16,7 @@
+ #include <xview/scrollbar.h>
+
+ static int shrink_to_fit();
++static panel_shrink_margin();
+
+ #define MAX_NEGATIVE_SHRINK 2000
+ #define SHRINK_MARGIN 4
diff --git a/x11/xview-lib/patches/patch-bz b/x11/xview-lib/patches/patch-bz
new file mode 100644
index 00000000000..57555403693
--- /dev/null
+++ b/x11/xview-lib/patches/patch-bz
@@ -0,0 +1,13 @@
+$NetBSD: patch-bz,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/p_set.c.orig Tue Jun 29 07:16:59 1993
++++ lib/libxview/panel/p_set.c Thu Dec 20 10:09:16 2001
+@@ -25,6 +25,8 @@
+
+ static void panel_set_fonts();
+
++static int column_from_absolute_x();
++static int row_from_absolute_y();
+
+ Pkg_private Xv_opaque
+ panel_set_avlist(panel_public, avlist)
diff --git a/x11/xview-lib/patches/patch-ca b/x11/xview-lib/patches/patch-ca
new file mode 100644
index 00000000000..4007a4d9fb2
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ca
@@ -0,0 +1,13 @@
+$NetBSD: patch-ca,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/p_slider.c.orig Tue Jun 29 07:17:02 1993
++++ lib/libxview/panel/p_slider.c Thu Dec 20 10:09:17 2001
+@@ -54,6 +54,8 @@
+ static Panel_setting get_value();
+ static void paint_slider();
+ static void update_rects();
++static int etoi();
++static int itoe();
+
+ static Panel_ops ops = {
+ panel_default_handle_event, /* handle_event() */
diff --git a/x11/xview-lib/patches/patch-cb b/x11/xview-lib/patches/patch-cb
new file mode 100644
index 00000000000..05fa94e2e99
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cb
@@ -0,0 +1,17 @@
+$NetBSD: patch-cb,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/p_txt.c.orig Tue Jun 29 07:16:55 1993
++++ lib/libxview/panel/p_txt.c Thu Dec 20 10:09:17 2001
+@@ -10,7 +10,12 @@
+ * file for terms of the license.
+ */
+
++#include <sys/param.h>
++#if (defined(BSD) && (BSD >= 199103))
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <string.h>
+ #include <ctype.h>
+ #include <X11/X.h>
diff --git a/x11/xview-lib/patches/patch-cc b/x11/xview-lib/patches/patch-cc
new file mode 100644
index 00000000000..c99eb1ad880
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cc
@@ -0,0 +1,12 @@
+$NetBSD: patch-cc,v 1.1 2001/12/20 09:20:01 tron Exp $
+
+--- lib/libxview/panel/panel.c.orig Tue Jun 29 07:16:57 1993
++++ lib/libxview/panel/panel.c Thu Dec 20 10:09:17 2001
+@@ -27,6 +27,7 @@
+ Pkg_private int panel_destroy();
+
+ static int panel_layout();
++static int panel_unregister_view();
+
+ Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
+
diff --git a/x11/xview-lib/patches/patch-cd b/x11/xview-lib/patches/patch-cd
new file mode 100644
index 00000000000..dba50ddf3c3
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cd
@@ -0,0 +1,22 @@
+$NetBSD: patch-cd,v 1.1 2001/12/20 09:20:02 tron Exp $
+
+--- lib/libxview/panel/panel_impl.h.orig Tue Jun 29 07:16:50 1993
++++ lib/libxview/panel/panel_impl.h Thu Dec 20 10:09:17 2001
+@@ -9,11 +9,16 @@
+ #ifndef panel_impl_defined
+ #define panel_impl_defined
+
++#ifdef NULL
++#undef NULL
++#endif
+ #ifndef FILE
+ #ifndef SVR4
+-#undef NULL
+ #endif SVR4
+ #include <stdio.h>
++#ifndef NULL
++#define NULL 0
++#endif
+ #endif FILE
+ #include <sys/types.h>
+ #include <X11/Xlib.h>
diff --git a/x11/xview-lib/patches/patch-ce b/x11/xview-lib/patches/patch-ce
new file mode 100644
index 00000000000..4464d6c5fd8
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ce
@@ -0,0 +1,85 @@
+$NetBSD: patch-ce,v 1.1 2001/12/20 09:20:02 tron Exp $
+
+--- lib/libxview/panel/p_list.c.orig Tue Jun 29 07:16:48 1993
++++ lib/libxview/panel/p_list.c Thu Dec 20 10:10:33 2001
+@@ -1239,7 +1239,7 @@
+ return ((Xv_opaque) dp->choose_one);
+
+ case PANEL_ITEM_NTH_WINDOW:
+- if (*(int *) valist == 0)
++ if (va_arg(valist, int *) == 0)
+ return (Xv_opaque) dp->list_sb;
+ else
+ return (Xv_opaque) NULL;
+@@ -1266,7 +1266,7 @@
+ return (Xv_opaque) dp->list_sb;
+
+ case PANEL_LIST_SELECTED:
+- row = *(int *) valist;
++ row = *va_arg(valist, int *);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->f.selected : (Xv_opaque) XV_ERROR);
+
+@@ -1278,7 +1278,7 @@
+ return -1; /* no rows selected */
+
+ case PANEL_LIST_NEXT_SELECTED:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ if (!node)
+ return -1; /* specified row doesn't exist */
+@@ -1289,7 +1289,7 @@
+ return -1; /* no subsequent row selected */
+
+ case PANEL_LIST_CLIENT_DATA:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->client_data : (Xv_opaque) XV_ERROR);
+
+@@ -1297,7 +1297,7 @@
+ #ifdef OW_I18N
+ case PANEL_LIST_STRING_WCS:
+ #endif
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ #ifdef OW_I18N
+ if (node != NULL)
+@@ -1312,7 +1312,7 @@
+ #endif /* OW_I18N */
+
+ case PANEL_LIST_GLYPH:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->glyph : (Xv_opaque) XV_ERROR);
+
+@@ -1328,7 +1328,7 @@
+ #endif /* OW_I18N */
+
+ case PANEL_LIST_FONT:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->font : (Xv_opaque) XV_ERROR);
+
+@@ -1352,7 +1352,7 @@
+
+
+ case PANEL_LIST_INACTIVE:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->f.row_inactive : (Xv_opaque) XV_ERROR);
+
+@@ -1407,7 +1407,7 @@
+ }
+
+ case PANEL_LIST_EXTENSION_DATA:
+- row = *(int *) valist;
++ row = va_arg(valist, int);
+ node = find_or_create_nth_row(dp, row, FALSE);
+ return (node ? (Xv_opaque) node->exten_data : (Xv_opaque) XV_ERROR);
+
diff --git a/x11/xview-lib/patches/patch-cf b/x11/xview-lib/patches/patch-cf
new file mode 100644
index 00000000000..c5aad021748
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cf
@@ -0,0 +1,13 @@
+$NetBSD: patch-cf,v 1.1 2001/12/20 09:20:02 tron Exp $
+
+--- lib/libxview/panel/p_mlinetxt.c.orig Tue Jun 29 07:17:05 1993
++++ lib/libxview/panel/p_mlinetxt.c Thu Dec 20 10:10:38 2001
+@@ -449,7 +449,7 @@
+ return (Xv_opaque) dp->rows_displayed;
+
+ case PANEL_ITEM_NTH_WINDOW:
+- switch (*(int *) valist) {
++ switch (va_arg(valist, int)) {
+ case 0:
+ return dp->view;
+ case 1:
diff --git a/x11/xview-lib/patches/patch-cg b/x11/xview-lib/patches/patch-cg
new file mode 100644
index 00000000000..4bcd264f662
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cg
@@ -0,0 +1,16 @@
+$NetBSD: patch-cg,v 1.1 2001/12/20 09:20:02 tron Exp $
+
+--- lib/libxview/ttysw/cim_change.c.orig Tue Jun 29 07:17:12 1993
++++ lib/libxview/ttysw/cim_change.c Thu Dec 20 10:09:17 2001
+@@ -17,10 +17,10 @@
+ #include <xview_private/i18n_impl.h>
+ #include <sys/types.h>
+ #include <pixrect/pixrect.h>
+-#include <xview_private/ttyansi.h>
+ #include <xview_private/charimage.h>
+ #include <xview_private/charscreen.h>
+ #include <xview_private/tty_impl.h>
++#include <xview_private/ttyansi.h>
+
+ char boldify;
+
diff --git a/x11/xview-lib/patches/patch-ch b/x11/xview-lib/patches/patch-ch
new file mode 100644
index 00000000000..81040d5d33d
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ch
@@ -0,0 +1,41 @@
+$NetBSD: patch-ch,v 1.1 2001/12/20 09:20:02 tron Exp $
+
+--- lib/libxview/ttysw/tty_gtty.c.orig Tue Jun 29 07:17:20 1993
++++ lib/libxview/ttysw/tty_gtty.c Thu Dec 20 10:09:17 2001
+@@ -14,6 +14,7 @@
+ * Ttysw parameter retrieval mechanism to get original tty settings to pty.
+ */
+
++#include <sys/param.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <xview_private/portable.h> /* for tty_mode_t and XV* defines */
+@@ -34,6 +35,7 @@
+ */
+ #ifdef XV_USE_TERMIOS
+
++#if !(defined(BSD) && (BSD >= 199103))
+ static struct termios default_modes = {
+ BRKINT|ICRNL|IXON|IGNPAR|IMAXBEL, /* input modes */
+ OPOST|ONLCR, /* output modes */
+@@ -57,6 +59,20 @@
+ CWERASE, /* VWERASE */
+ CLNEXT, /* VLNEXT */
+ };
++#else
++#include <sys/ttydefaults.h>
++static struct termios default_modes = {
++ TTYDEF_IFLAG, /* input modes */
++ TTYDEF_OFLAG, /* output modes */
++ TTYDEF_CFLAG, /* control modes */
++ TTYDEF_LFLAG, /* local modes */
++ /* control characters */
++ { CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
++ _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
++ CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE },
++ TTYDEF_SPEED, TTYDEF_SPEED /* input and output speeds */
++};
++#endif
+
+ #else /* XV_USE_TERMIOS */
+
diff --git a/x11/xview-lib/patches/patch-ci b/x11/xview-lib/patches/patch-ci
new file mode 100644
index 00000000000..708551bccff
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ci
@@ -0,0 +1,26 @@
+$NetBSD: patch-ci,v 1.1 2001/12/20 09:20:02 tron Exp $
+
+--- lib/libxview/ttysw/tty_impl.h.orig Tue Jun 29 07:17:18 1993
++++ lib/libxview/ttysw/tty_impl.h Thu Dec 20 10:09:17 2001
+@@ -14,6 +14,7 @@
+ * terminal emulation for teletype based programs.
+ */
+
++#include <sys/param.h>
+ #include <xview_private/portable.h> /* tty and pty configuration info */
+
+ #ifdef XV_USE_TERMIOS
+@@ -210,7 +211,13 @@
+ * Access functions for tty characteristics.
+ */
+ #ifdef XV_USE_TERMIOS
++#if (defined(BSD) && (BSD >= 199103))
++#include <sys/ioctl.h>
++#include <sys/ioctl_compat.h>
++#define tty_gettabs(t) ((t)->termios.c_oflag & OXTABS)
++#else
+ #define tty_gettabs(t) ((t)->termios.c_oflag & XTABS)
++#endif
+ #define tty_getdsuspc(t) ((int) ((t)->termios.c_cc[VDSUSP]))
+ #define tty_geteofc(t) ((int) ((t)->termios.c_cc[VEOF]))
+ #define tty_geteolc(t) ((int) ((t)->termios.c_cc[VEOL]))
diff --git a/x11/xview-lib/patches/patch-cj b/x11/xview-lib/patches/patch-cj
new file mode 100644
index 00000000000..52dc0cb581a
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cj
@@ -0,0 +1,77 @@
+$NetBSD: patch-cj,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/tty_init.c.orig Tue Jun 29 07:17:19 1993
++++ lib/libxview/ttysw/tty_init.c Thu Dec 20 10:09:17 2001
+@@ -14,6 +14,7 @@
+ * Ttysw initialization, destruction and error procedures
+ */
+
++#include <sys/param.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -82,7 +83,11 @@
+
+ extern char *strncpy();
+ extern char *strcpy();
++#if (defined(BSD) && (BSD >= 199306))
++extern off_t lseek();
++#else
+ extern long lseek();
++#endif
+ char *textsw_checkpoint_undo();
+
+ /* static */ void ttysw_parseargs();
+@@ -106,6 +111,7 @@
+
+ extern int ttysel_use_seln_service;
+
++static int ttyinit();
+
+ struct ttysw_createoptions {
+ int becomeconsole; /* be the console */
+@@ -518,6 +524,9 @@
+ (void) dup2(ttysw->ttysw_tty, 2);
+ (void) close(ttysw->ttysw_tty);
+
++#if (defined(BSD) && (BSD >= 199103))
++ (void) ioctl(0, TIOCSCTTY, NULL);
++#endif
+ if (*argv == (char *) NULL || strcmp("-c", *argv) == 0) {
+ /* Process arg list */
+ int argc;
+@@ -955,7 +964,11 @@
+ struct utmpx utmp;
+ #endif
+ struct passwd *passwdent;
++#if !(defined(BSD) && (BSD >= 199103))
+ extern struct passwd *getpwuid();
++#else
++ struct passwd *getpwuid __P((uid_t));
++#endif
+ int f;
+ char *ttyn;
+ extern char *ttyname();
+@@ -1007,13 +1020,22 @@
+ XV_MSG("Add tty[qrs][0-f] to /etc/ttys file.\n"));
+ return (0);
+ }
++#if !(defined(BSD) && (BSD >= 199103))
+ if ((f = open("/etc/utmp", 1)) >= 0) {
++#else
++ if ((f = open(_PATH_UTMP, 1)) >= 0) {
++#endif
+ (void) lseek(f, (long) (ttyslotuse * sizeof(utmp)), 0);
+ (void) write(f, (char *) &utmp, sizeof(utmp));
+ (void) close(f);
+ } else {
+ (void) fprintf(stderr,
++#if !(defined(BSD) && (BSD >= 199103))
+ XV_MSG("make sure that you can write /etc/utmp!\n"));
++#else
++ XV_MSG("make sure that you can write "));
++ (void) fprintf(stderr, "%s!\n", _PATH_UTMP);
++#endif
+ return (0);
+ }
+ return (ttyslotuse);
diff --git a/x11/xview-lib/patches/patch-ck b/x11/xview-lib/patches/patch-ck
new file mode 100644
index 00000000000..0fab4f122a9
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ck
@@ -0,0 +1,29 @@
+$NetBSD: patch-ck,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/tty_main.c.orig Tue Jun 29 07:17:22 1993
++++ lib/libxview/ttysw/tty_main.c Thu Dec 20 10:09:17 2001
+@@ -75,6 +75,11 @@
+ int committed_left = 0;
+ #endif
+
++static int ttysw_process_point();
++static int ttysw_process_adjust();
++static int ttysw_process_motion();
++static int ttysw_process_keyboard();
++
+ extern Textsw_index textsw_insert();
+ #ifdef OW_I18N
+ extern Textsw_index textsw_insert_wcs();
+@@ -906,8 +911,12 @@
+
+ if (int_ucntl == (tiocsti & 0xff))
+ ttysw_process_STI(ttysw, owbp, cc - 1);
++#ifndef XV_USE_TERMIOS
+ (void) ioctl(ttysw->ttysw_tty, TIOCGETC, &ttysw->tchars);
+ (void) ioctl(ttysw->ttysw_tty, TIOCGLTC, &ttysw->ltchars);
++#else
++ (void) tcgetattr(ttysw->ttysw_tty, &ttysw->termios);
++#endif
+ ttysw_getp(TTY_VIEW_HANDLE_FROM_TTY_FOLIO(ttysw)); /* jcb for nng */
+ } else
+ #ifdef OW_I18N
diff --git a/x11/xview-lib/patches/patch-cl b/x11/xview-lib/patches/patch-cl
new file mode 100644
index 00000000000..25cdf7269f8
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cl
@@ -0,0 +1,46 @@
+$NetBSD: patch-cl,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/tty_ntfy.c.orig Tue Jun 29 07:17:17 1993
++++ lib/libxview/ttysw/tty_ntfy.c Thu Dec 20 10:09:17 2001
+@@ -171,10 +171,14 @@
+ * SIGWINCHes on resize.
+ */
+ /* Notify process group that terminal has changed. */
++#if !(defined(BSD) && (BSD >= 199103))
+ if (ioctl(ttysw->ttysw_tty, TIOCGPGRP, &pgrp) == -1) {
+ perror(XV_MSG("ttysw_sigwinch, can't get tty process group"));
+ return;
+ }
++#else
++ pgrp = tcgetpgrp(ttysw->ttysw_pty);
++#endif
+ /*
+ * Only killpg when pgrp is not tool's. This is the case of haven't
+ * completed ttysw_fork yet (or even tried to do it yet).
+@@ -204,7 +208,11 @@
+ return;
+ }
+ /* Send the signal to the process group of the controlling tty */
++#if !(defined(BSD) && (BSD >= 199103))
+ if (ioctl(ttysw->ttysw_tty, TIOCGPGRP, &control_pg) >= 0) {
++#else
++ if ((control_pg = tcgetpgrp(ttysw->ttysw_pty)) >= 0) {
++#endif
+ /*
+ * Flush our buffers of completed and partial commands. Be sure to do
+ * this BEFORE killpg, or we'll flush the prompt coming back from the
+@@ -227,11 +235,11 @@
+ termsw->cmd_started = 0;
+ termsw->pty_owes_newline = 0;
+ }
+-# if defined(XV_USE_SVR4_PTYS) || defined(sun)
++#if defined(XV_USE_SVR4_PTYS) || defined(sun)
+ (void) ioctl(ttysw->ttysw_pty, TIOCSIGNAL, &sig);;
+-# else
++#else
+ (void) killpg(control_pg, sig);
+-# endif
++#endif
+ } else
+ perror(XV_MSG("ioctl"));
+ }
diff --git a/x11/xview-lib/patches/patch-cm b/x11/xview-lib/patches/patch-cm
new file mode 100644
index 00000000000..bbb4a02f163
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cm
@@ -0,0 +1,15 @@
+$NetBSD: patch-cm,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/ttyansi.c.orig Tue Jun 29 07:17:21 1993
++++ lib/libxview/ttysw/ttyansi.c Thu Dec 20 10:09:17 2001
+@@ -31,6 +31,10 @@
+
+ #include <xview/sel_attrs.h>
+
++static int send_input_to_textsw();
++static int ansi_lf();
++static int ansi_char();
++
+ char *strncpy();
+ char *textsw_checkpoint_undo();
+ Textsw_index textsw_replace_i18n(), textsw_erase_i18n();
diff --git a/x11/xview-lib/patches/patch-cn b/x11/xview-lib/patches/patch-cn
new file mode 100644
index 00000000000..64f45cde5a3
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cn
@@ -0,0 +1,13 @@
+$NetBSD: patch-cn,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/ttyselect.c.orig Sun Jun 26 03:05:23 1994
++++ lib/libxview/ttysw/ttyselect.c Thu Dec 20 10:09:17 2001
+@@ -75,6 +75,8 @@
+ #endif
+ ttysel_reply();
+
++static ttysel_resynch();
++
+ static struct ttyselection *
+ ttysel_from_rank();
+
diff --git a/x11/xview-lib/patches/patch-co b/x11/xview-lib/patches/patch-co
new file mode 100644
index 00000000000..8b1214a7c18
--- /dev/null
+++ b/x11/xview-lib/patches/patch-co
@@ -0,0 +1,13 @@
+$NetBSD: patch-co,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/tty_mapkey.c.orig Tue Jun 29 07:17:20 1993
++++ lib/libxview/ttysw/tty_mapkey.c Thu Dec 20 10:09:19 2001
+@@ -500,7 +500,7 @@
+ * have more time.
+ */
+
+-#ifdef i386
++#if defined(i386) && !defined (__FreeBSD__) && !defined(__NetBSD__)
+ static void
+ ttysw_arrow_keys_to_string(xv_id, str)
+ unsigned xv_id;
diff --git a/x11/xview-lib/patches/patch-cp b/x11/xview-lib/patches/patch-cp
new file mode 100644
index 00000000000..164a4ef0f9c
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cp
@@ -0,0 +1,28 @@
+$NetBSD: patch-cp,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/cim_size.c.orig Tue Jun 29 07:17:14 1993
++++ lib/libxview/ttysw/cim_size.c Thu Dec 20 10:09:19 2001
+@@ -156,19 +156,19 @@
+ {
+
+ if (lines_ptr) {
+- cfree((CHAR *) (lines_ptr));
++ free((CHAR *) (lines_ptr));
+ lines_ptr = NULL;
+ }
+ if (image) {
+- cfree((CHAR **) image);
++ free((CHAR **) image);
+ image = NULL;
+ }
+ if (mode_ptr) {
+- cfree((char *) (mode_ptr));
++ free((char *) (mode_ptr));
+ mode_ptr = NULL;
+ }
+ if (screenmode) {
+- cfree((char **) screenmode);
++ free((char **) screenmode);
+ screenmode = NULL;
+ }
+ }
diff --git a/x11/xview-lib/patches/patch-cq b/x11/xview-lib/patches/patch-cq
new file mode 100644
index 00000000000..ab739015ed3
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cq
@@ -0,0 +1,17 @@
+$NetBSD: patch-cq,v 1.1 2001/12/20 09:20:03 tron Exp $
+
+--- lib/libxview/ttysw/termsw.c.orig Tue Jun 29 07:17:15 1993
++++ lib/libxview/ttysw/termsw.c Thu Dec 20 10:10:10 2001
+@@ -252,8 +252,12 @@
+
+ /* Generate a new temporary file name and open the file up. */
+ (void) strcpy(tmpfile_name, "/tmp/tty.txt.XXXXXX");
++#if (defined(BSD) && (BSD >= 199103))
++ if ((fd = mkstemp(tmpfile_name)) < 0) {
++#else
+ (void) mktemp(tmpfile_name);
+ if ((fd = open(tmpfile_name, O_CREAT | O_RDWR | O_EXCL, 0600)) < 0) {
++#endif
+ return (XV_ERROR);
+ }
+ (void) close(fd);
diff --git a/x11/xview-lib/patches/patch-cr b/x11/xview-lib/patches/patch-cr
new file mode 100644
index 00000000000..feefcf069db
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cr
@@ -0,0 +1,27 @@
+$NetBSD: patch-cr,v 1.1 2001/12/20 09:20:04 tron Exp $
+
+--- lib/libxview/wmgr/wmgr_menu.c.orig Tue Jun 29 07:17:24 1993
++++ lib/libxview/wmgr/wmgr_menu.c Thu Dec 20 10:09:53 2001
+@@ -10,16 +10,22 @@
+ * file for terms of the license.
+ */
+
++#include <sys/param.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
++
++#if defined(BSD) && (BSD >= 199306)
++#include <unistd.h>
++#else
+ #ifdef sparc
+ #ifdef SVR4
+ #include <unistd.h>
+ #else
+ #include <vfork.h>
+ #endif SVR4
++#endif sparc
+ #endif
+
+ #include <xview/frame.h>
diff --git a/x11/xview-lib/patches/patch-cs b/x11/xview-lib/patches/patch-cs
new file mode 100644
index 00000000000..5bb7d9bf395
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cs
@@ -0,0 +1,12 @@
+$NetBSD: patch-cs,v 1.1 2001/12/20 09:20:04 tron Exp $
+
+--- lib/libxview/textsw/ei_text.c.orig Tue Jun 29 07:17:37 1993
++++ lib/libxview/textsw/ei_text.c Thu Dec 20 10:09:17 2001
+@@ -121,6 +121,7 @@
+ #endif
+ static struct ei_span_result ei_plain_text_span_of_group();
+ static struct ei_process_result ei_plain_text_expand();
++static paint_batch();
+
+ struct ei_ops ei_plain_text_ops = {
+ ei_plain_text_destroy,
diff --git a/x11/xview-lib/patches/patch-ct b/x11/xview-lib/patches/patch-ct
new file mode 100644
index 00000000000..23d81e69e4c
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ct
@@ -0,0 +1,13 @@
+$NetBSD: patch-ct,v 1.1 2001/12/20 09:20:04 tron Exp $
+
+--- lib/libxview/textsw/es_attr.c.orig Tue Jun 29 07:17:31 1993
++++ lib/libxview/textsw/es_attr.c Thu Dec 20 10:09:17 2001
+@@ -22,7 +22,7 @@
+
+ Pkg_private int
+ #ifdef ANSI_FUNC_PROTO
+-es_set(register Es_handle esh, ...)
++es_set(Es_handle esh, ...)
+ #else
+ es_set(esh, va_alist)
+ register Es_handle esh;
diff --git a/x11/xview-lib/patches/patch-cu b/x11/xview-lib/patches/patch-cu
new file mode 100644
index 00000000000..fd9937f6ce3
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cu
@@ -0,0 +1,14 @@
+$NetBSD: patch-cu,v 1.1 2001/12/20 09:20:04 tron Exp $
+
+--- lib/libxview/textsw/ev_op_bdry.c.orig Tue Jun 29 07:17:30 1993
++++ lib/libxview/textsw/ev_op_bdry.c Thu Dec 20 10:09:17 2001
+@@ -28,6 +28,9 @@
+ static Ev_finger_handle ev_insert_finger();
+ static Ev_mark_object last_generated_id;
+
++static int ev_find_finger_internal();
++static ev_remove_finger_internal();
++
+ #define FORALL(index_var) \
+ for (index_var = 0; index_var < fingers->last_plus_one; index_var++)
+
diff --git a/x11/xview-lib/patches/patch-cv b/x11/xview-lib/patches/patch-cv
new file mode 100644
index 00000000000..93cd892b86c
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cv
@@ -0,0 +1,15 @@
+$NetBSD: patch-cv,v 1.1 2001/12/20 09:20:04 tron Exp $
+
+--- lib/libxview/textsw/ps_impl.c.orig Tue Jun 29 07:17:39 1993
++++ lib/libxview/textsw/ps_impl.c Thu Dec 20 10:09:17 2001
+@@ -62,6 +62,10 @@
+ static Es_index ps_replace(), ps_scratch_replace();
+ static int ps_set();
+
++static int get_current_offset();
++
++static copy_pieces();
++
+ static Es_index write_header_etc();
+
+ static struct es_ops ps_ops = {
diff --git a/x11/xview-lib/patches/patch-cw b/x11/xview-lib/patches/patch-cw
new file mode 100644
index 00000000000..9289a00bb9b
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cw
@@ -0,0 +1,102 @@
+$NetBSD: patch-cw,v 1.1 2001/12/20 09:20:05 tron Exp $
+
+--- lib/libxview/textsw/txt_again.c.orig Tue Jun 29 07:17:32 1993
++++ lib/libxview/textsw/txt_again.c Thu Dec 20 10:09:17 2001
+@@ -28,6 +28,8 @@
+ Pkg_private Es_index textsw_do_input();
+ Pkg_private Es_index textsw_do_pending_delete();
+
++static int textsw_string_min_free();
++
+ string_t null_string = {0, 0, 0};
+
+ #define TEXT_DELIMITER "\\"
+@@ -182,6 +184,7 @@
+ * Following is stolen from 3.2ALPHA sprintf(str, fmt, va_alist) SIDE_EFFECT:
+ * TXTSW_STRING_FREE(ptr_to_string) is modified by this routine.
+ */
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #ifndef SVR4
+
+ /* VARARGS2 */
+@@ -325,6 +328,31 @@
+
+ #endif /* SVR4 */
+
++#else /* __FreeBSD__ */
++/*inspiration taken from sprintf.c */
++
++static int
++textsw_printf(register string_t *ptr_to_string, char *fmt, ...)
++{
++ FILE _strbuf;
++ int result;
++ va_list args;
++ _strbuf._flags = __SWR | __SSTR;
++ _strbuf._bf._base = _strbuf._p = (char *) TXTSW_STRING_FREE(ptr_to_string);
++ _strbuf._bf._size = _strbuf._w = ptr_to_string->max_length - TXTSW_STRING_LENGTH(ptr_to_string);
++ VA_START(args, fmt);
++ result = vfprintf (&_strbuf, fmt, args);
++ va_end(args);
++ TXTSW_STRING_FREE(ptr_to_string) = (char *) _strbuf._p;
++#ifndef lint
++ if (result >= 0)
++ putc('\0', &_strbuf);
++#endif
++ return (result);
++}
++
++#endif /* __FreeBSD__ */
++
+ static void
+ textsw_record_buf(again, buffer, buffer_length)
+ register string_t *again;
+@@ -619,6 +647,8 @@
+ */
+ /* VARARGS2 */
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
++
+ static int
+ #ifdef ANSI_FUNC_PROTO
+ textsw_scanf(register string_t *ptr_to_string, register char *fmt, ...)
+@@ -705,6 +735,39 @@
+
+ #endif /* OW_I18N */
+ }
++#else /* __FreeBSD__ */
++/*inspiration/code taken from sscanf.c */
++
++static int
++eofread(cookie, buf, len)
++ void *cookie;
++ char *buf;
++ int len;
++{
++
++ return (0);
++}
++
++static int
++textsw_scanf(register string_t *ptr_to_string, char *fmt, ...)
++{
++ FILE _strbuf;
++ int result;
++ va_list args;
++
++ _strbuf._flags = __SRD;
++ _strbuf._bf._base = _strbuf._p = (char *) TXTSW_STRING_BASE(ptr_to_string);
++ _strbuf._bf._size = _strbuf._r = TXTSW_STRING_LENGTH(ptr_to_string);
++ _strbuf._read = eofread;
++ _strbuf._ub._base = NULL;
++ _strbuf._lb._base = NULL;
++ VA_START(args, fmt);
++ result = __svfscanf(&_strbuf, fmt, args);
++ va_end(args);
++ TXTSW_STRING_BASE(ptr_to_string) = (char *) _strbuf._p;
++ return (result);
++}
++#endif /* __FreeBSD__ */
+
+ static int
+ textsw_next_is_delimiter(again)
diff --git a/x11/xview-lib/patches/patch-cx b/x11/xview-lib/patches/patch-cx
new file mode 100644
index 00000000000..4e377342d14
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cx
@@ -0,0 +1,35 @@
+$NetBSD: patch-cx,v 1.1 2001/12/20 09:20:05 tron Exp $
+
+--- lib/libxview/textsw/txt_e_menu.c.orig Tue Jun 29 07:17:42 1993
++++ lib/libxview/textsw/txt_e_menu.c Thu Dec 20 10:09:17 2001
+@@ -50,8 +50,12 @@
+ #define ERROR -1
+
+ #define MAX_FILES 40
++#ifndef MAXPATHLEN
+ #define MAXPATHLEN 1024
++#endif
++#ifndef EXTRASMENU
+ #define EXTRASMENU "text_extras_menu"
++#endif
+ #define MAXSTRLEN 256
+ #define MAXARGS 20
+
+@@ -78,6 +82,8 @@
+
+ extern int EXTRASMENU_FILENAME_KEY;
+
++static any_shell_meta();
++
+ Pkg_private char *
+ textsw_get_extras_filename(mi)
+ Menu_item mi;
+@@ -136,7 +142,7 @@
+ goto found;
+ }
+
+-#ifdef notdef
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ /* Gee, still?... We will try the old fashioned way */
+ (void) sprintf(tmp, "%s/lib/.%s",
+ filename, EXTRASMENU);
diff --git a/x11/xview-lib/patches/patch-cy b/x11/xview-lib/patches/patch-cy
new file mode 100644
index 00000000000..03aee734e9b
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cy
@@ -0,0 +1,59 @@
+$NetBSD: patch-cy,v 1.1 2001/12/20 09:20:05 tron Exp $
+
+--- lib/libxview/textsw/txt_file.c.orig Tue Jun 29 07:17:48 1993
++++ lib/libxview/textsw/txt_file.c Thu Dec 20 10:09:41 2001
+@@ -45,13 +45,26 @@
+
+ extern CHAR *STRCAT();
+ extern CHAR *STRNCAT();
+-#ifdef SVR4
++
++#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000))
++#define GETCWD
++#endif
++
++#ifdef GETCWD
+ extern char *getcwd();
+ #else
+ extern char *getwd();
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ extern int errno, sys_nerr;
++#if (defined(BSD) && (BSD >= 199306))
++#if __NetBSD_Version__ > 103080000
++#include <errno.h>
++#else
++extern const char *const sys_errlist[];
++#endif
++#else
+ extern char *sys_errlist[];
++#endif
+
+ Pkg_private int textsw_change_directory();
+ Pkg_private void textsw_display(), textsw_display_view_margins();
+@@ -354,21 +367,21 @@
+ }
+
+ #ifdef OW_I18N
+-#ifdef SVR4
++#ifdef GETCWD
+ if (getcwd(pathname_mb, MAXPATHLEN) == 0)
+ #else
+ if (getwd(pathname_mb) == 0)
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ return (0);
+ (void) mbstowcs(pathname, pathname_mb, MAXPATHLEN-1);
+
+ #else /* OW_I18N */
+
+-#ifdef SVR4
++#ifdef GETCWD
+ if (getcwd(pathname, MAXPATHLEN) == 0)
+ #else
+ if (getwd(pathname) == 0)
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ return (0);
+ #endif /* OW_I18N */
+
diff --git a/x11/xview-lib/patches/patch-cz b/x11/xview-lib/patches/patch-cz
new file mode 100644
index 00000000000..6b81f1fd57a
--- /dev/null
+++ b/x11/xview-lib/patches/patch-cz
@@ -0,0 +1,13 @@
+$NetBSD: patch-cz,v 1.1 2001/12/20 09:20:05 tron Exp $
+
+--- lib/libxview/textsw/txt_input.c.orig Tue Jun 29 07:17:42 1993
++++ lib/libxview/textsw/txt_input.c Thu Dec 20 10:09:17 2001
+@@ -57,6 +57,8 @@
+ Pkg_private void textsw_implicit_commit_doit();
+ #endif
+
++static int textsw_do_newline();
++
+ #define SPACE_CHAR 0x20
+
+ Pkg_private int
diff --git a/x11/xview-lib/patches/patch-da b/x11/xview-lib/patches/patch-da
new file mode 100644
index 00000000000..d5a5c9189e2
--- /dev/null
+++ b/x11/xview-lib/patches/patch-da
@@ -0,0 +1,22 @@
+$NetBSD: patch-da,v 1.1 2001/12/20 09:20:05 tron Exp $
+
+--- lib/libxview/textsw/txt_move.c.orig Tue Jun 29 07:17:47 1993
++++ lib/libxview/textsw/txt_move.c Thu Dec 20 10:09:17 2001
+@@ -55,7 +55,7 @@
+
+ static int dnd_data_key = 0; /* XXX: Don't do this at home kids. */
+ static int dnd_view_key = 0;
+-static int DndConvertProc();
++int DndConvertProc();
+
+ Pkg_private Es_handle textsw_esh_for_span();
+ Pkg_private Es_index ev_resolve_xy();
+@@ -688,7 +688,7 @@
+ xv_destroy(dnd_accept_cursor);
+ }
+
+-static int
++int
+ DndConvertProc(dnd, type, data, length, format)
+ Dnd dnd;
+ Atom *type;
diff --git a/x11/xview-lib/patches/patch-db b/x11/xview-lib/patches/patch-db
new file mode 100644
index 00000000000..82018f5a5c9
--- /dev/null
+++ b/x11/xview-lib/patches/patch-db
@@ -0,0 +1,32 @@
+$NetBSD: patch-db,v 1.1 2001/12/20 09:20:05 tron Exp $
+
+--- lib/libxview/textsw/txt_popup.c.orig Tue Jun 29 07:17:38 1993
++++ lib/libxview/textsw/txt_popup.c Thu Dec 20 10:09:17 2001
+@@ -95,6 +95,10 @@
+ static int TEXTSW_POPUP_KEY; /* key data holding one of the above
+ key names */
+
++static void add_exten_item();
++static int fc_exten_func();
++static void show_dot_files_proc();
++
+ Panel_item store_panel_items[MAX_FILE_PANEL_ITEMS];
+ Panel_item load_panel_items[MAX_FILE_PANEL_ITEMS];
+ Panel_item include_panel_items[MAX_FILE_PANEL_ITEMS];
+@@ -135,7 +139,6 @@
+ Frame popup_frame, base_frame;
+ Panel panel = NULL;
+ char *label;
+- void add_exten_item();
+ #ifdef OW_I18N
+ int win_use_im = ((popup_type != TEXTSW_MENU_SEL_MARK_TEXT) &&
+ (popup_type != TEXTSW_MENU_NORMALIZE_LINE));
+@@ -502,8 +505,6 @@
+ int frame_width;
+ int frame_height;
+ Panel_item item;
+- void show_dot_files_proc();
+- int fc_exten_func();
+
+
+ panel = xv_get(fc, FRAME_CMD_PANEL);
diff --git a/x11/xview-lib/patches/patch-dc b/x11/xview-lib/patches/patch-dc
new file mode 100644
index 00000000000..40fe8304fdb
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dc
@@ -0,0 +1,13 @@
+$NetBSD: patch-dc,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/textsw/txt_putkey.c.orig Tue Jun 29 07:17:41 1993
++++ lib/libxview/textsw/txt_putkey.c Thu Dec 20 10:09:17 2001
+@@ -21,6 +21,8 @@
+
+ extern int errno;
+
++static int textsw_do_put();
++
+ Pkg_private Ev_finger_handle ev_add_finger();
+ Pkg_private int ev_get_selection();
+ Pkg_private Es_handle textsw_esh_for_span();
diff --git a/x11/xview-lib/patches/patch-dd b/x11/xview-lib/patches/patch-dd
new file mode 100644
index 00000000000..fda7d5e8aae
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dd
@@ -0,0 +1,13 @@
+$NetBSD: patch-dd,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/textsw/txt_selsvc.c.orig Sun Jun 26 03:05:23 1994
++++ lib/libxview/textsw/txt_selsvc.c Thu Dec 20 10:09:17 2001
+@@ -24,6 +24,8 @@
+ #include <stdlib.h>
+ #endif /* SVR4 */
+
++static int textsw_should_ask_seln_svc();
++
+ extern int errno;
+
+ Pkg_private Es_status es_copy();
diff --git a/x11/xview-lib/patches/patch-de b/x11/xview-lib/patches/patch-de
new file mode 100644
index 00000000000..7d3c7eebc12
--- /dev/null
+++ b/x11/xview-lib/patches/patch-de
@@ -0,0 +1,31 @@
+$NetBSD: patch-de,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/textsw/es_file.c.orig Tue Jun 29 07:17:34 1993
++++ lib/libxview/textsw/es_file.c Thu Dec 20 10:09:45 2001
+@@ -88,10 +88,11 @@
+ #ifdef SVR4
+ #include <stdlib.h>
+ #include <dirent.h>
++#include <sys/errno.h>
+ #else
+ #include <sys/dir.h>
++#include <errno.h>
+ #endif /* SVR4 */
+-#include <sys/errno.h>
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -110,8 +111,13 @@
+
+
+ extern int errno, sys_nerr;
++#if (defined(BSD) && (BSD >= 199306))
++extern const char *const sys_err_list[];
++extern off_t lseek();
++#else
+ extern char *sys_errlist[];
+ extern long lseek();
++#endif
+
+ static void update_read_buf(); /* update the read buf if overlaps write buf */
+ static Es_status es_file_commit();
diff --git a/x11/xview-lib/patches/patch-df b/x11/xview-lib/patches/patch-df
new file mode 100644
index 00000000000..c43b68a4998
--- /dev/null
+++ b/x11/xview-lib/patches/patch-df
@@ -0,0 +1,13 @@
+$NetBSD: patch-df,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/textsw/txt_filter.c.orig Tue Jun 29 07:17:39 1993
++++ lib/libxview/textsw/txt_filter.c Thu Dec 20 10:09:58 2001
+@@ -31,7 +31,7 @@
+ #include <signal.h>
+ #include <string.h>
+
+-#ifdef sparc
++#if defined(sparc) && !(defined(BSD) && (BSD >= 199306))
+ #ifdef SVR4
+ #include <unistd.h>
+ #else
diff --git a/x11/xview-lib/patches/patch-dg b/x11/xview-lib/patches/patch-dg
new file mode 100644
index 00000000000..90d484a8775
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dg
@@ -0,0 +1,77 @@
+$NetBSD: patch-dg,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/textsw/txt_incl.c.orig Tue Jun 29 07:17:32 1993
++++ lib/libxview/textsw/txt_incl.c Thu Dec 20 10:10:06 2001
+@@ -35,6 +35,12 @@
+ #include <string.h>
+ #endif /* SVR4 */
+
++#include <sys/param.h>
++
++#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000))
++#define GETCWD
++#endif
++
+ #define MAX_DISPLAY_LENGTH 50
+ #define MAX_STR_LENGTH 1024
+
+@@ -108,18 +114,18 @@
+
+ /* if "cd" is not disabled and the "cd" dir is not the current dir */
+ #ifdef OW_I18N
+-#ifdef SVR4
++#ifdef GETCWD
+ (void) getcwd(curr_dir_mb, MAX_STR_LENGTH);
+ #else
+ (void) getwd(curr_dir_mb);
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ (void) mbstowcs(curr_dir, curr_dir_mb, MAX_STR_LENGTH);
+ #else /* OW_I18N */
+-#ifdef SVR4
++#ifdef GETCWD
+ (void) getcwd(curr_dir, MAX_STR_LENGTH);
+ #else
+ (void) getwd(curr_dir);
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ #endif /* OW_I18N */
+
+ textsw_changed_directory = FALSE;
+@@ -272,11 +278,11 @@
+ include_string[0] = NULL;
+ (void) textsw_get_selection(view, &dummy, &dummy, include_string,
+ MAX_STR_LENGTH);
+-#ifdef SVR4
++#ifdef GETCWD
+ (void) getcwd(current_dir_include_string, MAX_STR_LENGTH);
+ #else
+ (void) getwd(current_dir_include_string);
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ include_panel_items[(int) DIR_STRING_ITEM] =
+ panel_create_item(panel, PANEL_TEXT,
+ PANEL_LABEL_X, ATTR_COL(0),
+@@ -384,18 +390,18 @@
+
+ /* if "cd" is not disabled and the "cd" dir is not the current dir */
+ #ifdef OW_I18N
+-#ifdef SVR4
++#ifdef GETCWD
+ (void) getcwd(curr_dir_mb, MAX_STR_LENGTH);
+ #else
+ (void) getwd(curr_dir_mb);
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ (void) mbstowcs(curr_dir, curr_dir_mb, MAX_STR_LENGTH);
+ #else /* OW_I18N */
+-#ifdef SVR4
++#ifdef GETCWD
+ (void) getcwd(curr_dir, MAX_STR_LENGTH);
+ #else
+ (void) getwd(curr_dir);
+-#endif /* SVR4 */
++#endif /* GETCWD */
+ #endif /* OW_I18N */
+
+ textsw_changed_directory = FALSE;
diff --git a/x11/xview-lib/patches/patch-dh b/x11/xview-lib/patches/patch-dh
new file mode 100644
index 00000000000..7e4b4b128a8
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dh
@@ -0,0 +1,57 @@
+$NetBSD: patch-dh,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/file_chooser/Imakefile.orig Tue Jun 29 07:17:58 1993
++++ lib/libxview/file_chooser/Imakefile Thu Dec 20 10:09:16 2001
+@@ -27,35 +27,35 @@
+ path_impl.h hist_impl.h
+
+ DATA_OBJS = fchsr_data.o\
+- flist_data.o\
+- path_data.o\
+- hist_data.o
++ flist_data.o\
++ path_data.o\
++ hist_data.o
+
+ TEXT_OBJS =\
+- file_chsr.o\
++ file_chsr.o\
+ fc_layout.o\
+ file_list.o\
+ path.o\
+ xv_path_util.o\
+ hist_list.o\
+ hist_menu.o\
+- fchsr_data.o\
+- flist_data.o\
+- path_data.o\
++ fchsr_data.o\
++ flist_data.o\
++ path_data.o\
+ hist_data.o
+
+
+ SRCS =\
+- file_chsr.c\
+- fc_layout.c\
+- file_list.c\
+- path.c\
+- xv_path_util.c\
+- hist_list.c\
+- hist_menu.c\
+- fchsr_data.c\
+- flist_data.c\
+- path_data.c\
++ file_chsr.c\
++ fc_layout.c\
++ file_list.c\
++ path.c\
++ xv_path_util.c\
++ hist_list.c\
++ hist_menu.c\
++ fchsr_data.c\
++ flist_data.c\
++ path_data.c\
+ hist_data.c
+
+ LIBTARGET = xview
diff --git a/x11/xview-lib/patches/patch-di b/x11/xview-lib/patches/patch-di
new file mode 100644
index 00000000000..63a70a71e40
--- /dev/null
+++ b/x11/xview-lib/patches/patch-di
@@ -0,0 +1,15 @@
+$NetBSD: patch-di,v 1.1 2001/12/20 09:20:06 tron Exp $
+
+--- lib/libxview/file_chooser/fc_layout.c.orig Tue Jun 29 07:17:55 1993
++++ lib/libxview/file_chooser/fc_layout.c Thu Dec 20 10:09:16 2001
+@@ -464,8 +464,8 @@
+
+ new_height
+ = (* private->exten_func)( FC_PUBLIC(private),
+- private->rect,
+- exten_rect,
++ &private->rect,
++ &exten_rect,
+ COLS(2),
+ private->rect.r_width - COLS(2),
+ max_height
diff --git a/x11/xview-lib/patches/patch-dj b/x11/xview-lib/patches/patch-dj
new file mode 100644
index 00000000000..9363f94d217
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dj
@@ -0,0 +1,82 @@
+$NetBSD: patch-dj,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/file_chooser/file_list.c.orig Tue Jun 29 07:17:56 1993
++++ lib/libxview/file_chooser/file_list.c Thu Dec 20 10:09:16 2001
+@@ -23,6 +23,9 @@
+ #include <xview_private/flist_impl.h>
+ #include <xview_private/portable.h>
+
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#include <regex.h>
++#endif
+
+
+ /* X bitmaps for default glyphs */
+@@ -41,6 +44,7 @@
+ static int flist_list_notify();
+ static int validate_new_directory();
+ static void flist_new_dir();
++static int flist_match_regex();
+
+ #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
+ static void flist_error(File_list_private *private, char *format, ...);
+@@ -521,7 +525,11 @@
+ if (status == DESTROY_CLEANUP) {
+ xv_free_ref( private->directory );
+ xv_free_ref( private->regex_pattern );
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ xv_free_ref( private->regex_compile );
++#else
++ xv_free_regex_t( (regex_t *)private->regex_compile );
++#endif
+ xv_free_ref( private->dotdot_string );
+ if ( private->dir_ptr )
+ (void) closedir( private->dir_ptr );
+@@ -1174,14 +1182,16 @@
+ static int step();
+ #endif /* SVR4 */
+
+-
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <regexp.h>
++#endif
+
+
+ static void
+ flist_compile_regex( private )
+ File_list_private *private;
+ {
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ char compile_buf[MAXPATHLEN+1];
+ char *end_ptr;
+ size_t num_bytes;
+@@ -1197,6 +1207,17 @@
+ xv_free_ref( private->regex_compile );
+ private->regex_compile = xv_alloc_n(char, num_bytes);
+ (void) XV_BCOPY(compile_buf, private->regex_compile, num_bytes);
++#else
++ regex_t *compile_buf = malloc(sizeof(regex_t));
++ if (compile_buf == NULL){
++ fprintf(stderr, "Couldn't allocate compile buffer\n");
++ exit(-1);
++ }
++ regcomp(compile_buf, private->regex_pattern, 0);
++ xv_free_regex_t((regex_t *)private->regex_compile);
++ private->regex_compile = (char *)compile_buf;
++#endif
++
+ }
+
+
+@@ -1205,7 +1226,11 @@
+ char *s;
+ File_list_private *private;
+ {
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ return step(s, private->regex_compile);
++#else
++ return !regexec((regex_t *)private->regex_compile, s, 0, NULL, 0);
++#endif
+ }
+
+ /****************************************************************************/
diff --git a/x11/xview-lib/patches/patch-dk b/x11/xview-lib/patches/patch-dk
new file mode 100644
index 00000000000..3b0b9d39aa9
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dk
@@ -0,0 +1,12 @@
+$NetBSD: patch-dk,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/file_chooser/xv_path_util.h.orig Sun Jun 26 03:05:20 1994
++++ lib/libxview/file_chooser/xv_path_util.h Thu Dec 20 10:09:16 2001
+@@ -41,6 +41,7 @@
+
+
+ #define xv_free_ref(str) {if((str)) {xv_free((str)); (str) = NULL;}}
++#define xv_free_regex_t(str) {if((str)) {regfree((str)); free ((str)); (str) = NULL;}}
+
+
+ EXTERN_FUNCTION(void xv_error_sprintf, (Frame frame, int use_footer, char *format, DOTDOTDOT) );
diff --git a/x11/xview-lib/patches/patch-dl b/x11/xview-lib/patches/patch-dl
new file mode 100644
index 00000000000..ae43c9adb17
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dl
@@ -0,0 +1,16 @@
+$NetBSD: patch-dl,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/notify/ndet.h.orig Tue Jun 29 07:18:12 1993
++++ lib/libxview/notify/ndet.h Thu Dec 20 10:09:16 2001
+@@ -17,6 +17,11 @@
+ #ifndef NDET_DEFINED
+ #define NDET_DEFINED
+
++#include <sys/param.h>
++#if (defined(BSD) && (BSD >= 199103))
++#include <signal.h>
++#endif
++
+ /*
+ ********************** Detector Loop Notes ****************************
+ Here is some notes on the detector loop:
diff --git a/x11/xview-lib/patches/patch-dm b/x11/xview-lib/patches/patch-dm
new file mode 100644
index 00000000000..fd257384cb5
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dm
@@ -0,0 +1,33 @@
+$NetBSD: patch-dm,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/notify/ndet_loop.c.orig Tue Jun 29 07:18:19 1993
++++ lib/libxview/notify/ndet_loop.c Thu Dec 20 10:09:16 2001
+@@ -14,13 +14,18 @@
+ * Ndet_loop.c - Notification loop.
+ */
+
++#include <sys/param.h>
+ #include <xview_private/i18n_impl.h>
+ #include <xview_private/ntfy.h>
+ #include <xview_private/ndet.h>
+ #include <xview_private/nint.h>
+ #include <xview_private/ndis.h> /* For ndis_dispatch */
+ #ifndef SVR4
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #else SVR4
+ #include <sys/syscall.h>
+ #include <sys/poll.h>
+@@ -224,7 +229,8 @@
+ * will return with an EINTR when a signal arrives while IN
+ * select, not ON THE WAY into select).
+ */
+-#ifndef SVR4
++
++#if !defined(SVR4) && !(defined(BSD) && (BSD >= 199103))
+ nfds = syscall(SYS_select,
+ FD_SETSIZE, &ibits, &obits, &ebits,
+ (sigisempty(&ndet_sigs_received)) ? timer : &ndet_polling_tv);
diff --git a/x11/xview-lib/patches/patch-dn b/x11/xview-lib/patches/patch-dn
new file mode 100644
index 00000000000..eb9c51939e9
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dn
@@ -0,0 +1,16 @@
+$NetBSD: patch-dn,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/notify/sys_fcntl.c.orig Tue Jun 29 07:18:17 1993
++++ lib/libxview/notify/sys_fcntl.c Thu Dec 20 10:09:16 2001
+@@ -15,7 +15,11 @@
+ */
+
+ #ifndef SVR4
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #else SVR4
+ #include <sys/syscall.h>
+ #endif SVR4
diff --git a/x11/xview-lib/patches/patch-do b/x11/xview-lib/patches/patch-do
new file mode 100644
index 00000000000..924a2474c34
--- /dev/null
+++ b/x11/xview-lib/patches/patch-do
@@ -0,0 +1,16 @@
+$NetBSD: patch-do,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/notify/sys_read.c.orig Tue Jun 29 07:18:01 1993
++++ lib/libxview/notify/sys_read.c Thu Dec 20 10:09:16 2001
+@@ -15,7 +15,11 @@
+ */
+
+ #ifndef SVR4
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #else SVR4
+ #include <sys/syscall.h>
+ #endif SVR4
diff --git a/x11/xview-lib/patches/patch-dp b/x11/xview-lib/patches/patch-dp
new file mode 100644
index 00000000000..7e68c7302fe
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dp
@@ -0,0 +1,16 @@
+$NetBSD: patch-dp,v 1.1 2001/12/20 09:20:07 tron Exp $
+
+--- lib/libxview/notify/sys_select.c.orig Tue Jun 29 07:18:11 1993
++++ lib/libxview/notify/sys_select.c Thu Dec 20 10:09:16 2001
+@@ -15,7 +15,11 @@
+ */
+
+ #ifndef SVR4
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #else SVR4
+ #include <values.h>
+ #include <sys/time.h>
diff --git a/x11/xview-lib/patches/patch-dq b/x11/xview-lib/patches/patch-dq
new file mode 100644
index 00000000000..742e3e68272
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dq
@@ -0,0 +1,45 @@
+$NetBSD: patch-dq,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ndet_fcntl.c.orig Tue Jun 29 07:18:03 1993
++++ lib/libxview/notify/ndet_fcntl.c Thu Dec 20 10:09:16 2001
+@@ -17,22 +17,39 @@
+
+ #include <xview_private/ntfy.h>
+ #include <xview_private/ndet.h>
++#include <sys/param.h>
+ #include <signal.h>
+ #include <fcntl.h>
+ #ifdef SVR4
+ #include <sys/file.h>
+ #endif SVR4
+-
++#if (defined(BSD) && (BSD >= 199103))
++#include <stdarg.h>
++#endif
+ extern int
+ #ifdef SVR4
+ xv_fcntl(fd, cmd, arg)
+ #else
++#if (defined(BSD) && (BSD >= 199103))
++fcntl(int fd, int cmd, ...)
++#else
+ fcntl(fd, cmd, arg)
++#endif
+ #endif SVR4
++#if !(defined(BSD) && (BSD >= 199103))
+ int fd, cmd, arg;
++#endif
+ {
+ fd_set bit;
+ int res;
++
++#if (defined(BSD) && (BSD >= 199103))
++ int arg;
++ va_list valist;
++ va_start(valist, cmd);
++ arg = va_arg(valist, int);
++ va_end(valist);
++#endif
+
+ /* Set fd bit */
+ FD_ZERO(&bit);
diff --git a/x11/xview-lib/patches/patch-dr b/x11/xview-lib/patches/patch-dr
new file mode 100644
index 00000000000..4122962e18f
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dr
@@ -0,0 +1,29 @@
+$NetBSD: patch-dr,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ndet_read.c.orig Tue Jun 29 07:18:04 1993
++++ lib/libxview/notify/ndet_read.c Thu Dec 20 10:09:16 2001
+@@ -15,6 +15,7 @@
+ * not already in the middle of it.
+ */
+
++#include <sys/param.h>
+ #include <xview_private/ntfy.h>
+ #include <xview_private/ndet.h>
+ #include <xview_private/ndis.h> /* For ndis_client == NTFY_CLIENT_NULL check */
+@@ -29,11 +30,16 @@
+
+ static Notify_client ndet_read_nclient = (Notify_client) & ndet_read_done;
+
++#if !(defined(BSD) && (BSD >= 199103))
+ extern int
+ read(fd, buf, nbytes)
+ register int fd;
+ char *buf;
+ int nbytes;
++#else
++extern int
++read(int fd, void *buf, size_t nbytes)
++#endif
+ {
+ int ndelay;
+ Notify_error return_code;
diff --git a/x11/xview-lib/patches/patch-ds b/x11/xview-lib/patches/patch-ds
new file mode 100644
index 00000000000..33618860b05
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ds
@@ -0,0 +1,38 @@
+$NetBSD: patch-ds,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ntfy.h.orig Tue Jun 29 07:18:14 1993
++++ lib/libxview/notify/ntfy.h Thu Dec 20 10:09:36 2001
+@@ -22,6 +22,10 @@
+ #include <sys/rusage.h>
+ #endif
+ #include <sys/resource.h>
++#if (defined(BSD) && (BSD >= 199103))
++#include <sys/wait.h>
++#include <sys/signal.h>
++#endif
+ #include <xview/notify.h>
+
+ /*
+@@ -149,7 +153,7 @@
+ */
+ typedef struct ntfy_wait3_data {
+ int pid; /* Process waiting for */
+-#ifndef SVR4
++#if !defined(SVR4) && !(defined(BSD) && (BSD >= 199103))
+ union wait status; /* Return value from wait3 */
+ #else SVR4
+ int status; /* Return value from wait3 */
+@@ -184,9 +188,12 @@
+ extern sigset_t ntfy_sigs_delayed;/* Bit mask of signals received while in
+ critical section */
+
+-#ifdef SVR4
++#if defined(SVR4)
+ #define sigisempty(s) (!(((s)->__sigbits[0]) | ((s)->__sigbits[1]) \
+ | ((s)->__sigbits[2]) | ((s)->__sigbits[3])))
++#elif defined(__NetBSD__) && (__NetBSD_Version__ > 103080000)
++#define sigisempty(s) (!(((s)->__bits[0]) | ((s)->__bits[1]) \
++ | ((s)->__bits[2]) | ((s)->__bits[3])))
+ #else
+ #define sigisempty(s) (!(*(s)))
+ #endif
diff --git a/x11/xview-lib/patches/patch-dt b/x11/xview-lib/patches/patch-dt
new file mode 100644
index 00000000000..b20401ce42f
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dt
@@ -0,0 +1,22 @@
+$NetBSD: patch-dt,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ntfy_test.c.orig Tue Jun 29 07:18:12 1993
++++ lib/libxview/notify/ntfy_test.c Thu Dec 20 10:09:16 2001
+@@ -989,7 +989,7 @@
+ fprintf(stderr, "%s in unknown destroy status\n", arg1);
+ goto Error;
+ }
+- if ((ne = notify_post_destroy(client, status)) != NOTIFY_OK) {
++ if ((ne = notify_post_destroy(client, status), NOTIFY_IMMEDIATE) != NOTIFY_OK) {
+ if (!(status == DESTROY_CHECKING &&
+ ne == NOTIFY_DESTROY_VETOED)) {
+ notify_perror("notify_destroy");
+@@ -1781,7 +1781,7 @@
+ }
+ /* Send only last client event */
+ if (*event_count_ptr > 0) {
+- (void) notify_event(nclient, *(events + (*event_count_ptr) - 1));
++ (void) notify_event(nclient, *(events + (*event_count_ptr) - 1), 0);
+ *event_count_ptr--;
+ }
+ /* Send fd 1 input */
diff --git a/x11/xview-lib/patches/patch-du b/x11/xview-lib/patches/patch-du
new file mode 100644
index 00000000000..9f61d292f6e
--- /dev/null
+++ b/x11/xview-lib/patches/patch-du
@@ -0,0 +1,63 @@
+$NetBSD: patch-du,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ntfyclient.c.orig Tue Jun 29 07:18:11 1993
++++ lib/libxview/notify/ntfyclient.c Thu Dec 20 10:09:16 2001
+@@ -18,7 +18,9 @@
+ #include <xview_private/ntfy.h>
+ #include <xview_private/ndis.h> /* For ndis_default_prioritizer */
+ #include <xview_private/ndet.h>
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <search.h>
++#endif
+ #include <xview_private/portable.h>
+
+ /* Variables used in paranoid enumerator (see ntfy_condition) */
+@@ -60,6 +62,7 @@
+ if (*client_latest && (*client_latest)->nclient == nclient)
+ return (*client_latest);
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ if(( client_list == ndet_clients ) && ndet_clients ) {
+ dummy_client.nclient = nclient;
+ /* Find client */
+@@ -73,7 +76,9 @@
+ return (client);
+ }
+ }
+-
++#else
++ if(0);
++#endif
+ else
+ /* Search entire list */
+ for (client = client_list; client; client = next) {
+@@ -100,6 +105,7 @@
+ register NTFY_CLIENT *client;
+ static NTFY_CLIENT *new_client;
+
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ if( client_list == &ndet_clients ) {
+ if( new_client == NTFY_CLIENT_NULL ) {
+ if ((new_client = ntfy_alloc_client()) == NTFY_CLIENT_NULL)
+@@ -119,7 +125,9 @@
+ else
+ return client;
+ }
+-
++#else
++ if(0);
++#endif
+ else if ((client = ntfy_find_nclient(*client_list, nclient,
+ client_latest)) != NTFY_CLIENT_NULL)
+ return client;
+@@ -163,8 +171,10 @@
+ ntfy_remove_condition(client, condition, who);
+ }
+ /* Remove & free client from client_list */
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ if( client_list == &ndet_clients )
+ tdelete( client, ndet_root, ndet_compar );
++#endif
+ ntfy_remove_node((NTFY_NODE **) client_list, (NTFY_NODE *) client);
+ /* Invalidate condition hint */
+ *client_latest = NTFY_CLIENT_NULL;
diff --git a/x11/xview-lib/patches/patch-dv b/x11/xview-lib/patches/patch-dv
new file mode 100644
index 00000000000..6ad06144492
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dv
@@ -0,0 +1,16 @@
+$NetBSD: patch-dv,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ndet_fd.c.orig Tue Jun 29 07:18:08 1993
++++ lib/libxview/notify/ndet_fd.c Thu Dec 20 10:09:23 2001
+@@ -27,8 +27,9 @@
+ #define GETDTABLESIZE() \
+ (dtablesize_cache?dtablesize_cache:(dtablesize_cache=(int)sysconf(_SC_OPEN_MAX)))
+ #else
+-#define GETDTABLESIZE() \
+- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
++#define GETDTABLESIZE() \
++ (dtablesize_cache ? dtablesize_cache : \
++ (dtablesize_cache = MIN(getdtablesize(), FD_SETSIZE)))
+ #endif SVR4
+
+ static int ndet_fd_table_size; /* Number of descriptor slots
diff --git a/x11/xview-lib/patches/patch-dw b/x11/xview-lib/patches/patch-dw
new file mode 100644
index 00000000000..f9f358d173b
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dw
@@ -0,0 +1,16 @@
+$NetBSD: patch-dw,v 1.1 2001/12/20 09:20:08 tron Exp $
+
+--- lib/libxview/notify/ndisdispch.c.orig Tue Jun 29 07:18:06 1993
++++ lib/libxview/notify/ndisdispch.c Thu Dec 20 10:09:27 2001
+@@ -30,8 +30,9 @@
+ #define GETDTABLESIZE() \
+ (dtablesize_cache?dtablesize_cache:(dtablesize_cache=(int)sysconf(_SC_OPEN_MAX)))
+ #else
+-#define GETDTABLESIZE() \
+- (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
++#define GETDTABLESIZE() \
++ (dtablesize_cache ? dtablesize_cache : \
++ (dtablesize_cache = MIN(getdtablesize(), FD_SETSIZE)))
+ #endif SVR4
+
+ pkg_private_data u_int ndis_flags = 0;
diff --git a/x11/xview-lib/patches/patch-dx b/x11/xview-lib/patches/patch-dx
new file mode 100644
index 00000000000..f535fffc14b
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dx
@@ -0,0 +1,15 @@
+$NetBSD: patch-dx,v 1.1 2001/12/20 09:20:09 tron Exp $
+
+--- lib/libolgx/ol_init.c.orig Tue Jun 29 07:18:28 1993
++++ lib/libolgx/ol_init.c Thu Dec 20 10:09:16 2001
+@@ -9,7 +9,10 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <sys/param.h>
++#if !(defined(BSD) && (BSD >= 199103))
+ #include <malloc.h>
++#endif
+ #include <X11/Xlib.h>
+ #include "olgx_impl.h"
+ #include "busy.h"
diff --git a/x11/xview-lib/patches/patch-dy b/x11/xview-lib/patches/patch-dy
new file mode 100644
index 00000000000..2c8914e35b8
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dy
@@ -0,0 +1,17 @@
+$NetBSD: patch-dy,v 1.1 2001/12/20 09:20:09 tron Exp $
+
+--- lib/libolgx/ol_sb.c.orig Tue Jun 29 07:18:29 1993
++++ lib/libolgx/ol_sb.c Thu Dec 20 10:09:16 2001
+@@ -11,7 +11,12 @@
+ */
+
+ #include <stdio.h>
++#include <sys/param.h>
++#if (defined(BSD) && (BSD >= 199103))
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include "olgx_impl.h"
diff --git a/x11/xview-lib/patches/patch-dz b/x11/xview-lib/patches/patch-dz
new file mode 100644
index 00000000000..f6cfa937d6e
--- /dev/null
+++ b/x11/xview-lib/patches/patch-dz
@@ -0,0 +1,15 @@
+$NetBSD: patch-dz,v 1.1 2001/12/20 09:20:09 tron Exp $
+
+--- lib/pixrect/Imakefile.orig Tue Jun 29 07:18:39 1993
++++ lib/pixrect/Imakefile Thu Dec 20 10:09:16 2001
+@@ -41,8 +41,8 @@
+ all::
+
+ #if InstallPixrectHeaders
+-BuildIncludes($(HEADERS),$(PIXRECT_INCDIR),/**/)
+-BuildIncludes($(HEADERS2),$(INCDIR),/**/)
++BuildIncludes($(HEADERS),$(PIXRECT_INCDIR),.)
++BuildIncludes($(HEADERS2),$(INCDIR),.)
+
+ install::
+ $(MKDIRHIER) $(PIXRECT_HEADER_DEST)
diff --git a/x11/xview-lib/patches/patch-ea b/x11/xview-lib/patches/patch-ea
new file mode 100644
index 00000000000..19329ba197d
--- /dev/null
+++ b/x11/xview-lib/patches/patch-ea
@@ -0,0 +1,14 @@
+$NetBSD: patch-ea,v 1.1 2001/12/20 09:20:09 tron Exp $
+
+--- misc/support/Imakefile.orig Tue Jun 29 07:14:23 1993
++++ misc/support/Imakefile Thu Dec 20 10:09:31 2001
+@@ -5,8 +5,7 @@
+ /**/# Imakefile for misc/support files.
+
+ SUPPORTFILES = text_extras_menu textswrc ttyswrc
+-INFOFILES = textsw.info ttysw.info xview.info clock.info olwm.info props.info \
+- textedit.info
++INFOFILES = textsw.info ttysw.info xview.info props.info textedit.info
+
+ ALLFILES = $(SUPPORTFILES) $(INFOFILES)
+
diff --git a/x11/xview-lib/patches/patch-eb b/x11/xview-lib/patches/patch-eb
new file mode 100644
index 00000000000..c27760603f3
--- /dev/null
+++ b/x11/xview-lib/patches/patch-eb
@@ -0,0 +1,13 @@
+$NetBSD: patch-eb,v 1.1 2001/12/20 09:20:09 tron Exp $
+
+--- util/Imakefile.orig Tue Jun 29 07:14:22 1993
++++ util/Imakefile Thu Dec 20 10:10:14 2001
+@@ -16,7 +16,7 @@
+
+ CONV_DIR = conversion
+
+-MSG_UTIL = xgettext msgfmt
++#MSG_UTIL = xgettext msgfmt
+
+ SUBDIRS = $(CPP_DIR) $(SOELIM_DIR) $(CONV_DIR) $(MSG_UTIL)
+