Unbreak package by culling extern declarations doubling as function

prototypes. Since NetBSD headers have moved to #including what they
reference, <string.h> is everywhere, which turns the externs from
annoying into harmful.
This commit is contained in:
hauke 2017-12-12 20:42:41 +00:00
parent 1d67c4fbf2
commit cbccace970
10 changed files with 126 additions and 71 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.21 2017/03/23 17:07:02 joerg Exp $
$NetBSD: distinfo,v 1.22 2017/12/12 20:42:41 hauke Exp $
SHA1 (xview3.2p1-X11R6.tar.gz) = 1cd04231b893c3e6c70b56791d527b498e21a27a
RMD160 (xview3.2p1-X11R6.tar.gz) = 2f21b14cb088aec887683bbc6d4ed9a3bc3fe2bb
@ -14,7 +14,7 @@ SHA1 (patch-ag) = 24d23c77937bffc82a3586730bcd4d2abd20ed39
SHA1 (patch-ah) = b873b369ea8b6bf5672efb36b0633f1db78f06fa
SHA1 (patch-ai) = bfa9b69f5597624ec1f00e05b5c96b653f6504ab
SHA1 (patch-aj) = a26a6b141a4252bbe6e305a58768ba33a5ba4461
SHA1 (patch-ak) = a3298d27c26a1070eb0c2b92c9ab97d769e1f4a8
SHA1 (patch-ak) = 760d95299ee335b11d50f380066b628123ad7661
SHA1 (patch-al) = 3242c906bdd3f6951b891e17b8f3d02893afbe5a
SHA1 (patch-am) = f578d0e77d11a14e58d560011b84fccd3d9bd51e
SHA1 (patch-an) = b4243008a3158d787ec7263291f3b59d43b18f36
@ -62,15 +62,15 @@ SHA1 (patch-cc) = 419827081d5c667d02ec7edf6cc7aaec712370cd
SHA1 (patch-cd) = 9e93666c7388a7de7015f0e809325223c0523214
SHA1 (patch-ce) = c7afce4243e2f6322d4a5450d0c88d83b6b194f2
SHA1 (patch-cf) = 051ac2e4f9882b1a799de25e37ea8ae950028ef1
SHA1 (patch-cg) = 11b99148834d032a50e85ad8ed703516321d580a
SHA1 (patch-cg) = 020bbe752a51daf082aac7a3732a72e929dfbab0
SHA1 (patch-ch) = 0cf7084abf39f4beed8236eb1bb32f57facec6d2
SHA1 (patch-ci) = 665e59cc11e47565968387e2ad91a6918965a7db
SHA1 (patch-cj) = 5a0cbf2029492e68899cbe74ce32892ae497a343
SHA1 (patch-cj) = b6547ef9a91ceed457223887f4ba459472055118
SHA1 (patch-ck) = f470d31bad573e1041fa55e004276738a0ca83ca
SHA1 (patch-cl) = 129838e7ab4786794bfb88f43a5a13b1c47bf5a6
SHA1 (patch-cm) = c83fab28009da4a7db750dbf9ca28f1e737797a8
SHA1 (patch-cm) = e48e542c1bff4ebc3eeb15c184eb9acf00509d3e
SHA1 (patch-cn) = c569c5ea7fdc13e90e320eaa99d935a8272cafe4
SHA1 (patch-co) = 46a1845f95e8b30c982e165a5d9c8a803ff996cc
SHA1 (patch-co) = 8296f3f9de6ef2dbe8ff7394cf8fbbec3340caff
SHA1 (patch-cp) = 093e6381788c44c09d9eaa7077747918b79a5da8
SHA1 (patch-cq) = 58b7904d1a4d98e77a9af609873c987ed4345b89
SHA1 (patch-cr) = 4077f858fcad7c4949455a4c38588a8435f802c7
@ -78,9 +78,9 @@ SHA1 (patch-cs) = 93f4b4e7c623d83d5722cff996349b3a67a71d2b
SHA1 (patch-ct) = 8ceafeae951776b3dca9fb95a430972f0d76989d
SHA1 (patch-cu) = 6f5a5cef1af7618d819ad5a0e35c5b003ac4ddcf
SHA1 (patch-cv) = 2c35f611141747144b84e83636c32eaf428d0770
SHA1 (patch-cw) = fe33ed25d5c106610cce53b956c4c2ca2e5ba9f9
SHA1 (patch-cw) = 1701e0f0034c8cad61815a4af21396c5061cb756
SHA1 (patch-cx) = c075412084b243f884a1039e90c55825b81d676c
SHA1 (patch-cy) = 6eec35d5b9db6bfeeb60c16db242b1b3e18916ff
SHA1 (patch-cy) = ef34a84b81f597f917e9cf2ec50917d8b26d54f6
SHA1 (patch-cz) = 9120a99da1f6fd8cf18e4da4f012824b31644637
SHA1 (patch-da) = 5bd56d13c9519aaf953bfe1dcfb1ddd4d77cd157
SHA1 (patch-db) = 42b80dd6e320205e6216f9b6a59bb510845e9c97
@ -131,7 +131,7 @@ SHA1 (patch-fd) = e372748f2356eef16b8166578f206b5494147647
SHA1 (patch-fe) = ec183923b68cf934e7edcadd1f1f85fd65669244
SHA1 (patch-ff) = b0ac27bb261fb06bf88b4d970c18466149809816
SHA1 (patch-fg) = 05c3b924b18df5a36596a242f54cd2b7fea4ec66
SHA1 (patch-fh) = 6a933d844818a57b448ef9fdd373d03a14ba961a
SHA1 (patch-fh) = 14d8ab23ec1b123642c54ee66919a5dca4a131eb
SHA1 (patch-fi) = 64d0d60dc3fbccb735c60183303bfb4e2f3e744a
SHA1 (patch-fj) = e97c787c1ae6bf32a4f97124852c454fab431378
SHA1 (patch-fk) = 48df22f42bc1f642f4e1b6731ea2645495109bba
@ -155,6 +155,7 @@ SHA1 (patch-lib_libxview_server_svr__parse.c) = d1ec2e51445dbfe377ed9337d6391c15
SHA1 (patch-lib_libxview_textsw_txt__find.c) = 37e82f38b51c5c202bb71fadd2155eb752e90791
SHA1 (patch-lib_libxview_textsw_txt__sel.c) = c2bd1479518a32a3b09fefb33ae08c571f47404d
SHA1 (patch-lib_libxview_ttysw_tty__menu.c) = 4c42ff022329bc4e640b2b0cb193ec85afc0ae1c
SHA1 (patch-lib_libxview_ttysw_ttytl.c) = d0167b406d817116e97262cfc78f696864bc435b
SHA1 (patch-lib_libxview_win_win__global.c) = f806ec4200f627d26f559d26caaed34961fedc79
SHA1 (patch-lib_libxview_window_window__cms.c) = 255186370b317bbcb6efc5ef7ed23f570b114912
SHA1 (patch-lib_libxview_window_windowutil.c) = 64a2c5fbf04af54d0689b15af40473b093072afa

View file

@ -1,8 +1,16 @@
$NetBSD: patch-ak,v 1.4 2012/11/16 00:29:39 joerg Exp $
$NetBSD: patch-ak,v 1.5 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/font/font.c.orig 1993-06-29 05:15:01.000000000 +0000
+++ lib/libxview/font/font.c
@@ -67,6 +67,10 @@ Xv_private char *xv_font_regular_cmdline
@@ -33,7 +33,6 @@ static char sccsid[] = "@(#)font.c 2
extern Pixfont *xv_pf_sys;
extern char *defaults_get_string();
-extern char *strcpy();
extern Xv_opaque xv_default_server;
extern Display *xv_default_display;
@@ -67,6 +66,10 @@ Xv_private char *xv_font_regular_cmdline
Xv_private char *xv_font_scale_cmdline();
Xv_private char *xv_font_scale();
@ -13,7 +21,7 @@ $NetBSD: patch-ak,v 1.4 2012/11/16 00:29:39 joerg Exp $
/*
* delimiters
*/
@@ -144,7 +148,7 @@ static char *font_strip_name();
@@ -144,7 +147,7 @@ static char *font_strip_name();
static int font_delim_count();
static XID font_try_misc_name();
static Font_locale_info *find_font_locale_info();
@ -22,7 +30,7 @@ $NetBSD: patch-ak,v 1.4 2012/11/16 00:29:39 joerg Exp $
static int font_setup_known_styles();
static void font_init_known_families();
static void font_init_known_styles();
@@ -3315,7 +3319,7 @@ Font_locale_info *linfo;
@@ -3315,7 +3318,7 @@ Font_locale_info *linfo;
}

View file

@ -1,8 +1,8 @@
$NetBSD: patch-cg,v 1.2 2009/12/10 20:35:57 abs Exp $
$NetBSD: patch-cg,v 1.3 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/ttysw/cim_change.c.orig 1993-06-29 05:17:12.000000000 +0000
+++ lib/libxview/ttysw/cim_change.c
@@ -17,10 +17,10 @@ static char sccsid[] = "@(#)cim_chan
@@ -17,15 +17,13 @@ static char sccsid[] = "@(#)cim_chan
#include <xview_private/i18n_impl.h>
#include <sys/types.h>
#include <pixrect/pixrect.h>
@ -14,3 +14,8 @@ $NetBSD: patch-cg,v 1.2 2009/12/10 20:35:57 abs Exp $
char boldify;
-extern char *strcpy();
-
/* static */ void ttysw_roll();
static void reverse();
/* static */ void ttysw_swap();

View file

@ -1,4 +1,4 @@
$NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
$NetBSD: patch-cj,v 1.4 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/ttysw/tty_init.c.orig 1993-06-29 05:17:19.000000000 +0000
+++ lib/libxview/ttysw/tty_init.c
@ -10,10 +10,12 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -82,7 +83,11 @@ static char sccsid[] = "@(#)tty_init
@@ -80,9 +81,11 @@ static char sccsid[] = "@(#)tty_init
#endif
extern char *strncpy();
extern char *strcpy();
-extern char *strncpy();
-extern char *strcpy();
+#if (defined(BSD) && (BSD >= 199306))
+extern off_t lseek();
+#else
@ -22,7 +24,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
char *textsw_checkpoint_undo();
/* static */ void ttysw_parseargs();
@@ -106,6 +111,7 @@ Xv_private char *xv_font_monospace();
@@ -106,6 +109,7 @@ Xv_private char *xv_font_monospace();
extern int ttysel_use_seln_service;
@ -30,7 +32,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
struct ttysw_createoptions {
int becomeconsole; /* be the console */
@@ -432,10 +438,8 @@ ttysw_fork_it(ttysw0, argv, wfd)
@@ -432,10 +436,8 @@ ttysw_fork_it(ttysw0, argv, wfd)
char appname[20];
char *p;
unsigned ttysw_error_sleep = 1;
@ -42,7 +44,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
extern char *ptsname();
#define BSD_TTY_COMPAT /* yank this if csh ever gets ported properly */
@@ -461,27 +465,6 @@ ttysw_fork_it(ttysw0, argv, wfd)
@@ -461,27 +463,6 @@ ttysw_fork_it(ttysw0, argv, wfd)
}
/* Set up the child characteristics */
@ -70,7 +72,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
vec.sa_handler = SIG_DFL;
sigemptyset(&vec.sa_mask);
vec.sa_flags = SA_RESTART;
@@ -497,13 +480,19 @@ ttysw_fork_it(ttysw0, argv, wfd)
@@ -497,13 +478,19 @@ ttysw_fork_it(ttysw0, argv, wfd)
vec.sa_flags = SA_RESTART;
sigaction(SIGTTOU, &vec, &ovec);
@ -91,7 +93,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
/*
* Initialize file descriptors. Connections to servers are marked as
@@ -518,6 +507,9 @@ ttysw_fork_it(ttysw0, argv, wfd)
@@ -518,6 +505,9 @@ ttysw_fork_it(ttysw0, argv, wfd)
(void) dup2(ttysw->ttysw_tty, 2);
(void) close(ttysw->ttysw_tty);
@ -101,7 +103,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
if (*argv == (char *) NULL || strcmp("-c", *argv) == 0) {
/* Process arg list */
int argc;
@@ -955,7 +947,11 @@ updateutmp(username, ttyslotuse, ttyfd)
@@ -955,7 +945,11 @@ updateutmp(username, ttyslotuse, ttyfd)
struct utmpx utmp;
#endif
struct passwd *passwdent;
@ -113,7 +115,7 @@ $NetBSD: patch-cj,v 1.3 2009/12/10 20:35:57 abs Exp $
int f;
char *ttyn;
extern char *ttyname();
@@ -1007,13 +1003,22 @@ updateutmp(username, ttyslotuse, ttyfd)
@@ -1007,13 +1001,22 @@ updateutmp(username, ttyslotuse, ttyfd)
XV_MSG("Add tty[qrs][0-f] to /etc/ttys file.\n"));
return (0);
}

View file

@ -1,15 +1,16 @@
$NetBSD: patch-cm,v 1.2 2009/12/10 20:35:57 abs Exp $
$NetBSD: patch-cm,v 1.3 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/ttysw/ttyansi.c.orig 1993-06-29 05:17:21.000000000 +0000
+++ lib/libxview/ttysw/ttyansi.c
@@ -31,6 +31,10 @@ static char sccsid[] = "@(#)ttyansi.
@@ -31,7 +31,10 @@ static char sccsid[] = "@(#)ttyansi.
#include <xview/sel_attrs.h>
-char *strncpy();
+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();

View file

@ -1,8 +1,17 @@
$NetBSD: patch-co,v 1.3 2009/12/10 20:35:57 abs Exp $
$NetBSD: patch-co,v 1.4 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/ttysw/tty_mapkey.c.orig 1993-06-29 05:17:20.000000000 +0000
+++ lib/libxview/ttysw/tty_mapkey.c
@@ -500,7 +500,7 @@ ttysw_remove_caps(label, label_ptr)
@@ -34,8 +34,6 @@ static char sccsid[] = "@(#)tty_mapk
extern Notify_error win_post_event();
extern char *getenv();
-extern char *strcpy();
-extern char *strcat();
/* static routines */
@@ -500,7 +498,7 @@ ttysw_remove_caps(label, label_ptr)
* have more time.
*/

View file

@ -1,8 +1,12 @@
$NetBSD: patch-cw,v 1.5 2012/11/16 00:29:40 joerg Exp $
$NetBSD: patch-cw,v 1.6 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/textsw/txt_again.c.orig 1993-06-29 05:17:32.000000000 +0000
+++ lib/libxview/textsw/txt_again.c
@@ -28,6 +28,8 @@ Pkg_private CHAR *STRNCPY();
@@ -24,10 +24,11 @@ static char sccsid[] = "@(#)txt_agai
#include <string.h>
#endif /* SVR4 */
-Pkg_private CHAR *STRNCPY();
Pkg_private Es_index textsw_do_input();
Pkg_private Es_index textsw_do_pending_delete();
@ -11,7 +15,7 @@ $NetBSD: patch-cw,v 1.5 2012/11/16 00:29:40 joerg Exp $
string_t null_string = {0, 0, 0};
#define TEXT_DELIMITER "\\"
@@ -182,6 +184,7 @@ textsw_string_min_free(ptr_to_string, mi
@@ -182,6 +183,7 @@ textsw_string_min_free(ptr_to_string, mi
* Following is stolen from 3.2ALPHA sprintf(str, fmt, va_alist) SIDE_EFFECT:
* TXTSW_STRING_FREE(ptr_to_string) is modified by this routine.
*/
@ -19,7 +23,7 @@ $NetBSD: patch-cw,v 1.5 2012/11/16 00:29:40 joerg Exp $
#ifndef SVR4
/* VARARGS2 */
@@ -325,6 +328,46 @@ va_dcl
@@ -325,6 +327,46 @@ va_dcl
#endif /* SVR4 */
@ -66,7 +70,7 @@ $NetBSD: patch-cw,v 1.5 2012/11/16 00:29:40 joerg Exp $
static void
textsw_record_buf(again, buffer, buffer_length)
register string_t *again;
@@ -619,6 +662,8 @@ textsw_record_trash_insert(textsw)
@@ -619,6 +661,8 @@ textsw_record_trash_insert(textsw)
*/
/* VARARGS2 */
@ -75,7 +79,7 @@ $NetBSD: patch-cw,v 1.5 2012/11/16 00:29:40 joerg Exp $
static int
#ifdef ANSI_FUNC_PROTO
textsw_scanf(register string_t *ptr_to_string, register char *fmt, ...)
@@ -705,6 +750,57 @@ va_dcl
@@ -705,6 +749,57 @@ va_dcl
#endif /* OW_I18N */
}
@ -133,7 +137,7 @@ $NetBSD: patch-cw,v 1.5 2012/11/16 00:29:40 joerg Exp $
static int
textsw_next_is_delimiter(again)
@@ -848,7 +944,7 @@ textsw_get_recorded_x(view)
@@ -848,7 +943,7 @@ textsw_get_recorded_x(view)
int found_it_already = FALSE;
if (!TXTSW_DO_AGAIN(folio))

View file

@ -1,4 +1,4 @@
$NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
$NetBSD: patch-cy,v 1.6 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/textsw/txt_file.c.orig 1993-06-29 05:17:48.000000000 +0000
+++ lib/libxview/textsw/txt_file.c
@ -10,12 +10,13 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
#ifdef SVR4
#include <dirent.h>
#include <string.h>
@@ -45,13 +46,27 @@ static char sccsid[] = "@(#)txt_file
@@ -43,15 +44,26 @@ static char sccsid[] = "@(#)txt_file
if ((unsigned)(to_test) != 0) (flags) |= (flag); \
else (flags) &= ~(flag)
extern CHAR *STRCAT();
extern CHAR *STRNCAT();
-extern CHAR *STRCAT();
-extern CHAR *STRNCAT();
-#ifdef SVR4
+
+#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000)) || defined(__DragonFly__)
+#define GETCWD
+#endif
@ -40,7 +41,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
Pkg_private int textsw_change_directory();
Pkg_private void textsw_display(), textsw_display_view_margins();
@@ -314,7 +329,11 @@ textsw_load_selection(folio, locx, locy,
@@ -314,7 +326,11 @@ textsw_load_selection(folio, locx, locy,
register int locx, locy;
int no_cd;
{
@ -52,7 +53,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
register int result;
if (textsw_get_selection_as_filename(
@@ -354,21 +373,21 @@ textsw_full_pathname(name)
@@ -354,21 +370,21 @@ textsw_full_pathname(name)
}
#ifdef OW_I18N
@ -78,7 +79,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
return (0);
#endif /* OW_I18N */
@@ -459,8 +478,13 @@ textsw_load_file(abstract, filename, res
@@ -459,8 +475,13 @@ textsw_load_file(abstract, filename, res
int reset_views;
int locx, locy;
{
@ -92,7 +93,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
int result;
Es_status status;
Es_handle new_esh;
@@ -546,7 +570,11 @@ textsw_load_file_quietly(abstract, filen
@@ -546,7 +567,11 @@ textsw_load_file_quietly(abstract, filen
int reset_views;
int locx, locy;
{
@ -104,7 +105,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
Es_status status;
Es_handle new_esh;
Es_index start_at;
@@ -587,7 +615,11 @@ textsw_save_store_common(folio, output_n
@@ -587,7 +612,11 @@ textsw_save_store_common(folio, output_n
CHAR *output_name;
int reload;
{
@ -116,7 +117,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
Es_handle new_esh;
register Es_handle output;
Es_status result;
@@ -604,9 +636,16 @@ textsw_save_store_common(folio, output_n
@@ -604,9 +633,16 @@ textsw_save_store_common(folio, output_n
es_destroy(output);
if (folio->checkpoint_name) {
#ifdef OW_I18N
@ -133,7 +134,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if (unlink(temp_mb) == -1) { /* } for match */
#else
if (unlink(folio->checkpoint_name) == -1) {
@@ -733,7 +772,11 @@ textsw_save_internal(folio, error_buf, l
@@ -733,7 +769,11 @@ textsw_save_internal(folio, error_buf, l
int locx, locy; /* Currently unused */
{
Pkg_private Es_handle es_file_make_backup();
@ -145,7 +146,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
register char *msg;
Es_handle backup, original = ES_NULL;
int status;
@@ -826,10 +869,16 @@ Was the file edited with another editor?
@@ -826,10 +866,16 @@ Was the file edited with another editor?
textsw_save_store_common(folio, original_name, RELOAD)) {
case ES_SUCCESS: {
#ifdef OW_I18N
@ -162,7 +163,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
(void) es_destroy(original);
textsw_notify(folio->first_view,
#ifdef OW_I18N
@@ -868,7 +917,11 @@ textsw_save(abstract, locx, locy)
@@ -868,7 +914,11 @@ textsw_save(abstract, locx, locy)
Textsw abstract;
int locx, locy;
{
@ -174,7 +175,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
Es_status status;
Textsw_view_handle view = VIEW_ABS_TO_REP(abstract);
@@ -964,12 +1017,16 @@ textsw_get_from_fd(view, fd, print_error
@@ -964,12 +1014,16 @@ textsw_get_from_fd(view, fd, print_error
return (result);
}
@ -192,7 +193,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if (0 == textsw_get_selection_as_filename(
textsw, buf, SIZEOF(buf), locx, locy)) {
@@ -988,15 +1045,27 @@ textsw_get_from_file(view, filename, pri
@@ -988,15 +1042,27 @@ textsw_get_from_file(view, filename, pri
int fd;
Es_status status;
Textsw_status result = TEXTSW_STATUS_CANNOT_INSERT_FROM_FILE;
@ -220,7 +221,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if ((fd = open(buf_mb, 0)) >= 0) { /* } for match */
textsw_implicit_commit(folio);
#else
@@ -1027,16 +1096,22 @@ textsw_get_from_file(view, filename, pri
@@ -1027,16 +1093,22 @@ textsw_get_from_file(view, filename, pri
}
@ -244,7 +245,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
char *notice_msg2;
Es_status status;
int cannot_open = 0;
@@ -1047,9 +1122,15 @@ textsw_file_stuff(view, locx, locy)
@@ -1047,9 +1119,15 @@ textsw_file_stuff(view, locx, locy)
if (0 == textsw_get_selection_as_filename(
folio, buf, SIZEOF(buf), locx, locy)) {
#ifdef OW_I18N
@ -260,7 +261,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if ((fd = open(buf_mb, 0)) < 0) { /* } for match */
#else
if ((fd = open(buf, 0)) < 0) {
@@ -1141,8 +1222,13 @@ textsw_file_stuff_from_str(view, buf, lo
@@ -1141,8 +1219,13 @@ textsw_file_stuff_from_str(view, buf, lo
{
Textsw_folio folio = FOLIO_FOR_VIEW(view);
int fd;
@ -274,7 +275,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
char *notice_msg2;
Es_status status;
int cannot_open = 0;
@@ -1150,9 +1236,15 @@ textsw_file_stuff_from_str(view, buf, lo
@@ -1150,9 +1233,15 @@ textsw_file_stuff_from_str(view, buf, lo
Xv_Notice text_notice;
Frame frame;
#ifdef OW_I18N
@ -290,7 +291,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if ((fd = open(buf_mb, 0)) < 0) { /* } for match */
#else
if ((fd = open(buf, 0)) < 0) {
@@ -1245,9 +1337,15 @@ textsw_store_init(textsw, filename)
@@ -1245,9 +1334,15 @@ textsw_store_init(textsw, filename)
{
struct stat stat_buf;
#ifdef OW_I18N
@ -306,7 +307,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if (stat(filename_mb, &stat_buf) == 0) { /* } for match */
#else
if (stat(filename, &stat_buf) == 0) {
@@ -1310,10 +1408,16 @@ textsw_process_store_error(textsw, filen
@@ -1310,10 +1405,16 @@ textsw_process_store_error(textsw, filen
case ES_CANNOT_OVERWRITE:
#ifdef OW_I18N
{
@ -323,7 +324,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
frame = FRAME_FROM_FOLIO_OR_VIEW(textsw);
text_notice = (Xv_Notice)xv_get(frame,
XV_KEY_DATA, text_notice_key,
@@ -1465,9 +1569,12 @@ textsw_store_file_internal(abstract, fil
@@ -1465,9 +1566,12 @@ textsw_store_file_internal(abstract, fil
if (status == ES_SUCCESS) {
if (textsw->state & TXTSW_STORE_CHANGES_FILE) {
#ifdef OW_I18N
@ -338,7 +339,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
textsw_notify(textsw->first_view,
TEXTSW_ACTION_LOADED_FILE, filename_mbs,
TEXTSW_ACTION_LOADED_FILE_WCS, filename, 0);
@@ -1491,9 +1598,15 @@ textsw_store_file(abstract, filename, lo
@@ -1491,9 +1595,15 @@ textsw_store_file(abstract, filename, lo
int locx, locy;
{
#ifdef OW_I18N
@ -354,7 +355,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
return (textsw_store_file_internal(abstract, filename_wcs, locx, locy));
#else
return (textsw_store_file_internal(abstract, filename, locx, locy));
@@ -1516,7 +1629,11 @@ textsw_store_to_selection(textsw, locx,
@@ -1516,7 +1626,11 @@ textsw_store_to_selection(textsw, locx,
Textsw_folio textsw;
int locx, locy;
{
@ -366,7 +367,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
if (textsw_get_selection_as_filename(
textsw, filename, SIZEOF(filename), locx, locy))
@@ -1545,11 +1662,19 @@ textsw_reset_2(abstract, locx, locy, pre
@@ -1545,11 +1659,19 @@ textsw_reset_2(abstract, locx, locy, pre
#endif /* SVR4 */
Pkg_private Es_handle es_mem_create();
Es_handle piece_esh, old_original_esh, new_original_esh;
@ -388,7 +389,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
#endif
int status;
Textsw_folio folio = FOLIO_FOR_VIEW(VIEW_ABS_TO_REP(abstract));
@@ -1591,7 +1716,11 @@ textsw_reset_2(abstract, locx, locy, pre
@@ -1591,7 +1713,11 @@ textsw_reset_2(abstract, locx, locy, pre
(char *) window_get(abstract, TEXTSW_TEMP_FILENAME);
if (temp_name)
#ifdef OW_I18N
@ -400,7 +401,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
#else
(void) STRCPY(save_name, temp_name);
#endif
@@ -2150,7 +2279,11 @@ textsw_post_error(folio_or_view, locx, l
@@ -2150,7 +2276,11 @@ textsw_post_error(folio_or_view, locx, l
int locx, locy; /* Unused */
char *msg1, *msg2;
{
@ -412,7 +413,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
int size_to_use = sizeof(buf);
Frame frame;
Xv_Notice text_notice;
@@ -2226,8 +2359,13 @@ textsw_change_directory(textsw, filename
@@ -2226,8 +2356,13 @@ textsw_change_directory(textsw, filename
CHAR *full_pathname_wc;
char filename[MAXPATHLEN];
#endif
@ -426,7 +427,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
struct stat stat_buf;
int result = 0;
int notice_result;
@@ -2402,8 +2540,13 @@ textsw_checkpoint_internal(folio)
@@ -2402,8 +2537,13 @@ textsw_checkpoint_internal(folio)
CHAR *name;
if (textsw_file_name(folio, &name) != 0)
return (ES_CANNOT_GET_NAME);
@ -440,7 +441,7 @@ $NetBSD: patch-cy,v 1.5 2012/11/16 00:29:40 joerg Exp $
#ifdef OW_I18N
(void) SPRINTF(folio->checkpoint_name, "%ws%%%%", name);
#else
@@ -2773,7 +2916,11 @@ textsw_invalid_data_notice(view, filenam
@@ -2773,7 +2913,11 @@ textsw_invalid_data_notice(view, filenam
int flag;
{
Xv_Notice text_notice;

View file

@ -1,8 +1,17 @@
$NetBSD: patch-fh,v 1.2 2009/12/10 20:35:58 abs Exp $
$NetBSD: patch-fh,v 1.3 2017/12/12 20:42:41 hauke Exp $
--- lib/libxview/textsw/es_mem.c.orig 1993-06-29 05:17:30.000000000 +0000
+++ lib/libxview/textsw/es_mem.c
@@ -117,7 +117,7 @@ es_mem_destroy(esh)
@@ -36,8 +36,6 @@ typedef struct es_mem_text {
typedef Es_mem_text *Es_mem_data;
#define ABS_TO_REP(esh) (Es_mem_data)esh->data
-extern CHAR *STRNCPY();
-
Pkg_private Es_handle es_mem_create();
static Es_status es_mem_commit();
static Es_handle es_mem_destroy();
@@ -117,7 +115,7 @@ es_mem_destroy(esh)
}
/* ARGSUSED */

View file

@ -0,0 +1,15 @@
$NetBSD: patch-lib_libxview_ttysw_ttytl.c,v 1.1 2017/12/12 20:42:41 hauke Exp $
Nuke harmful K&R style prototype for library function.
--- lib/libxview/ttysw/ttytl.c.orig 1993-06-29 05:17:12.000000000 +0000
+++ lib/libxview/ttysw/ttytl.c
@@ -35,8 +35,6 @@ static char sccsid[] = "@(#)ttytl.c
#include <xview_private/term_impl.h>
#include <xview_private/charscreen.h>
-extern char *strncpy();
-
/* BUG ALERT: This entire procedure should be rewritten! */
/* BUG ALERT: No XView prefix */