head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.94 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.92 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.90 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.88 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.6.0.86 pkgsrc-2025Q1-base:1.6 pkgsrc-2024Q4:1.6.0.84 pkgsrc-2024Q4-base:1.6 pkgsrc-2024Q3:1.6.0.82 pkgsrc-2024Q3-base:1.6 pkgsrc-2024Q2:1.6.0.80 pkgsrc-2024Q2-base:1.6 pkgsrc-2024Q1:1.6.0.78 pkgsrc-2024Q1-base:1.6 pkgsrc-2023Q4:1.6.0.76 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.6.0.74 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.6.0.72 pkgsrc-2023Q2-base:1.6 pkgsrc-2023Q1:1.6.0.70 pkgsrc-2023Q1-base:1.6 pkgsrc-2022Q4:1.6.0.68 pkgsrc-2022Q4-base:1.6 pkgsrc-2022Q3:1.6.0.66 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.64 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.62 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.60 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.58 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.56 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.54 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.52 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.50 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.46 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.26 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.48 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.44 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.42 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.40 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.38 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.36 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.34 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.32 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.30 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.28 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.24 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.22 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.20 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.18 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.16 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.14 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.12 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.10 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.8 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.6 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.4 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.2 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.5.0.12 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.10 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.8 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.6 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.4 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.2 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.4.0.34 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.32 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.30 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.28 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.26 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.24 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.22 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.20 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.18 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.16 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.14 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.12 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.10 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.8 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.6 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.4 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.2 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.3.0.24 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.22 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.20 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.18 pkgsrc-2008Q1:1.3.0.16 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.14 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.12 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.10 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.8 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.6 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.4 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.2 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.2.0.4 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.2 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.1.1.1.0.24 pkgsrc-2005Q3-base:1.1.1.1 pkgsrc-2005Q2:1.1.1.1.0.22 pkgsrc-2005Q2-base:1.1.1.1 pkgsrc-2005Q1:1.1.1.1.0.20 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-2004Q4:1.1.1.1.0.18 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-2004Q3:1.1.1.1.0.16 pkgsrc-2004Q3-base:1.1.1.1 pkgsrc-2004Q2:1.1.1.1.0.14 pkgsrc-2004Q2-base:1.1.1.1 pkgsrc-2004Q1:1.1.1.1.0.12 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-2003Q4:1.1.1.1.0.10 pkgsrc-2003Q4-base:1.1.1.1 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.6 date 2014.09.23.22.37.29; author jperkin; state Exp; branches; next 1.5; commitid p8ghgeRBh33EpwRx; 1.5 date 2013.01.11.13.24.32; author joerg; state Exp; branches; next 1.4; 1.4 date 2008.12.17.02.19.59; author christos; state Exp; branches; next 1.3; 1.3 date 2006.05.15.15.33.00; author christos; state Exp; branches; next 1.2; 1.2 date 2005.12.14.13.53.24; author joerg; state Exp; branches; next 1.1; 1.1 date 2000.12.15.00.36.39; author wiz; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.12.15.00.36.39; author wiz; state Exp; branches; next ; desc @@ 1.6 log @Don't include termcap.h on SunOS. @ text @$NetBSD: patch-an,v 1.5 2013/01/11 13:24:32 joerg Exp $ Don't include termcap.h on SunOS. --- readline/readline.c.orig 1995-02-24 21:20:03.000000000 +0000 +++ readline/readline.c @@@@ -38,17 +38,27 @@@@ static char *xmalloc (), *xrealloc (); # endif #endif +#include +#ifndef __sun +#include +#endif #include #include #include #include #include +#include +#include #if defined (HAVE_UNISTD_H) # include #endif +#if !defined(__linux__) #define NEW_TTY_DRIVER +#else +#define TERMIOS_TTY_DRIVER +#endif #define HAVE_BSD_SIGNALS /* #define USE_XON_XOFF */ @@@@ -80,6 +90,10 @@@@ static char *xmalloc (), *xrealloc (); # if !defined (O_NDELAY) # define O_NDELAY O_NONBLOCK /* Posix-style non-blocking i/o */ # endif /* O_NDELAY */ +#else +# ifdef TERMIOS_TTY_DRIVER +# include +# endif /* !TERMIOS_MISSING */ #endif /* _POSIX_VERSION */ /* Other (BSD) machines use sgtty. */ @@@@ -104,7 +118,6 @@@@ static char *xmalloc (), *xrealloc (); #endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ #include -extern int errno; #include #if defined (SHELL) @@@@ -133,7 +146,7 @@@@ struct passwd *getpwuid (), *getpwent () # endif /* USGr3 */ #endif /* USG && hpux */ -#if defined (_POSIX_VERSION) || defined (USGr3) +#if defined (_POSIX_VERSION) || defined (USGr3) || defined(__linux__) # include # define direct dirent # if defined (_POSIX_VERSION) @@@@ -204,10 +217,13 @@@@ extern char *index (); extern char *getenv (); extern char *tilde_expand (); -static update_line (); +static void update_line (char *, char *, int); static void output_character_function (); -static delete_chars (); +static void delete_chars (int); static insert_some_chars (); +static void move_vert (int to); +static void rl_digit_loop (void); +static void free_history_entry(HIST_ENTRY *entry); #if defined (VOID_SIGHANDLER) # define sighandler void @@@@ -280,7 +296,7 @@@@ static jmp_buf readline_top_level; static FILE *in_stream, *out_stream; /* The names of the streams that we do input and output to. */ -FILE *rl_instream = stdin, *rl_outstream = stdout; +FILE *rl_instream = NULL, *rl_outstream = NULL; /* Non-zero means echo characters as they are read. */ int readline_echoing_p = 1; @@@@ -335,6 +351,8 @@@@ static int stricmp (), strnicmp (); /* Non-zero means to save keys that we dispatch on in a kbd macro. */ static int defining_kbd_macro = 0; +static void init_terminal_io (char *terminal_name); + /* **************************************************************** */ /* */ @@@@ -744,7 +762,7 @@@@ rl_unget_char (key) /* If a character is available to be read, then read it and stuff it into IBUFFER. Otherwise, just return. */ -rl_gather_tyi () +static void rl_gather_tyi (void) { int tty = fileno (in_stream); register int tem, result = -1; @@@@ -861,7 +879,7 @@@@ rl_dispatch (key, map) } else ding (); - return; + return 0; } switch (map[key].type) @@@@ -876,7 +894,7 @@@@ rl_dispatch (key, map) if (func == rl_do_lowercase_version) { rl_dispatch (to_lower (key), map); - return; + return 0; } (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); @@@@ -890,7 +908,7 @@@@ rl_dispatch (key, map) else { rl_abort (); - return; + return 0; } } break; @@@@ -907,7 +925,7 @@@@ rl_dispatch (key, map) else { rl_abort (); - return; + return 0; } break; @@@@ -918,10 +936,11 @@@@ rl_dispatch (key, map) macro = savestring ((char *)map[key].function); with_macro_input (macro); - return; + return 0; } break; } + return 0; } @@@@ -1152,6 +1171,8 @@@@ readline_initialize_everything () { /* Find out if we are running in Emacs. */ running_in_emacs = getenv ("EMACS"); + rl_instream = stdin; + rl_outstream = stdout; /* Allocate data structures. */ if (!rl_line_buffer) @@@@ -1320,7 +1341,7 @@@@ rl_universal_argument () rl_digit_loop (); } -rl_digit_loop () +static void rl_digit_loop (void) { int key, c; while (1) @@@@ -1450,7 +1471,7 @@@@ static void output_character_function () static int compare_strings (); /* Basic redisplay algorithm. */ -rl_redisplay () +void rl_redisplay (void) { register int in, out, c, linenum; register char *line = invisible_line; @@@@ -1677,10 +1698,8 @@@@ new: eddie> Oh, my little buggy says to no differences, as well as for end of line additions must be handeled. Could be made even smarter, but this works well enough */ -static -update_line (old, new, current_line) - register char *old, *new; - int current_line; +static void +update_line (char *old, char *new, int current_line) { register char *ofd, *ols, *oe, *nfd, *nls, *ne; int lendiff, wsatend; @@@@ -1872,8 +1891,7 @@@@ move_cursor_relative (new, data) } /* PWP: move the cursor up or down. */ -move_vert (to) - int to; +static void move_vert (int to) { void output_character_function (); register int delta, i; @@@@ -2018,8 +2036,7 @@@@ rl_reset_terminal (terminal_name) init_terminal_io (terminal_name); } -init_terminal_io (terminal_name) - char *terminal_name; +static void init_terminal_io (char *terminal_name) { extern char *tgetstr (); char *term, *buffer; @@@@ -2158,9 +2175,8 @@@@ output_some_chars (string, count) } /* Delete COUNT characters from the display line. */ -static -delete_chars (count) - int count; +static void +delete_chars (int count) { if (count > screenwidth) return; @@@@ -2505,7 +2521,11 @@@@ rl_prep_terminal () tio.c_lflag &= ~(ICANON | ECHO); - if (otio.c_cc[VEOF] != _POSIX_VDISABLE) +#ifdef ONLCR + tio.c_oflag |= OPOST|ONLCR; +#endif + + if ((unsigned char)otio.c_cc[VEOF] != (unsigned char)_POSIX_VDISABLE) eof_char = otio.c_cc[VEOF]; #if defined (USE_XON_XOFF) @@@@ -2637,7 +2657,7 @@@@ alphabetic (c) return (1); if (allow_pathname_alphabetic_chars) - return ((int)rindex (pathname_alphabetic_chars, c)); + return (rindex (pathname_alphabetic_chars, c) != NULL); else return (0); } @@@@ -2845,12 +2865,13 @@@@ rl_forward (count) #endif /* VI_MODE */ { ding (); - return; + return 0; } else rl_point++; --count; } + return 0; } /* Move backward COUNT characters. */ @@@@ -2865,12 +2886,13 @@@@ rl_backward (count) if (!rl_point) { ding (); - return; + return 0; } else --rl_point; --count; } + return 0; } /* Move to the beginning of the line. */ @@@@ -2894,13 +2916,13 @@@@ rl_forward_word (count) if (count < 0) { rl_backward_word (-count); - return; + return 0; } while (count) { if (rl_point == rl_end) - return; + return 0; /* If we are not in a word, move forward until we are in one. Then, move forward until we hit a non-alphabetic character. */ @@@@ -2913,7 +2935,7 @@@@ rl_forward_word (count) if (alphabetic (c)) break; } } - if (rl_point == rl_end) return; + if (rl_point == rl_end) return 0; while (++rl_point < rl_end) { c = the_line[rl_point]; @@@@ -2921,6 +2943,7 @@@@ rl_forward_word (count) } --count; } + return 0; } /* Move backward a word. We do what Emacs does. */ @@@@ -2932,13 +2955,13 @@@@ rl_backward_word (count) if (count < 0) { rl_forward_word (-count); - return; + return 0; } while (count) { if (!rl_point) - return; + return 0; /* Like rl_forward_word (), except that we look at the characters just before point. */ @@@@ -2962,6 +2985,7 @@@@ rl_backward_word (count) } --count; } + return 0; } /* Clear the current line. Numeric argument to C-l does this. */ @@@@ -2990,7 +3014,7 @@@@ rl_clear_screen () if (rl_explicit_arg) { rl_refresh_line (); - return; + return 0; } if (term_clrpag) @@@@ -3000,6 +3024,7 @@@@ rl_clear_screen () rl_forced_update_display (); rl_display_fixed = 1; + return 0; } rl_arrow_keys (count, c) @@@@ -3047,7 +3072,7 @@@@ rl_insert (count, c) char *string; if (count <= 0) - return; + return 0; /* If we can optimize, then do it. But don't let people crash readline because of extra large arguments. */ @@@@ -3060,7 +3085,7 @@@@ rl_insert (count, c) string[i] = '\0'; rl_insert_text (string); - return; + return 0; } if (count > 1024) @@@@ -3079,7 +3104,7 @@@@ rl_insert (count, c) rl_insert_text (string); count -= decreaser; } - return; + return 0; } /* We are inserting a single character. @@@@ -3104,7 +3129,6 @@@@ rl_insert (count, c) string[i] = '\0'; rl_insert_text (string); - return; } else { @@@@ -3115,6 +3139,7 @@@@ rl_insert (count, c) string[0] = c; rl_insert_text (string); } + return 0; } /* Insert the next typed character verbatim. */ @@@@ -3127,9 +3152,10 @@@@ rl_quoted_insert (count) if (c==0x01) { printf("\007"); - return; + return 0; } rl_insert (count, c); + return 0; } /* Insert a tab character. */ @@@@ -3196,14 +3222,14 @@@@ rl_rubout (count) if (count < 0) { rl_delete (-count); - return; + return 0; } if (!rl_point) { ding (); last_command_was_kill++; - return; + return 0; } if (count > 1) @@@@ -3228,6 +3254,7 @@@@ rl_rubout (count) rl_display_fixed++; } } + return 0; } /* Delete the character under the cursor. Given a numeric argument, @@@@ -3238,13 +3265,13 @@@@ rl_delete (count, invoking_key) if (count < 0) { rl_rubout (-count); - return; + return 0; } if (rl_point == rl_end) { ding (); - return; + return 0; } if (count > 1) @@@@ -3256,6 +3283,7 @@@@ rl_delete (count, invoking_key) } else rl_delete_text (rl_point, rl_point + 1); + return 0; } @@@@ -3412,7 +3440,7 @@@@ rl_transpose_words (count) int w1_beg, w1_end, w2_beg, w2_end; int orig_point = rl_point; - if (!count) return; + if (!count) return 0; /* Find the two words. */ rl_forward_word (count); @@@@ -3429,7 +3457,7 @@@@ rl_transpose_words (count) { ding (); rl_point = orig_point; - return; + return 0; } /* Get the text of the words. */ @@@@ -3457,6 +3485,7 @@@@ rl_transpose_words (count) /* I think that does it. */ rl_end_undo_group (); free (word1); free (word2); + return 0; } /* Transpose the characters at point. If point is at the end of the line, @@@@ -3465,11 +3494,11 @@@@ rl_transpose_chars (count) int count; { if (!count) - return; + return 0; if (!rl_point || rl_end < 2) { ding (); - return; + return 0; } while (count) @@@@ -3499,6 +3528,7 @@@@ rl_transpose_chars (count) else count--; } + return 0; } @@@@ -3570,7 +3600,7 @@@@ Function *rl_completion_entry_function = If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ -Function *rl_attempted_completion_function = (Function *)NULL; +CPPFunction *rl_attempted_completion_function = (CPPFunction *)NULL; /* Local variable states what happened during the last completion attempt. */ static int completion_changed_buffer = 0; @@@@ -3706,8 +3736,7 @@@@ rl_complete_internal (what_to_do) variable rl_attempted_completion_function. */ if (rl_attempted_completion_function) { - matches = - (char **)(*rl_attempted_completion_function) (text, start, end); + matches = (*rl_attempted_completion_function) (text, start, end); if (matches) { @@@@ -3760,8 +3789,7 @@@@ rl_complete_internal (what_to_do) /* We have marked all the dead slots with (char *)-1. Copy all the non-dead entries into a new array. */ { - char **temp_array = - (char **)malloc ((3 + newlen) * sizeof (char *)); + char **temp_array = malloc ((3 + newlen) * sizeof (char *)); for (i = 1, j = 1; matches[i]; i++) { @@@@ -4236,7 +4264,7 @@@@ rl_revert_line () /* Do some undoing of things that were done. */ rl_undo_command (count) { - if (count < 0) return; /* Nothing to do. */ + if (count < 0) return 0; /* Nothing to do. */ while (count) { @@@@ -4250,6 +4278,7 @@@@ rl_undo_command (count) break; } } + return 0; } /* **************************************************************** */ @@@@ -4277,8 +4306,7 @@@@ start_using_history () } /* Free the contents (and containing structure) of a HIST_ENTRY. */ -free_history_entry (entry) - HIST_ENTRY *entry; +static void free_history_entry(HIST_ENTRY *entry) { if (!entry) return; if (entry->line) @@@@ -4362,11 +4390,11 @@@@ rl_get_next_history (count) if (count < 0) { rl_get_previous_history (-count); - return; + return 0; } if (!count) - return; + return 0; maybe_replace_line (); @@@@ -4397,6 +4425,7 @@@@ rl_get_next_history (count) rl_point = 0; #endif /* VI_MODE */ } + return 0; } /* Get the previous item out of our interactive history, making it the current @@@@ -4410,11 +4439,11 @@@@ rl_get_previous_history (count) if (count < 0) { rl_get_next_history (-count); - return; + return 0; } if (!count) - return; + return 0; /* If we don't have a line saved, then save this one. */ maybe_save_line (); @@@@ -4457,6 +4486,7 @@@@ rl_get_previous_history (count) rl_point = 0; #endif /* VI_MODE */ } + return 0; } @@@@ -4643,7 +4673,7 @@@@ rl_search_history (direction, invoking_k rl_point = orig_point; rl_end = strlen (the_line); rl_clear_message (); - return; + return 0; default: if (c < 32 || c > 126) @@@@ -4779,6 +4809,7 @@@@ rl_search_history (direction, invoking_k rl_point = index; rl_clear_message (); } + return 0; } /* Make C be the next command to be executed. */ @@@@ -4831,7 +4862,7 @@@@ rl_kill_text (from, to) { free (text); last_command_was_kill++; - return; + return 0; } /* Delete the copied text from the line. */ @@@@ -4902,6 +4933,7 @@@@ rl_kill_text (from, to) } rl_kill_index = slot; last_command_was_kill++; + return 0; } /* Now REMEMBER! In order to do prepending or appending correctly, kill @@@@ -5039,14 +5071,14 @@@@ rl_yank_nth_arg (count, ignore) else { ding (); - return; + return 0; } arg = history_arg_extract (count, count, entry->line); if (!arg || !*arg) { ding (); - return; + return 0; } rl_begin_undo_group (); @@@@ -5065,6 +5097,7 @@@@ rl_yank_nth_arg (count, ignore) free (arg); rl_end_undo_group (); + return 0; } /* How to toggle back and forth between editing modes. */ @@@@ -5417,9 +5450,10 @@@@ rl_macro_bind (keyseq, macro, map) if (rl_translate_keyseq (macro, macro_keys, ¯o_keys_len)) { free (macro_keys); - return; + return 0; } rl_generic_bind (ISMACR, keyseq, macro_keys, map); + return 0; } /* Bind the key sequence represented by the string KEYSEQ to @@@@ -5441,7 +5475,7 @@@@ rl_generic_bind (type, keyseq, data, map { if (type == ISMACR) free (data); - return; + return 0; } keys = (char *)alloca (1 + (2 * strlen (keyseq))); @@@@ -5450,7 +5484,7 @@@@ rl_generic_bind (type, keyseq, data, map of characters. Stuff the characters into ARRAY, and the length of ARRAY into LENGTH. */ if (rl_translate_keyseq (keyseq, keys, &keys_len)) - return; + return 0; /* Bind keys, making new keymaps as necessary. */ for (i = 0; i < keys_len; i++) @@@@ -5476,6 +5510,7 @@@@ rl_generic_bind (type, keyseq, data, map map[keys[i]].type = type; } } + return 0; } /* Translate the ASCII representation of SEQ, stuffing the @@@@ -5661,7 +5696,7 @@@@ parser_if (args) /* If parsing is turned off, then nothing can turn it back on except for finding the matching endif. In that case, return right now. */ if (parsing_conditionalized_out) - return; + return 0; /* Isolate first argument. */ for (i = 0; args[i] && !whitespace (args[i]); i++); @@@@ -5713,6 +5748,7 @@@@ parser_if (args) parsing_conditionalized_out = 0; else parsing_conditionalized_out = 1; + return 0; } /* Invert the current parser state if there is anything on the stack. */ @@@@ -5724,17 +5760,18 @@@@ parser_else (args) if (!if_stack_depth) { /* Error message? */ - return; + return 0; } /* Check the previous (n - 1) levels of the stack to make sure that we haven't previously turned off parsing. */ for (i = 0; i < if_stack_depth - 1; i++) if (if_stack[i] == 1) - return; + return 0; /* Invert the state of parsing if at top level. */ parsing_conditionalized_out = !parsing_conditionalized_out; + return 0; } /* Terminate a conditional, popping the value of @@@@ -5819,18 +5856,18 @@@@ rl_parse_and_bind (string) string++; if (!string || !*string || *string == '#') - return; + return 0; /* If this is a parser directive, act on it. */ if (*string == '$') { handle_parser_directive (&string[1]); - return; + return 0; } /* If we are supposed to be skipping parsing right now, then do it. */ if (parsing_conditionalized_out) - return; + return 0; i = 0; /* If this keyname is a complex key expression surrounded by quotes, @@@@ -5868,7 +5905,7 @@@@ rl_parse_and_bind (string) while (*value && whitespace (*value)) value++; rl_variable_bind (var, value); - return; + return 0; } /* Skip any whitespace between keyname and funname. */ @@@@ -5928,7 +5965,7 @@@@ rl_parse_and_bind (string) else rl_set_key (seq, rl_named_function (funname), keymap); - return; + return 0; } /* Get the actual character we want to deal with. */ @@@@ -5972,6 +6009,7 @@@@ rl_parse_and_bind (string) #endif /* PREFIX_META_HACK */ else rl_bind_key (key, rl_named_function (funname)); + return 0; } rl_variable_bind (name, value) @ 1.5 log @Fix build with clang by using more void and proper return values. @ text @d1 3 a3 1 $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $ d7 1 a7 1 @@@@ -38,17 +38,25 @@@@ static char *xmalloc (), *xrealloc (); d12 1 d14 1 d35 1 a35 1 @@@@ -80,6 +88,10 @@@@ static char *xmalloc (), *xrealloc (); d46 1 a46 1 @@@@ -104,7 +116,6 @@@@ static char *xmalloc (), *xrealloc (); d54 1 a54 1 @@@@ -133,7 +144,7 @@@@ struct passwd *getpwuid (), *getpwent () d63 1 a63 1 @@@@ -204,10 +215,13 @@@@ extern char *index (); d79 1 a79 1 @@@@ -280,7 +294,7 @@@@ static jmp_buf readline_top_level; d88 1 a88 1 @@@@ -335,6 +349,8 @@@@ static int stricmp (), strnicmp (); d97 1 a97 1 @@@@ -744,7 +760,7 @@@@ rl_unget_char (key) d106 1 a106 1 @@@@ -861,7 +877,7 @@@@ rl_dispatch (key, map) d115 1 a115 1 @@@@ -876,7 +892,7 @@@@ rl_dispatch (key, map) d124 1 a124 1 @@@@ -890,7 +906,7 @@@@ rl_dispatch (key, map) d133 1 a133 1 @@@@ -907,7 +923,7 @@@@ rl_dispatch (key, map) d142 1 a142 1 @@@@ -918,10 +934,11 @@@@ rl_dispatch (key, map) d155 1 a155 1 @@@@ -1152,6 +1169,8 @@@@ readline_initialize_everything () d164 1 a164 1 @@@@ -1320,7 +1339,7 @@@@ rl_universal_argument () d173 1 a173 1 @@@@ -1450,7 +1469,7 @@@@ static void output_character_function () d182 1 a182 1 @@@@ -1677,10 +1696,8 @@@@ new: eddie> Oh, my little buggy says to d195 1 a195 1 @@@@ -1872,8 +1889,7 @@@@ move_cursor_relative (new, data) d205 1 a205 1 @@@@ -2018,8 +2034,7 @@@@ rl_reset_terminal (terminal_name) d215 1 a215 1 @@@@ -2158,9 +2173,8 @@@@ output_some_chars (string, count) d227 1 a227 1 @@@@ -2505,7 +2519,11 @@@@ rl_prep_terminal () d240 1 a240 1 @@@@ -2637,7 +2655,7 @@@@ alphabetic (c) d249 1 a249 1 @@@@ -2845,12 +2863,13 @@@@ rl_forward (count) d264 1 a264 1 @@@@ -2865,12 +2884,13 @@@@ rl_backward (count) d279 1 a279 1 @@@@ -2894,13 +2914,13 @@@@ rl_forward_word (count) d295 1 a295 1 @@@@ -2913,7 +2933,7 @@@@ rl_forward_word (count) d304 1 a304 1 @@@@ -2921,6 +2941,7 @@@@ rl_forward_word (count) d312 1 a312 1 @@@@ -2932,13 +2953,13 @@@@ rl_backward_word (count) d328 1 a328 1 @@@@ -2962,6 +2983,7 @@@@ rl_backward_word (count) d336 1 a336 1 @@@@ -2990,7 +3012,7 @@@@ rl_clear_screen () d345 1 a345 1 @@@@ -3000,6 +3022,7 @@@@ rl_clear_screen () d353 1 a353 1 @@@@ -3047,7 +3070,7 @@@@ rl_insert (count, c) d362 1 a362 1 @@@@ -3060,7 +3083,7 @@@@ rl_insert (count, c) d371 1 a371 1 @@@@ -3079,7 +3102,7 @@@@ rl_insert (count, c) d380 1 a380 1 @@@@ -3104,7 +3127,6 @@@@ rl_insert (count, c) d388 1 a388 1 @@@@ -3115,6 +3137,7 @@@@ rl_insert (count, c) d396 1 a396 1 @@@@ -3127,9 +3150,10 @@@@ rl_quoted_insert (count) d408 1 a408 1 @@@@ -3196,14 +3220,14 @@@@ rl_rubout (count) d425 1 a425 1 @@@@ -3228,6 +3252,7 @@@@ rl_rubout (count) d433 1 a433 1 @@@@ -3238,13 +3263,13 @@@@ rl_delete (count, invoking_key) d449 1 a449 1 @@@@ -3256,6 +3281,7 @@@@ rl_delete (count, invoking_key) d457 1 a457 1 @@@@ -3412,7 +3438,7 @@@@ rl_transpose_words (count) d466 1 a466 1 @@@@ -3429,7 +3455,7 @@@@ rl_transpose_words (count) d475 1 a475 1 @@@@ -3457,6 +3483,7 @@@@ rl_transpose_words (count) d483 1 a483 1 @@@@ -3465,11 +3492,11 @@@@ rl_transpose_chars (count) d497 1 a497 1 @@@@ -3499,6 +3526,7 @@@@ rl_transpose_chars (count) d505 1 a505 1 @@@@ -3570,7 +3598,7 @@@@ Function *rl_completion_entry_function = d514 1 a514 1 @@@@ -3706,8 +3734,7 @@@@ rl_complete_internal (what_to_do) d524 1 a524 1 @@@@ -3760,8 +3787,7 @@@@ rl_complete_internal (what_to_do) d534 1 a534 1 @@@@ -4236,7 +4262,7 @@@@ rl_revert_line () d543 1 a543 1 @@@@ -4250,6 +4276,7 @@@@ rl_undo_command (count) d551 1 a551 1 @@@@ -4277,8 +4304,7 @@@@ start_using_history () d561 1 a561 1 @@@@ -4362,11 +4388,11 @@@@ rl_get_next_history (count) d575 1 a575 1 @@@@ -4397,6 +4423,7 @@@@ rl_get_next_history (count) d583 1 a583 1 @@@@ -4410,11 +4437,11 @@@@ rl_get_previous_history (count) d597 1 a597 1 @@@@ -4457,6 +4484,7 @@@@ rl_get_previous_history (count) d605 1 a605 1 @@@@ -4643,7 +4671,7 @@@@ rl_search_history (direction, invoking_k d614 1 a614 1 @@@@ -4779,6 +4807,7 @@@@ rl_search_history (direction, invoking_k d622 1 a622 1 @@@@ -4831,7 +4860,7 @@@@ rl_kill_text (from, to) d631 1 a631 1 @@@@ -4902,6 +4931,7 @@@@ rl_kill_text (from, to) d639 1 a639 1 @@@@ -5039,14 +5069,14 @@@@ rl_yank_nth_arg (count, ignore) d656 1 a656 1 @@@@ -5065,6 +5095,7 @@@@ rl_yank_nth_arg (count, ignore) d664 1 a664 1 @@@@ -5417,9 +5448,10 @@@@ rl_macro_bind (keyseq, macro, map) d676 1 a676 1 @@@@ -5441,7 +5473,7 @@@@ rl_generic_bind (type, keyseq, data, map d685 1 a685 1 @@@@ -5450,7 +5482,7 @@@@ rl_generic_bind (type, keyseq, data, map d694 1 a694 1 @@@@ -5476,6 +5508,7 @@@@ rl_generic_bind (type, keyseq, data, map d702 1 a702 1 @@@@ -5661,7 +5694,7 @@@@ parser_if (args) d711 1 a711 1 @@@@ -5713,6 +5746,7 @@@@ parser_if (args) d719 1 a719 1 @@@@ -5724,17 +5758,18 @@@@ parser_else (args) d740 1 a740 1 @@@@ -5819,18 +5854,18 @@@@ rl_parse_and_bind (string) d762 1 a762 1 @@@@ -5868,7 +5903,7 @@@@ rl_parse_and_bind (string) d771 1 a771 1 @@@@ -5928,7 +5963,7 @@@@ rl_parse_and_bind (string) d780 1 a780 1 @@@@ -5972,6 +6007,7 @@@@ rl_parse_and_bind (string) @ 1.4 log @make this work on 64 bit platforms: - fix warnings for missing prototypes - use termios instead of sgtty (why doesn't this work on amd64?) @ text @d1 1 a1 1 $NetBSD$ d3 10 a12 5 $NetBSD: patch-an,v 1.3 2006/05/15 15:33:00 christos Exp $ --- readline/readline.c.orig 1995-02-24 16:20:03.000000000 -0500 +++ readline/readline.c 2006-05-15 10:41:51.000000000 -0400 @@@@ -43,12 +43,18 @@@@ d31 1 a31 1 @@@@ -80,6 +86,10 @@@@ d42 1 a42 1 @@@@ -104,7 +114,6 @@@@ d50 1 a50 1 @@@@ -133,7 +142,7 @@@@ d59 17 a75 1 @@@@ -280,7 +289,7 @@@@ d84 68 a151 1 @@@@ -1152,6 +1161,8 @@@@ d160 64 a223 1 @@@@ -2505,7 +2516,11 @@@@ d236 1 a236 1 @@@@ -2637,7 +2652,7 @@@@ d245 257 a501 1 @@@@ -3570,7 +3585,7 @@@@ d510 1 a510 1 @@@@ -3706,8 +3721,7 @@@@ d520 1 a520 1 @@@@ -3760,8 +3774,7 @@@@ d530 254 @ 1.3 log @Make this work with 64 bit hosts. @ text @d3 2 @ 1.2 log @Teach the backbone of NetBSD communication some ISO C tricks. - no errno, use errno.h - no redefinition of function parameters as local variables [how did this ever work?!] - malloc comes from stdlib.h - NAME_MAX is prefered when available, it is POSIX - strchr, strpbrk, strspn, strstr, strtol and strtoul can and should be used from libc. - remove tcl version of string.h, system header is good enough (and if it doesn't have index, it would have been broken anyway) @ text @d3 10 a12 3 --- readline/readline.c.orig 1995-02-24 21:20:03.000000000 +0000 +++ readline/readline.c @@@@ -48,7 +48,11 @@@@ static char *xmalloc (), *xrealloc (); d24 1 a24 1 @@@@ -80,6 +84,10 @@@@ static char *xmalloc (), *xrealloc (); d35 1 a35 1 @@@@ -104,7 +112,6 @@@@ static char *xmalloc (), *xrealloc (); d43 1 a43 1 @@@@ -133,7 +140,7 @@@@ struct passwd *getpwuid (), *getpwent () d52 1 a52 1 @@@@ -280,7 +287,7 @@@@ static jmp_buf readline_top_level; d61 1 a61 1 @@@@ -1152,6 +1159,8 @@@@ readline_initialize_everything () d70 1 a70 1 @@@@ -2505,7 +2514,11 @@@@ rl_prep_terminal () d83 38 @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-an,v 1.1 1999/11/26 22:12:38 hubertf Exp $ d3 3 a5 4 diff -x *.orig -urN ./readline/readline.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/readline/readline.c --- ./readline/readline.c Fri Feb 24 22:20:03 1995 +++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/readline/readline.c Fri Nov 26 22:56:30 1999 @@@@ -48,7 +48,11 @@@@ d17 1 a17 1 @@@@ -80,6 +84,10 @@@@ d28 9 a36 1 @@@@ -133,7 +141,7 @@@@ d45 1 a45 1 @@@@ -280,7 +288,7 @@@@ d54 1 a54 1 @@@@ -1152,6 +1160,8 @@@@ d63 1 a63 1 @@@@ -2505,7 +2515,11 @@@@ @ 1.1.1.1 log @Create new 'chat' category, featuring chat clients and servers of all kinds. Move some packages from 'net' here. @ text @@