head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.68 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.66 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.64 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.62 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.6.0.60 pkgsrc-2025Q1-base:1.6 pkgsrc-2024Q4:1.6.0.58 pkgsrc-2024Q4-base:1.6 pkgsrc-2024Q3:1.6.0.56 pkgsrc-2024Q3-base:1.6 pkgsrc-2024Q2:1.6.0.54 pkgsrc-2024Q2-base:1.6 pkgsrc-2024Q1:1.6.0.52 pkgsrc-2024Q1-base:1.6 pkgsrc-2023Q4:1.6.0.50 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.6.0.48 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.6.0.46 pkgsrc-2023Q2-base:1.6 pkgsrc-2023Q1:1.6.0.44 pkgsrc-2023Q1-base:1.6 pkgsrc-2022Q4:1.6.0.42 pkgsrc-2022Q4-base:1.6 pkgsrc-2022Q3:1.6.0.40 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.38 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.36 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.34 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.32 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.30 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.28 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.26 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.24 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.22 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.18 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.20 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.16 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.14 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.12 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.10 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.8 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.6 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.4 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.2 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.5.0.42 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.38 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.36 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.34 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.32 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.5.0.30 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.28 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.26 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.24 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.22 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.20 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.18 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.16 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.5.0.14 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.12 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.10 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.8 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.6 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.4 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.2 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.4.0.24 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.22 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.20 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.18 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.16 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.14 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.12 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.10 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.8 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.6 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.4 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.2 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.3.0.34 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.32 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.30 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.28 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.26 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.24 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.22 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.20 pkgsrc-2008Q1:1.3.0.18 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.16 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.14 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.12 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.10 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.8 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.6 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.4 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.2 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.2.0.10 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.8 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.6 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.4 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.2 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.1.0.16 pkgsrc-2004Q3-base:1.1 pkgsrc-2004Q2:1.1.0.14 pkgsrc-2004Q2-base:1.1 pkgsrc-2004Q1:1.1.0.12 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1; locks; strict; comment @# @; 1.6 date 2017.12.12.20.42.41; author hauke; state Exp; branches; next 1.5; commitid 1TZtWK96CxwrXDiA; 1.5 date 2012.11.16.00.29.40; author joerg; state Exp; branches; next 1.4; 1.4 date 2009.12.10.20.35.57; author abs; state Exp; branches; next 1.3; 1.3 date 2006.01.05.18.25.57; author joerg; state Exp; branches; next 1.2; 1.2 date 2004.09.30.20.38.28; author kristerw; state Exp; branches; next 1.1; 1.1 date 2001.12.20.09.20.05; author tron; state Exp; branches; next ; desc @@ 1.6 log @Unbreak package by culling extern declarations doubling as function prototypes. Since NetBSD headers have moved to #including what they reference, is everywhere, which turns the externs from annoying into harmful. @ text @$NetBSD$ --- lib/libxview/textsw/txt_file.c.orig 1993-06-29 05:17:48.000000000 +0000 +++ lib/libxview/textsw/txt_file.c @@@@ -18,6 +18,7 @@@@ static char sccsid[] = "@@(#)txt_file #include #include #include +#include #ifdef SVR4 #include #include @@@@ -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(); -#ifdef SVR4 +#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000)) || defined(__DragonFly__) +#define GETCWD +#endif + +#ifdef GETCWD extern char *getcwd(); #else extern char *getwd(); -#endif /* SVR4 */ +#endif /* GETCWD */ +#if (defined(BSD) && (BSD >= 199306)) +#if defined(__DragonFly__) || (defined(__NetBSD__) && __NetBSD_Version__ > 103080000) +#include +#else +extern int errno, sys_nerr; +extern const char *const sys_errlist[]; +#endif +#else extern int errno, sys_nerr; extern char *sys_errlist[]; +#endif Pkg_private int textsw_change_directory(); Pkg_private void textsw_display(), textsw_display_view_margins(); @@@@ -314,7 +326,11 @@@@ textsw_load_selection(folio, locx, locy, register int locx, locy; int no_cd; { +#ifdef NAME_MAX + CHAR filename[NAME_MAX]; +#else CHAR filename[MAXNAMLEN]; +#endif register int result; if (textsw_get_selection_as_filename( @@@@ -354,21 +370,21 @@@@ textsw_full_pathname(name) } #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 */ @@@@ -459,8 +475,13 @@@@ textsw_load_file(abstract, filename, res int reset_views; int locx, locy; { +#ifdef NAME_MAX + char notice_msg_buf[NAME_MAX + 100]; + CHAR scratch_name[NAME_MAX]; +#else char notice_msg_buf[MAXNAMLEN + 100]; CHAR scratch_name[MAXNAMLEN]; +#endif int result; Es_status status; Es_handle new_esh; @@@@ -546,7 +567,11 @@@@ textsw_load_file_quietly(abstract, filen int reset_views; int locx, locy; { +#ifdef NAME_MAX + CHAR scratch_name[NAME_MAX]; +#else CHAR scratch_name[MAXNAMLEN]; +#endif Es_status status; Es_handle new_esh; Es_index start_at; @@@@ -587,7 +612,11 @@@@ textsw_save_store_common(folio, output_n CHAR *output_name; int reload; { +#ifdef NAME_MAX + CHAR scratch_name[NAME_MAX]; +#else CHAR scratch_name[MAXNAMLEN]; +#endif Es_handle new_esh; register Es_handle output; Es_status result; @@@@ -604,9 +633,16 @@@@ textsw_save_store_common(folio, output_n es_destroy(output); if (folio->checkpoint_name) { #ifdef OW_I18N +#ifdef NAME_MAX + char temp_mb[NAME_MAX]; + + (void) wcstombs(temp_mb, folio->checkpoint_name, NAME_MAX); +#else char temp_mb[MAXNAMLEN]; (void) wcstombs(temp_mb, folio->checkpoint_name, MAXNAMLEN); +#endif + if (unlink(temp_mb) == -1) { /* } for match */ #else if (unlink(folio->checkpoint_name) == -1) { @@@@ -733,7 +769,11 @@@@ textsw_save_internal(folio, error_buf, l int locx, locy; /* Currently unused */ { Pkg_private Es_handle es_file_make_backup(); +#ifdef NAME_MAX + CHAR original_name[NAME_MAX], *name; +#else CHAR original_name[MAXNAMLEN], *name; +#endif register char *msg; Es_handle backup, original = ES_NULL; int status; @@@@ -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 +#ifdef NAME_MAX + char original_name_mb[NAME_MAX]; + + (void) wcstombs(original_name_mb, original_name, NAME_MAX); +#else char original_name_mb[MAXNAMLEN]; (void) wcstombs(original_name_mb, original_name, MAXNAMLEN); #endif +#endif (void) es_destroy(original); textsw_notify(folio->first_view, #ifdef OW_I18N @@@@ -868,7 +914,11 @@@@ textsw_save(abstract, locx, locy) Textsw abstract; int locx, locy; { +#ifdef NAME_MAX + char error_buf[NAME_MAX]; +#else char error_buf[MAXNAMLEN + 100]; +#endif Es_status status; Textsw_view_handle view = VIEW_ABS_TO_REP(abstract); @@@@ -964,12 +1014,16 @@@@ textsw_get_from_fd(view, fd, print_error return (result); } -Pkg_private int +Pkg_private void textsw_cd(textsw, locx, locy) Textsw_folio textsw; int locx, locy; { +#ifdef NAME_MAX + CHAR buf[NAME_MAX]; +#else CHAR buf[MAXNAMLEN]; +#endif if (0 == textsw_get_selection_as_filename( textsw, buf, SIZEOF(buf), locx, locy)) { @@@@ -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; +#ifdef NAME_MAX + CHAR buf[NAME_MAX]; +#else CHAR buf[MAXNAMLEN]; +#endif if (!TXTSW_IS_READ_ONLY(folio) && ((int)STRLEN(filename) > 0)) { STRCPY(buf, filename); #ifdef OW_I18N +#ifdef NAME_MAX + if (textsw_expand_filename(folio, buf, NAME_MAX, -1, -1) == 0) {/* } */ + char buf_mb[NAME_MAX]; + + (void) wcstombs(buf_mb, buf, NAME_MAX); +#else if (textsw_expand_filename(folio, buf, MAXNAMLEN, -1, -1) == 0) {/* } */ char buf_mb[MAXNAMLEN]; (void) wcstombs(buf_mb, buf, MAXNAMLEN); +#endif + if ((fd = open(buf_mb, 0)) >= 0) { /* } for match */ textsw_implicit_commit(folio); #else @@@@ -1027,16 +1093,22 @@@@ textsw_get_from_file(view, filename, pri } -Pkg_private int +Pkg_private void textsw_file_stuff(view, locx, locy) Textsw_view_handle view; int locx, locy; { Textsw_folio folio = FOLIO_FOR_VIEW(view); int fd; +#ifdef NAME_MAX + CHAR buf[NAME_MAX]; + char msg[NAME_MAX + 100], *sys_msg; + char notice_msg1[NAME_MAX + 100]; +#else CHAR buf[MAXNAMLEN]; char msg[MAXNAMLEN + 100], *sys_msg; char notice_msg1[MAXNAMLEN + 100]; +#endif char *notice_msg2; Es_status status; int cannot_open = 0; @@@@ -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 +#ifdef NAME_MAX + char buf_mb[NAME_MAX]; + + (void) wcstombs(buf_mb, buf, NAME_MAX); +#else char buf_mb[MAXNAMLEN]; (void) wcstombs(buf_mb, buf, MAXNAMLEN); +#endif if ((fd = open(buf_mb, 0)) < 0) { /* } for match */ #else if ((fd = open(buf, 0)) < 0) { @@@@ -1141,8 +1219,13 @@@@ textsw_file_stuff_from_str(view, buf, lo { Textsw_folio folio = FOLIO_FOR_VIEW(view); int fd; +#ifdef NAME_MAX + char msg[NAME_MAX + 100], *sys_msg; + char notice_msg1[NAME_MAX + 100]; +#else char msg[MAXNAMLEN + 100], *sys_msg; char notice_msg1[MAXNAMLEN + 100]; +#endif char *notice_msg2; Es_status status; int cannot_open = 0; @@@@ -1150,9 +1233,15 @@@@ textsw_file_stuff_from_str(view, buf, lo Xv_Notice text_notice; Frame frame; #ifdef OW_I18N +#ifdef NAME_MAX + char buf_mb[NAME_MAX]; + + (void) wcstombs(buf_mb, buf, NAME_MAX); +#else char buf_mb[MAXNAMLEN]; (void) wcstombs(buf_mb, buf, MAXNAMLEN); +#endif if ((fd = open(buf_mb, 0)) < 0) { /* } for match */ #else if ((fd = open(buf, 0)) < 0) { @@@@ -1245,9 +1334,15 @@@@ textsw_store_init(textsw, filename) { struct stat stat_buf; #ifdef OW_I18N +#ifdef NAME_MAX + char filename_mb[NAME_MAX]; + + (void) wcstombs(filename_mb, filename, NAME_MAX); +#else char filename_mb[MAXNAMLEN]; (void) wcstombs(filename_mb, filename, MAXNAMLEN); +#endif if (stat(filename_mb, &stat_buf) == 0) { /* } for match */ #else if (stat(filename, &stat_buf) == 0) { @@@@ -1310,10 +1405,16 @@@@ textsw_process_store_error(textsw, filen case ES_CANNOT_OVERWRITE: #ifdef OW_I18N { +#ifdef NAME_MAX + char filename_mb[NAME_MAX]; + + (void) wcstombs(filename_mb, filename, NAME_MAX); +#else char filename_mb[MAXNAMLEN]; (void) wcstombs(filename_mb, filename, MAXNAMLEN); #endif +#endif frame = FRAME_FROM_FOLIO_OR_VIEW(textsw); text_notice = (Xv_Notice)xv_get(frame, XV_KEY_DATA, text_notice_key, @@@@ -1465,9 +1566,12 @@@@ textsw_store_file_internal(abstract, fil if (status == ES_SUCCESS) { if (textsw->state & TXTSW_STORE_CHANGES_FILE) { #ifdef OW_I18N - char filename_mbs[MAXNAMLEN]; +#ifdef NAME_MAX + char filename_mbs[NAME_MAX]; - (void) wcstombs(filename_mbs, filename, MAXNAMLEN); + (void) wcstombs(filename_mbs, filename, NAME_MAX); +#else +#endif textsw_notify(textsw->first_view, TEXTSW_ACTION_LOADED_FILE, filename_mbs, TEXTSW_ACTION_LOADED_FILE_WCS, filename, 0); @@@@ -1491,9 +1595,15 @@@@ textsw_store_file(abstract, filename, lo int locx, locy; { #ifdef OW_I18N +#ifdef NAME_MAX + CHAR filename_wcs[NAME_MAX]; + + (void) mbstowcs(filename_wcs, filename, NAME_MAX); +#else CHAR filename_wcs[MAXNAMLEN]; (void) mbstowcs(filename_wcs, filename, MAXNAMLEN); +#endif return (textsw_store_file_internal(abstract, filename_wcs, locx, locy)); #else return (textsw_store_file_internal(abstract, filename, locx, locy)); @@@@ -1516,7 +1626,11 @@@@ textsw_store_to_selection(textsw, locx, Textsw_folio textsw; int locx, locy; { +#ifdef NAME_MAX + CHAR filename[NAME_MAX]; +#else CHAR filename[MAXNAMLEN]; +#endif if (textsw_get_selection_as_filename( textsw, filename, SIZEOF(filename), locx, locy)) @@@@ -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; + char *temp_name; +#ifdef NAME_MAX +#ifdef OW_I18N + CHAR *name, save_name[NAME_MAX], scratch_name[NAME_MAX]; +#else + char *name, save_name[NAME_MAX], scratch_name[NAME_MAX]; +#endif +#else #ifdef OW_I18N CHAR *name, save_name[MAXNAMLEN], scratch_name[MAXNAMLEN]; - char *temp_name; #else - char *name, save_name[MAXNAMLEN], scratch_name[MAXNAMLEN], *temp_name; + char *name, save_name[MAXNAMLEN], scratch_name[MAXNAMLEN]; +#endif #endif int status; Textsw_folio folio = FOLIO_FOR_VIEW(VIEW_ABS_TO_REP(abstract)); @@@@ -1591,7 +1713,11 @@@@ textsw_reset_2(abstract, locx, locy, pre (char *) window_get(abstract, TEXTSW_TEMP_FILENAME); if (temp_name) #ifdef OW_I18N +#ifdef NAME_MAX + (void) mbstowcs(save_name, temp_name, NAME_MAX); +#else (void) mbstowcs(save_name, temp_name, MAXNAMLEN); +#endif #else (void) STRCPY(save_name, temp_name); #endif @@@@ -2150,7 +2276,11 @@@@ textsw_post_error(folio_or_view, locx, l int locx, locy; /* Unused */ char *msg1, *msg2; { +#ifdef NAME_MAX + char buf[NAME_MAX + 1000]; +#else char buf[MAXNAMLEN + 1000]; +#endif int size_to_use = sizeof(buf); Frame frame; Xv_Notice text_notice; @@@@ -2226,8 +2356,13 @@@@ textsw_change_directory(textsw, filename CHAR *full_pathname_wc; char filename[MAXPATHLEN]; #endif +#ifdef NAME_MAX + char msg[NAME_MAX + 100]; + char notice_msg[NAME_MAX + 100]; +#else char msg[MAXNAMLEN + 100]; char notice_msg[MAXNAMLEN + 100]; +#endif struct stat stat_buf; int result = 0; int notice_result; @@@@ -2402,8 +2537,13 @@@@ textsw_checkpoint_internal(folio) CHAR *name; if (textsw_file_name(folio, &name) != 0) return (ES_CANNOT_GET_NAME); +#ifdef NAME_MAX + if ((folio->checkpoint_name = (CHAR *) MALLOC(NAME_MAX)) == 0) + return (ES_CANNOT_GET_NAME); +#else if ((folio->checkpoint_name = (CHAR *) MALLOC(MAXNAMLEN)) == 0) return (ES_CANNOT_GET_NAME); +#endif #ifdef OW_I18N (void) SPRINTF(folio->checkpoint_name, "%ws%%%%", name); #else @@@@ -2773,7 +2913,11 @@@@ textsw_invalid_data_notice(view, filenam int flag; { Xv_Notice text_notice; +#ifdef NAME_MAX + char notice_msg[NAME_MAX + 300]; +#else char notice_msg[MAXNAMLEN + 300]; +#endif Frame frame = FRAME_FROM_FOLIO_OR_VIEW(view); if (flag) { @ 1.5 log @Fix return with/without value errors. @ text @d1 1 a1 1 $NetBSD: patch-cy,v 1.4 2009/12/10 20:35:57 abs Exp $ d13 3 a15 1 @@@@ -45,13 +46,27 @@@@ static char sccsid[] = "@@(#)txt_file d17 2 a18 2 extern CHAR *STRCAT(); extern CHAR *STRNCAT(); a19 1 + d44 1 a44 1 @@@@ -314,7 +329,11 @@@@ textsw_load_selection(folio, locx, locy, d56 1 a56 1 @@@@ -354,21 +373,21 @@@@ textsw_full_pathname(name) d82 1 a82 1 @@@@ -459,8 +478,13 @@@@ textsw_load_file(abstract, filename, res d96 1 a96 1 @@@@ -546,7 +570,11 @@@@ textsw_load_file_quietly(abstract, filen d108 1 a108 1 @@@@ -587,7 +615,11 @@@@ textsw_save_store_common(folio, output_n d120 1 a120 1 @@@@ -604,9 +636,16 @@@@ textsw_save_store_common(folio, output_n d137 1 a137 1 @@@@ -733,7 +772,11 @@@@ textsw_save_internal(folio, error_buf, l d149 1 a149 1 @@@@ -826,10 +869,16 @@@@ Was the file edited with another editor? d166 1 a166 1 @@@@ -868,7 +917,11 @@@@ textsw_save(abstract, locx, locy) d178 1 a178 1 @@@@ -964,12 +1017,16 @@@@ textsw_get_from_fd(view, fd, print_error d196 1 a196 1 @@@@ -988,15 +1045,27 @@@@ textsw_get_from_file(view, filename, pri d224 1 a224 1 @@@@ -1027,16 +1096,22 @@@@ textsw_get_from_file(view, filename, pri d248 1 a248 1 @@@@ -1047,9 +1122,15 @@@@ textsw_file_stuff(view, locx, locy) d264 1 a264 1 @@@@ -1141,8 +1222,13 @@@@ textsw_file_stuff_from_str(view, buf, lo d278 1 a278 1 @@@@ -1150,9 +1236,15 @@@@ textsw_file_stuff_from_str(view, buf, lo d294 1 a294 1 @@@@ -1245,9 +1337,15 @@@@ textsw_store_init(textsw, filename) d310 1 a310 1 @@@@ -1310,10 +1408,16 @@@@ textsw_process_store_error(textsw, filen d327 1 a327 1 @@@@ -1465,9 +1569,12 @@@@ textsw_store_file_internal(abstract, fil d342 1 a342 1 @@@@ -1491,9 +1598,15 @@@@ textsw_store_file(abstract, filename, lo d358 1 a358 1 @@@@ -1516,7 +1629,11 @@@@ textsw_store_to_selection(textsw, locx, d370 1 a370 1 @@@@ -1545,11 +1662,19 @@@@ textsw_reset_2(abstract, locx, locy, pre d392 1 a392 1 @@@@ -1591,7 +1716,11 @@@@ textsw_reset_2(abstract, locx, locy, pre d404 1 a404 1 @@@@ -2150,7 +2279,11 @@@@ textsw_post_error(folio_or_view, locx, l d416 1 a416 1 @@@@ -2226,8 +2359,13 @@@@ textsw_change_directory(textsw, filename d430 1 a430 1 @@@@ -2402,8 +2540,13 @@@@ textsw_checkpoint_internal(folio) d444 1 a444 1 @@@@ -2773,7 +2916,11 @@@@ textsw_invalid_data_notice(view, filenam @ 1.4 log @- Add PKG_DESTDIR_SUPPORT - Depend on the latest version of xview-config - Mark as LICENSE sun-openlook-license - Bump pkgrevision @ text @d1 1 a1 1 $NetBSD: patch-cy,v 1.3 2006/01/05 18:25:57 joerg Exp $ d177 7 a183 1 @@@@ -969,7 +1022,11 @@@@ textsw_cd(textsw, locx, locy) d223 9 a231 1 @@@@ -1034,9 +1103,15 @@@@ textsw_file_stuff(view, locx, locy) @ 1.3 log @First try on fixing xview. Fix errno. Add DragonFly support. Use NAME_MAX when available. Don't try to fake a FILE on DragonFly. The implementation of textsw_scanf can be improved, it is very defensively and slow ATM, the snprintf usage should be portable. Fix a number of prototype mismatches, e.g. variable argument functions can conflict with K&R prototypes. Bump revision since the package "compiled" before, e.g. build errors where ignored. @ text @d1 1 a1 1 $NetBSD: patch-cy,v 1.2 2004/09/30 20:38:28 kristerw Exp $ d3 2 a4 2 --- lib/libxview/textsw/txt_file.c.orig 1993-06-29 07:17:48.000000000 +0200 +++ lib/libxview/textsw/txt_file.c 2004-09-30 22:24:41.000000000 +0200 @ 1.2 log @Make this compile on NetBSD 2.0 too. Thanks to Douglas Wade Needham for providing patches (on pkgsrc-bulk@@). @ text @d1 1 a1 1 $NetBSD$ d5 9 a13 1 @@@@ -45,13 +45,27 @@@@ d19 1 a19 1 +#if (defined(SVR4) || (__NetBSD_Version__ >= 103080000)) d30 1 a30 1 +#if __NetBSD_Version__ > 103080000 d43 13 a55 1 @@@@ -354,21 +368,21 @@@@ d81 360 @ 1.1 log @Cleanup patch files: - unified format - only one patch per file - no files gets patched twice @ text @d3 3 a5 3 --- 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 @@@@ a20 1 extern int errno, sys_nerr; d25 1 d29 1 d35 1 a35 1 @@@@ -354,21 +367,21 @@@@ @