head 1.10; access; symbols pkgsrc-2026Q1:1.10.0.114 pkgsrc-2026Q1-base:1.10 pkgsrc-2025Q4:1.10.0.112 pkgsrc-2025Q4-base:1.10 pkgsrc-2025Q3:1.10.0.110 pkgsrc-2025Q3-base:1.10 pkgsrc-2025Q2:1.10.0.108 pkgsrc-2025Q2-base:1.10 pkgsrc-2025Q1:1.10.0.106 pkgsrc-2025Q1-base:1.10 pkgsrc-2024Q4:1.10.0.104 pkgsrc-2024Q4-base:1.10 pkgsrc-2024Q3:1.10.0.102 pkgsrc-2024Q3-base:1.10 pkgsrc-2024Q2:1.10.0.100 pkgsrc-2024Q2-base:1.10 pkgsrc-2024Q1:1.10.0.98 pkgsrc-2024Q1-base:1.10 pkgsrc-2023Q4:1.10.0.96 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.94 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.92 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.90 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.10.0.88 pkgsrc-2022Q4-base:1.10 pkgsrc-2022Q3:1.10.0.86 pkgsrc-2022Q3-base:1.10 pkgsrc-2022Q2:1.10.0.84 pkgsrc-2022Q2-base:1.10 pkgsrc-2022Q1:1.10.0.82 pkgsrc-2022Q1-base:1.10 pkgsrc-2021Q4:1.10.0.80 pkgsrc-2021Q4-base:1.10 pkgsrc-2021Q3:1.10.0.78 pkgsrc-2021Q3-base:1.10 pkgsrc-2021Q2:1.10.0.76 pkgsrc-2021Q2-base:1.10 pkgsrc-2021Q1:1.10.0.74 pkgsrc-2021Q1-base:1.10 pkgsrc-2020Q4:1.10.0.72 pkgsrc-2020Q4-base:1.10 pkgsrc-2020Q3:1.10.0.70 pkgsrc-2020Q3-base:1.10 pkgsrc-2020Q2:1.10.0.66 pkgsrc-2020Q2-base:1.10 pkgsrc-2020Q1:1.10.0.46 pkgsrc-2020Q1-base:1.10 pkgsrc-2019Q4:1.10.0.68 pkgsrc-2019Q4-base:1.10 pkgsrc-2019Q3:1.10.0.64 pkgsrc-2019Q3-base:1.10 pkgsrc-2019Q2:1.10.0.62 pkgsrc-2019Q2-base:1.10 pkgsrc-2019Q1:1.10.0.60 pkgsrc-2019Q1-base:1.10 pkgsrc-2018Q4:1.10.0.58 pkgsrc-2018Q4-base:1.10 pkgsrc-2018Q3:1.10.0.56 pkgsrc-2018Q3-base:1.10 pkgsrc-2018Q2:1.10.0.54 pkgsrc-2018Q2-base:1.10 pkgsrc-2018Q1:1.10.0.52 pkgsrc-2018Q1-base:1.10 pkgsrc-2017Q4:1.10.0.50 pkgsrc-2017Q4-base:1.10 pkgsrc-2017Q3:1.10.0.48 pkgsrc-2017Q3-base:1.10 pkgsrc-2017Q2:1.10.0.44 pkgsrc-2017Q2-base:1.10 pkgsrc-2017Q1:1.10.0.42 pkgsrc-2017Q1-base:1.10 pkgsrc-2016Q4:1.10.0.40 pkgsrc-2016Q4-base:1.10 pkgsrc-2016Q3:1.10.0.38 pkgsrc-2016Q3-base:1.10 pkgsrc-2016Q2:1.10.0.36 pkgsrc-2016Q2-base:1.10 pkgsrc-2016Q1:1.10.0.34 pkgsrc-2016Q1-base:1.10 pkgsrc-2015Q4:1.10.0.32 pkgsrc-2015Q4-base:1.10 pkgsrc-2015Q3:1.10.0.30 pkgsrc-2015Q3-base:1.10 pkgsrc-2015Q2:1.10.0.28 pkgsrc-2015Q2-base:1.10 pkgsrc-2015Q1:1.10.0.26 pkgsrc-2015Q1-base:1.10 pkgsrc-2014Q4:1.10.0.24 pkgsrc-2014Q4-base:1.10 pkgsrc-2014Q3:1.10.0.22 pkgsrc-2014Q3-base:1.10 pkgsrc-2014Q2:1.10.0.20 pkgsrc-2014Q2-base:1.10 pkgsrc-2014Q1:1.10.0.18 pkgsrc-2014Q1-base:1.10 pkgsrc-2013Q4:1.10.0.16 pkgsrc-2013Q4-base:1.10 pkgsrc-2013Q3:1.10.0.14 pkgsrc-2013Q3-base:1.10 pkgsrc-2013Q2:1.10.0.12 pkgsrc-2013Q2-base:1.10 pkgsrc-2013Q1:1.10.0.10 pkgsrc-2013Q1-base:1.10 pkgsrc-2012Q4:1.10.0.8 pkgsrc-2012Q4-base:1.10 pkgsrc-2012Q3:1.10.0.6 pkgsrc-2012Q3-base:1.10 pkgsrc-2012Q2:1.10.0.4 pkgsrc-2012Q2-base:1.10 pkgsrc-2012Q1:1.10.0.2 pkgsrc-2012Q1-base:1.10 pkgsrc-2011Q4:1.8.0.4 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q3:1.8.0.2 pkgsrc-2011Q3-base:1.8 pkgsrc-2011Q2:1.7.0.48 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.46 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.7.0.44 pkgsrc-2010Q4-base:1.7 pkgsrc-2010Q3:1.7.0.42 pkgsrc-2010Q3-base:1.7 pkgsrc-2010Q2:1.7.0.40 pkgsrc-2010Q2-base:1.7 pkgsrc-2010Q1:1.7.0.38 pkgsrc-2010Q1-base:1.7 pkgsrc-2009Q4:1.7.0.36 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.34 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.32 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.7.0.30 pkgsrc-2009Q1-base:1.7 pkgsrc-2008Q4:1.7.0.28 pkgsrc-2008Q4-base:1.7 pkgsrc-2008Q3:1.7.0.26 pkgsrc-2008Q3-base:1.7 cube-native-xorg:1.7.0.24 cube-native-xorg-base:1.7 pkgsrc-2008Q2:1.7.0.22 pkgsrc-2008Q2-base:1.7 cwrapper:1.7.0.20 pkgsrc-2008Q1:1.7.0.18 pkgsrc-2008Q1-base:1.7 pkgsrc-2007Q4:1.7.0.16 pkgsrc-2007Q4-base:1.7 pkgsrc-2007Q3:1.7.0.14 pkgsrc-2007Q3-base:1.7 pkgsrc-2007Q2:1.7.0.12 pkgsrc-2007Q2-base:1.7 pkgsrc-2007Q1:1.7.0.10 pkgsrc-2007Q1-base:1.7 pkgsrc-2006Q4:1.7.0.8 pkgsrc-2006Q4-base:1.7 pkgsrc-2006Q3:1.7.0.6 pkgsrc-2006Q3-base:1.7 pkgsrc-2006Q2:1.7.0.4 pkgsrc-2006Q2-base:1.7 pkgsrc-2006Q1:1.7.0.2 pkgsrc-2006Q1-base:1.7 pkgsrc-2005Q4:1.5.0.2 pkgsrc-2005Q4-base:1.5 pkgsrc-2005Q3:1.4.0.16 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.14 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.12 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.10 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.8 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.6 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 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 netbsd-1-5-PATCH001:1.1 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1 netbsd-1-4-PATCH002:1.1; locks; strict; comment @# @; 1.10 date 2012.03.05.12.16.00; author obache; state Exp; branches; next 1.9; 1.9 date 2012.03.01.22.00.44; author hans; state Exp; branches; next 1.8; 1.8 date 2011.09.29.20.22.26; author wiz; state Exp; branches; next 1.7; 1.7 date 2006.01.17.21.23.01; author kristerw; state Exp; branches; next 1.6; 1.6 date 2006.01.03.18.16.10; author joerg; state Exp; branches; next 1.5; 1.5 date 2005.12.10.22.10.47; author christos; state Exp; branches; next 1.4; 1.4 date 2003.11.11.10.42.32; author wiz; state Exp; branches; next 1.3; 1.3 date 2003.11.07.16.35.51; author christos; state Exp; branches; next 1.2; 1.2 date 2003.03.09.04.39.29; author salo; state Exp; branches; next 1.1; 1.1 date 2000.02.07.03.18.11; author christos; state Exp; branches; next ; desc @@ 1.10 log @Remove RCS tags from patches. @ text @$NetBSD: patch-ae,v 1.9 2012/03/01 22:00:44 hans Exp $ --- fep_edit.c.orig 1995-01-20 08:16:37.000000000 +0000 +++ fep_edit.c 2011-09-29 20:19:55.000000000 +0000 @@@@ -6,12 +6,26 @@@@ -#endif lint +#endif /* lint */ #include #include #include +#include +#include +#include +#include +#ifdef TERMIOS +#include +#ifdef __linux__ +#ifndef _POSIX_VDISABLE +#define _POSIX_VDISABLE '\0' +#endif +#endif +#else #include +#endif #include +#include #include -#include +#include #include #include #include "fep_defs.h" @@@@ -25,7 +39,7 @@@@ int MarkPosition = -1; /* Marked positi EDITMODE editmode = NOTYET; /* edtimode EMACS, VI */ EDITSTATUS editstatus = NOTEDITING;/* EDITING, NOTEDITING */ -int maxline = MAXCOMLEN; /* maximum length of command line */ +int maxline = MAXCMDLEN; /* maximum length of command line */ int NeedNewLine; /* add new line flag */ int NeedSave; /* need to save to history */ int Transparency = OFF; /* transparent flag */ @@@@ -86,7 +100,7 @@@@ BINDENT emacsBindings[] = { /* ^X-^V */ {"\\^X\\^V", view_buffer}, /* ^X-^K */ {"\\^X\\^K", kill_to_top_of_line}, /* ^X-^L */ {"\\^X\\^L", fep_repaint}, - /* ^X-^C */ {"\\^X\\^C", terminate}, + /* ^X-^C */ {"\\^X\\^C", (FUNC)terminate}, /* ^X-^D */ {"\\^X\\^D", send_eof}, /* ^X-( */ {"\\^X(", fep_start_script}, /* ^X-) */ {"\\^X)", fep_end_script}, @@@@ -99,9 +113,9 @@@@ BINDENT emacsBindings[] = { init_bind_table () { - curFuncTab = (FUNC *) calloc (sizeof (FUNC), 256); - altFuncTab = (FUNC *) calloc (sizeof (FUNC), 256); - if (curFuncTab == 0 || altFuncTab == 0) { + curFuncTab = calloc (sizeof (FUNC), 256); + altFuncTab = calloc (sizeof (FUNC), 256); + if (curFuncTab == NULL || altFuncTab == NULL) { printf ("Can't allocate space for function table\n"); exit (1); } @@@@ -167,9 +181,9 @@@@ init_edit_params () /* * Initialize command line buffer */ - CommandLine = (CHAR *) calloc (maxline, 1); - KillBuffer = (CHAR *) calloc (maxline, 1); - if (CommandLine == 0 || KillBuffer == 0) { + CommandLine = calloc (maxline, 1); + KillBuffer = calloc (maxline, 1); + if (CommandLine == NULL || KillBuffer == NULL) { perror ("Edit line buffer"); exit (1); } @@@@ -192,6 +206,30 @@@@ initEmacsBindings (cft, aft) #define import(table,key,fn) if((int)key>0)table[(int)key]=fn +#ifdef TERMIOS + /* Now, using cbreak mode + import (cft, initial_ttymode.c_cc[VSTART], ignore); + import (cft, initial_ttymode.c_cc[VSTOP], ignore); + */ + import (cft, initial_ttymode.c_cc[VINTR], insert_and_flush); + import (cft, initial_ttymode.c_cc[VQUIT], insert_and_flush); + /* Now, EOF will be sent on empty line. + import (cft, initial_ttymode.c_cc[VEOF], send_eof); + */ +#ifdef VSWTC + import (cft, initial_ttymode.c_cc[VSWTC], insert_and_flush); +#endif + import (cft, initial_ttymode.c_cc[VSUSP], insert_and_flush); + /* ^Y is used for yank-from-kill-buffer + import (cft, initial_ttymode.c_cc[VDSUSP], self_insert); + */ + import (cft, initial_ttymode.c_cc[VREPRINT], reprint); + import (cft, initial_ttymode.c_cc[VDISCARD], self_insert); + import (cft, initial_ttymode.c_cc[VWERASE], delete_previous_word); + import (cft, initial_ttymode.c_cc[VLNEXT], literal_next); + import (cft, initial_ttymode.c_cc[VERASE], delete_previous_character); + import (cft, initial_ttymode.c_cc[VKILL], delete_line); +#else /* Now, using cbreak mode import (cft, tchars_buf.t_startc, ignore); import (cft, tchars_buf.t_stopc, ignore); @@@@ -212,6 +250,7 @@@@ initEmacsBindings (cft, aft) import (cft, ltchars_buf.t_lnextc, literal_next); import (cft, initial_ttymode.sg_erase, delete_previous_character); import (cft, initial_ttymode.sg_kill, delete_line); +#endif #undef import @@@@ -227,7 +266,7 @@@@ initEmacsBindings (cft, aft) * Main function of front end program */ CHAR * -getline() +get_line() { int c; CHAR *execute_command, *check_alias(); @@@@ -257,7 +296,7 @@@@ RETRY: */ swallow_output(); - if (fgets (CommandLine, MAXCOMLEN, redirect_fp)) { + if (fgets (CommandLine, MAXCMDLEN, redirect_fp)) { ++redirect_line; execute_command = CommandLine; goto RETURN; @@@@ -301,7 +340,11 @@@@ RETRY: * call send_eof */ if ( +#ifdef TERMIOS + c == initial_ttymode.c_cc[VEOF] +#else c == tchars_buf.t_eofc +#endif && curFuncTab[c] != send_eof && ! look_var ("ignore-eof") && CommandLine [0] == '\0' @@@@ -422,11 +465,11 @@@@ self_insert(c) register int i, nbyte = 1, currentNull; #ifdef KANJI CHAR byte2; -#endif KANJI +#endif /* KANJI */ currentNull = strlen (CommandLine); - if (currentNull >= maxline) { + if (currentNull + 1 >= maxline) { errorBell(); return (0); } @@@@ -441,7 +484,7 @@@@ self_insert(c) nbyte = 2; } else -#endif KANJI +#endif /* KANJI */ putChar (c); reverse_strcpy ( &CommandLine[CurrentPosition] + nbyte, @@@@ -453,7 +496,7 @@@@ self_insert(c) if (nbyte > 1) { CommandLine[CurrentPosition - 1] = byte2; } -#endif KANJI +#endif /* KANJI */ printS (&CommandLine [CurrentPosition]); if (CommandLine[CurrentPosition] != '\0') { @@@@ -557,7 +600,7 @@@@ moveto (position) #ifdef KANJI && !(CurrentPosition + 1 == position && iskanji (CommandLine[CurrentPosition])) -#endif KANJI +#endif /* KANJI */ ) (void) forward_n_character (1); } @@@@ -581,10 +624,10 @@@@ beginning_of_line() #ifdef KANJI #define INC(i) if(iskanji(CommandLine[i])) i+=2; else i++; #define DEC(i) if(i>=2 && iskanji_in_string(CommandLine, i-2)) i-=2; else i--; -#else KANJI +#else /* KANJI */ #define INC(i) i++ #define DEC(i) i-- -#endif KANJI +#endif /* KANJI */ /* * Move cursor to end of line @@@@ -642,7 +685,7 @@@@ backward_n_character(n) i--; } else -#endif KANJI +#endif /* KANJI */ putchar (BS); i--; } @@@@ -697,7 +740,7 @@@@ backward_n_word (n) nchars++; } } -#else KANJI +#else /* KANJI */ while (n--) { i--, nchars++; while (i > 0 && !iswordchar (CommandLine [i])) { @@@@ -707,7 +750,7 @@@@ backward_n_word (n) i--, nchars++; } } -#endif KANJI +#endif /* KANJI */ return (backward_n_character (nchars)); } @@@@ -758,7 +801,7 @@@@ backward_n_Word (n) nchars++; } } -#else KANJI +#else /* KANJI */ while (n--) { i--, nchars++; while (i > 0 && !isWordchar (CommandLine [i])) @@@@ -766,7 +809,7 @@@@ backward_n_Word (n) while (i > 0 && isWordchar (CommandLine [i - 1])) i--, nchars++; } -#endif KANJI +#endif /* KANJI */ return (backward_n_character (nchars)); } @@@@ -804,7 +847,7 @@@@ forward_n_character(n) (void) putchar (CommandLine[i++]); } else -#endif KANJI +#endif /* KANJI */ if (isctlchar(CommandLine[i])) { (void) putchar (unctl (CommandLine [i])); i++; @@@@ -819,7 +862,7 @@@@ forward_n_character(n) (void) putchar (CommandLine[i++]); } else -#endif KANJI +#endif /* KANJI */ putChar (CommandLine [i++]); } @@@@ -1000,9 +1043,9 @@@@ delete_previous_n_character(n) i -= 2, nbyte += 2; else i -= 1, nbyte += 1; -#else KANJI +#else /* KANJI */ nbyte = n; -#endif KANJI +#endif /* KANJI */ deleteArea = howlong (&CommandLine[CurrentPosition - nbyte], nbyte); restArea = howlong (&CommandLine[CurrentPosition], 0); @@@@ -1075,7 +1118,7 @@@@ delete_previous_n_word(n) nchars++; } } -#else KANJI +#else /* KANJI */ while (n--) { i--, nchars++; while (i > 0 && !iswordchar (CommandLine [i])) @@@@ -1083,7 +1126,7 @@@@ delete_previous_n_word(n) while (i > 0 && iswordchar (CommandLine [i - 1])) i--, nchars++; } -#endif KANJI +#endif /* KANJI */ return (delete_previous_n_character (nchars)); } @@@@ -1136,7 +1179,7 @@@@ delete_previous_n_Word(n) nchars++; } } -#else KANJI +#else /* KANJI */ while (n--) { i--, nchars++; while (i > 0 && !isWordchar (CommandLine [i])) @@@@ -1144,7 +1187,7 @@@@ delete_previous_n_Word(n) while (i > 0 && isWordchar (CommandLine [i - 1])) i--, nchars++; } -#endif KANJI +#endif /* KANJI */ return (delete_previous_n_character (nchars)); } @@@@ -1183,9 +1226,9 @@@@ delete_next_n_character (n) else cp++, nbyte++; } -#else KANJI +#else /* KANJI */ nbyte = n; -#endif KANJI +#endif /* KANJI */ deleteArea = howlong (&CommandLine[CurrentPosition], nbyte); restArea = howlong (&CommandLine[CurrentPosition + nbyte], 0); @@@@ -1481,7 +1524,11 @@@@ insert_and_flush(c) */ send_eof() { +#ifdef TERMIOS + char c = initial_ttymode.c_cc[VEOF]; +#else char c = tchars_buf.t_eofc; +#endif (void) self_insert (c); if (isctlchar (c)) @@@@ -1698,7 +1745,7 @@@@ expand_file_name () char *fileList[256]; CHAR line[256]; DIR *dirp, *x_opendir(); - struct direct *dp; + struct dirent *dp; int found = 0; int i; int tilde_expanded = 0; @@@@ -1737,11 +1784,11 @@@@ expand_file_name () char *fcp; # ifdef ALLOCA - fcp = (char *) alloca (strlen (dp->d_name) + 1); -# else ALLOCA - fcp = (char *) malloc (strlen (dp->d_name) + 1); -# endif ALLOCA - if (fcp == 0) { + fcp = alloca (strlen (dp->d_name) + 1); +# else /* ALLOCA */ + fcp = malloc (strlen (dp->d_name) + 1); +# endif /* ALLOCA */ + if (fcp == NULL) { fputs ("\r\n", stdout); perror ("alloca:"); reprint (); @@@@ -1754,7 +1801,7 @@@@ expand_file_name () fileList [i] = (char *) 0; if (*start_expand == '~' && look_var ("expand-tilde")) { - char *buf [256], *p; + char buf [256], *p; strcpy (buf, start_expand); p = x_dirname (buf); @@@@ -1801,7 +1848,7 @@@@ expand_file_name () # ifndef ALLOCA for (i = 0; fileList [i]; i++) free (fileList [i]); -# endif ALLOCA +# endif /* ALLOCA */ closedir(dirp); return (0); @@@@ -1903,7 +1950,7 @@@@ ls (dirp, prefixstring) DIR *dirp; char *prefixstring; { - struct direct *dp; + struct dirent *dp; char *fileList[MAXFILES + 1]; int i, j; int maxlen = 0; @@@@ -1928,11 +1975,11 @@@@ ls (dirp, prefixstring) continue; if (prefix (prefixstring, dp->d_name)) { # ifdef ALLOCA - fcp = (char *) alloca (strlen (dp->d_name) + 1); -# else ALLOCA - fcp = (char *) malloc (strlen (dp->d_name) + 1); -# endif ALLOCA - if (fcp == 0) { + fcp = alloca (strlen (dp->d_name) + 1); +# else /* ALLOCA */ + fcp = malloc (strlen (dp->d_name) + 1); +# endif /* ALLOCA */ + if (fcp == NULL) { fputs ("\r\n", stdout); perror ("alloca:"); reprint (); @@@@ -1975,7 +2022,7 @@@@ BACK: # ifndef ALLOCA for (i = 0; fileList [i]; i++) free (fileList [i]); -# endif ALLOCA +# endif /* ALLOCA */ return; } @@@@ -2022,7 +2069,7 @@@@ list_remote_file (host, pattern) fputs ("\n", stdout); } } -#endif RINFO +#endif /* RINFO */ bind_key (ft, func, s, dfunc) FUNC ft[]; /* Function table */ @@@@ -2032,7 +2079,7 @@@@ bind_key (ft, func, s, dfunc) { char tmps[16]; - if (s[0] == '\\' && s[1] == '^' && s[2] != NULL) { + if (s[0] == '\\' && s[1] == '^' && s[2] != '\0') { tmps[0] = toctrl (s[2]); strcpy (&tmps[1], &s[3]); s = tmps; @@@@ -2042,7 +2089,7 @@@@ bind_key (ft, func, s, dfunc) * If the string contain only one character, put the function to * appropriate position in the table. */ - if (*(s+1) == NULL) { + if (*(s+1) == '\0') { if (isIndirect (ft[(int) *s])) free (maskIndirect (ft[(int) *s])); @@@@ -2059,11 +2106,11 @@@@ bind_key (ft, func, s, dfunc) if (! (isIndirect (ft[(int) *s]))) { register int i; - nft = (FUNC *) calloc (sizeof (FUNC), 256); + nft = calloc (sizeof (FUNC), 256); /* * If failed in allocating, return 0. */ - if (nft == 0) + if (nft == NULL) return (0); /* @ 1.9 log @Fix build on SunOS. - no more __P, just use ansi prototypes - use sigprocmask instead of sigsetmask - use dirent.h instead of sys/dir.h @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.8 2011/09/29 20:22:26 wiz Exp $ d5 1 a5 4 @@@@ -3,15 +3,29 @@@@ #ifndef lint static char rcsid[]= "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)"; @ 1.8 log @Fix build on NetBSD-current (getline). @ text @d1 1 a1 1 $NetBSD$ d5 4 a8 1 @@@@ -6,10 +6,22 @@@@ d16 2 d32 2 a33 1 #include d35 3 a37 1 @@@@ -25,7 +37,7 @@@@ d46 1 a46 1 @@@@ -86,7 +98,7 @@@@ d55 1 a55 1 @@@@ -99,9 +111,9 @@@@ d68 1 a68 1 @@@@ -167,9 +179,9 @@@@ d81 1 a81 1 @@@@ -192,6 +204,30 @@@@ d112 1 a112 1 @@@@ -212,6 +248,7 @@@@ d120 1 a120 1 @@@@ -227,7 +264,7 @@@@ d129 1 a129 1 @@@@ -257,7 +294,7 @@@@ d138 1 a138 1 @@@@ -301,7 +338,11 @@@@ d150 1 a150 1 @@@@ -422,11 +463,11 @@@@ d164 1 a164 1 @@@@ -441,7 +482,7 @@@@ d173 1 a173 1 @@@@ -453,7 +494,7 @@@@ d182 1 a182 1 @@@@ -557,7 +598,7 @@@@ d191 1 a191 1 @@@@ -581,10 +622,10 @@@@ d204 1 a204 1 @@@@ -642,7 +683,7 @@@@ d213 1 a213 1 @@@@ -697,7 +738,7 @@@@ d222 1 a222 1 @@@@ -707,7 +748,7 @@@@ d231 1 a231 1 @@@@ -758,7 +799,7 @@@@ d240 1 a240 1 @@@@ -766,7 +807,7 @@@@ d249 1 a249 1 @@@@ -804,7 +845,7 @@@@ d258 1 a258 1 @@@@ -819,7 +860,7 @@@@ d267 1 a267 1 @@@@ -1000,9 +1041,9 @@@@ d279 1 a279 1 @@@@ -1075,7 +1116,7 @@@@ d288 1 a288 1 @@@@ -1083,7 +1124,7 @@@@ d297 1 a297 1 @@@@ -1136,7 +1177,7 @@@@ d306 1 a306 1 @@@@ -1144,7 +1185,7 @@@@ d315 1 a315 1 @@@@ -1183,9 +1224,9 @@@@ d327 1 a327 1 @@@@ -1481,7 +1522,11 @@@@ d339 10 a348 1 @@@@ -1737,11 +1782,11 @@@@ d365 1 a365 1 @@@@ -1754,7 +1799,7 @@@@ d374 1 a374 1 @@@@ -1801,7 +1846,7 @@@@ d383 10 a392 1 @@@@ -1928,11 +1973,11 @@@@ d409 1 a409 1 @@@@ -1975,7 +2020,7 @@@@ d418 1 a418 1 @@@@ -2022,7 +2067,7 @@@@ d427 1 a427 1 @@@@ -2032,7 +2077,7 @@@@ d436 1 a436 1 @@@@ -2042,7 +2087,7 @@@@ d445 1 a445 1 @@@@ -2059,11 +2104,11 @@@@ @ 1.7 log @Regenerate hand edited patches so that they can be applied using the OS X patch program. @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.6 2006/01/03 18:16:10 joerg Exp $ d3 3 a5 3 --- fep_edit.c.orig 1995-01-20 03:16:37.000000000 -0500 +++ fep_edit.c 2005-12-10 16:59:27.000000000 -0500 @@@@ -6 +6 @@@@ d8 1 a8 1 @@@@ -8,8 +8,20 @@@@ d112 9 @ 1.6 log @Fix patches: $Header$ is a CVS keyword. Remove realloc and malloc prototypes, they conflict with DragonFly's stdlib.h. Add parameter to sigwinch, it should match the local prototype. Fix errno. @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.5 2005/12/10 22:10:47 christos Exp $ d5 1 a5 1 @@@@ -6,10 +6,22 @@@@ d8 1 a8 1 @ 1.5 log @make it work on 64 bit machines @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 4 @@@@ -3,13 +3,25 @@@@ #ifndef lint static char rcsid[]= "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)"; @ 1.4 log @Make patches apply again; use sed script in pre-build to remove stuff after #endif to avoid RCS problems with patches (hi christos!). @ text @d3 9 a11 3 --- fep_edit.c.orig Fri Jan 20 09:16:37 1995 +++ fep_edit.c @@@@ -8,7 +8,17 @@@@ static char rcsid[]= d16 1 d28 1 d31 2 a32 1 @@@@ -25,7 +35,7 @@@@ int MarkPosition = -1; /* Marked positi d41 1 a41 1 @@@@ -86,7 +96,7 @@@@ BINDENT emacsBindings[] = { d50 27 a76 1 @@@@ -192,6 +202,30 @@@@ initEmacsBindings (cft, aft) d107 1 a107 1 @@@@ -212,6 +246,7 @@@@ initEmacsBindings (cft, aft) d115 1 a115 1 @@@@ -257,7 +292,7 @@@@ RETRY: d124 1 a124 1 @@@@ -301,7 +336,11 @@@@ RETRY: d136 1 a136 1 @@@@ -422,11 +461,11 @@@@ self_insert(c) d150 1 a150 1 @@@@ -441,7 +480,7 @@@@ self_insert(c) d159 1 a159 1 @@@@ -453,7 +492,7 @@@@ self_insert(c) d168 1 a168 1 @@@@ -557,7 +596,7 @@@@ moveto (position) d177 1 a177 1 @@@@ -581,10 +620,10 @@@@ beginning_of_line() d190 1 a190 1 @@@@ -642,7 +681,7 @@@@ backward_n_character(n) d199 1 a199 1 @@@@ -697,7 +736,7 @@@@ backward_n_word (n) d208 1 a208 1 @@@@ -707,7 +746,7 @@@@ backward_n_word (n) d217 1 a217 1 @@@@ -758,7 +797,7 @@@@ backward_n_Word (n) d226 1 a226 1 @@@@ -766,7 +805,7 @@@@ backward_n_Word (n) d235 1 a235 1 @@@@ -804,7 +843,7 @@@@ forward_n_character(n) d244 1 a244 1 @@@@ -819,7 +858,7 @@@@ forward_n_character(n) d253 1 a253 1 @@@@ -1000,9 +1039,9 @@@@ delete_previous_n_character(n) d265 1 a265 1 @@@@ -1075,7 +1114,7 @@@@ delete_previous_n_word(n) d274 1 a274 1 @@@@ -1083,7 +1122,7 @@@@ delete_previous_n_word(n) d283 1 a283 1 @@@@ -1136,7 +1175,7 @@@@ delete_previous_n_Word(n) d292 1 a292 1 @@@@ -1144,7 +1183,7 @@@@ delete_previous_n_Word(n) d301 1 a301 1 @@@@ -1183,9 +1222,9 @@@@ delete_next_n_character (n) d313 1 a313 1 @@@@ -1481,7 +1520,11 @@@@ insert_and_flush(c) d325 2 a326 1 @@@@ -1738,9 +1781,9 @@@@ expand_file_name () d329 1 a329 1 fcp = (char *) alloca (strlen (dp->d_name) + 1); d331 4 d336 1 a336 2 fcp = (char *) malloc (strlen (dp->d_name) + 1); -# endif ALLOCA d338 1 a338 1 if (fcp == 0) { d341 2 a342 1 @@@@ -1754,7 +1797,7 @@@@ expand_file_name () d351 1 a351 1 @@@@ -1801,7 +1844,7 @@@@ expand_file_name () d360 2 a361 1 @@@@ -1929,9 +1972,9 @@@@ ls (dirp, prefixstring) d364 1 a364 1 fcp = (char *) alloca (strlen (dp->d_name) + 1); d366 4 d371 1 a371 2 fcp = (char *) malloc (strlen (dp->d_name) + 1); -# endif ALLOCA d373 1 a373 1 if (fcp == 0) { d376 2 a377 1 @@@@ -1975,7 +2018,7 @@@@ BACK: d386 1 a386 1 @@@@ -2022,7 +2065,7 @@@@ list_remote_file (host, pattern) d395 1 a395 1 @@@@ -2032,7 +2075,7 @@@@ bind_key (ft, func, s, dfunc) d404 1 a404 1 @@@@ -2042,7 +2085,7 @@@@ bind_key (ft, func, s, dfunc) d413 14 @ 1.3 log @- kill gcc-3 preprocessor warnings about #{else,endif} TAG - exit with the child's exit value and with non zero on error @ text @d3 3 a5 9 --- fep_edit.c.orig 1995-01-20 03:16:37.000000000 -0500 +++ fep_edit.c 2003-11-07 11:25:48.000000000 -0500 @@@@ -3,12 +3,22 @@@@ #ifndef lint static char rcsid[]= "$Id: fep_edit.c,v 4.10 1995/01/20 08:15:55 utashiro Exp $ (SRA)"; -#endif lint +#endif /* lint */ d23 1 a23 1 @@@@ -25,7 +35,7 @@@@ d32 1 a32 1 @@@@ -86,7 +96,7 @@@@ d41 1 a41 1 @@@@ -192,6 +202,30 @@@@ d72 1 a72 1 @@@@ -212,6 +246,7 @@@@ d80 1 a80 1 @@@@ -257,7 +292,7 @@@@ d89 1 a89 1 @@@@ -301,7 +336,11 @@@@ d101 1 a101 1 @@@@ -422,11 +461,11 @@@@ d115 1 a115 1 @@@@ -441,7 +480,7 @@@@ d124 1 a124 1 @@@@ -453,7 +492,7 @@@@ d133 1 a133 1 @@@@ -557,7 +596,7 @@@@ d142 1 a142 1 @@@@ -581,10 +620,10 @@@@ d155 1 a155 1 @@@@ -642,7 +681,7 @@@@ d164 1 a164 1 @@@@ -697,7 +736,7 @@@@ d173 1 a173 1 @@@@ -707,7 +746,7 @@@@ d182 1 a182 1 @@@@ -758,7 +797,7 @@@@ d191 1 a191 1 @@@@ -766,7 +805,7 @@@@ d200 1 a200 1 @@@@ -804,7 +843,7 @@@@ d209 1 a209 1 @@@@ -819,7 +858,7 @@@@ d218 1 a218 1 @@@@ -1000,9 +1039,9 @@@@ d230 1 a230 1 @@@@ -1075,7 +1114,7 @@@@ d239 1 a239 1 @@@@ -1083,7 +1122,7 @@@@ d248 1 a248 1 @@@@ -1136,7 +1175,7 @@@@ d257 1 a257 1 @@@@ -1144,7 +1183,7 @@@@ d266 1 a266 1 @@@@ -1183,9 +1222,9 @@@@ d278 1 a278 1 @@@@ -1481,7 +1520,11 @@@@ d290 1 a290 1 @@@@ -1738,9 +1781,9 @@@@ d302 1 a302 1 @@@@ -1754,7 +1797,7 @@@@ d311 1 a311 1 @@@@ -1801,7 +1844,7 @@@@ d320 1 a320 1 @@@@ -1929,9 +1972,9 @@@@ d332 1 a332 1 @@@@ -1975,7 +2018,7 @@@@ d341 1 a341 1 @@@@ -2022,7 +2065,7 @@@@ d350 1 a350 1 @@@@ -2032,7 +2075,7 @@@@ d359 1 a359 1 @@@@ -2042,7 +2085,7 @@@@ @ 1.2 log @Fix: Using ^U when line buffer is full will cause overrun. Bump PKGREVISION. Patch submitted by Nobuhiro Yasutomi via PR pkg/20599. @ text @d3 9 a11 3 --- fep_edit.c.orig 1995-01-20 09:16:37.000000000 +0100 +++ fep_edit.c 2003-03-09 05:26:37.000000000 +0100 @@@@ -8,7 +8,17 @@@@ d107 6 a112 1 @@@@ -426,7 +465,7 @@@@ d121 163 d296 12 d317 39 @ 1.1 log @- fix slews of bugs - modernize - use termios @ text @d3 2 a4 2 --- fep_edit.c.orig Fri Jan 20 03:16:37 1995 +++ fep_edit.c Sun Feb 6 21:46:22 2000 d101 9 @