%setup -q -n %{name}-%{pkg_version}
%build
-export CFLAGS+=" -flto "
-export CXXFLAGS+=" -flto "
+export CFLAGS+=" -flto -fvisibility=hidden -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "
+export CXXFLAGS+=" -flto -fvisibility=hidden -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "
NOCONFIGURE=1 autoreconf -fiv
%configure --disable-static --with-pic \
--disable-silent-rules \
*/
#define VI_MOVE
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef struct c_macro_t {
int level;
protected int cv__isword(Int);
protected int cv__isWord(Int);
protected void cv_delfini(EditLine *);
-protected Char *cv__endword(Char *, Char *, int, int (*)(Int));
+EXPORT_API protected Char *cv__endword(Char *, Char *, int, int (*)(Int));
protected int ce__isword(Int);
protected void cv_undo(EditLine *);
protected void cv_yank(EditLine *, const Char *, int);
-protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int));
-protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int));
-protected Char *c__next_word(Char *, Char *, int, int (*)(Int));
-protected Char *c__prev_word(Char *, Char *, int, int (*)(Int));
+EXPORT_API protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int));
+EXPORT_API protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int));
+EXPORT_API protected Char *c__next_word(Char *, Char *, int, int (*)(Int));
+EXPORT_API protected Char *c__prev_word(Char *, Char *, int, int (*)(Int));
protected void c_insert(EditLine *, int);
protected void c_delbefore(EditLine *, int);
protected void c_delbefore1(EditLine *);
/* Turn the given character into the appropriate visual format, matching
* the width given by ct_visual_width(). Returns the number of characters used
* up, or -1 if insufficient space. Buffer length is in count of Char's. */
-protected ssize_t ct_visual_char(Char *, size_t, Char);
+
+ #ifndef EXPORT_API
+ #define EXPORT_API
+ #endif // EXPORT_API
+
+EXPORT_API protected ssize_t ct_visual_char(Char *, size_t, Char);
/* Convert the given string into visual format, using the ct_visual_char()
* function. Uses a static buffer, so not threadsafe. */
#include <sys/types.h>
#include <stdio.h>
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
/* list of readline stuff supported by editline library's readline wrapper */
/* typedefs */
#ifdef __cplusplus
extern "C" {
#endif
-extern const char *rl_library_version;
-extern int rl_readline_version;
-extern char *rl_readline_name;
-extern FILE *rl_instream;
-extern FILE *rl_outstream;
-extern char *rl_line_buffer;
-extern int rl_point, rl_end;
-extern int history_base, history_length;
-extern int max_input_history;
-extern char *rl_basic_word_break_characters;
-extern char *rl_completer_word_break_characters;
-extern char *rl_completer_quote_characters;
-extern Function *rl_completion_entry_function;
-extern char *(*rl_completion_word_break_hook)(void);
-extern CPPFunction *rl_attempted_completion_function;
-extern int rl_attempted_completion_over;
-extern int rl_completion_type;
-extern int rl_completion_query_items;
-extern char *rl_special_prefixes;
-extern int rl_completion_append_character;
-extern int rl_inhibit_completion;
-extern Function *rl_pre_input_hook;
-extern Function *rl_startup_hook;
-extern char *rl_terminal_name;
-extern int rl_already_prompted;
-extern char *rl_prompt;
+EXPORT_API extern const char *rl_library_version;
+EXPORT_API extern int rl_readline_version;
+EXPORT_API extern char *rl_readline_name;
+EXPORT_API extern FILE *rl_instream;
+EXPORT_API extern FILE *rl_outstream;
+EXPORT_API extern char *rl_line_buffer;
+EXPORT_API EXPORT_API extern int rl_point, rl_end;
+EXPORT_API EXPORT_API extern int history_base, history_length;
+EXPORT_API extern int max_input_history;
+EXPORT_API extern char *rl_basic_word_break_characters;
+EXPORT_API extern char *rl_completer_word_break_characters;
+EXPORT_API extern char *rl_completer_quote_characters;
+EXPORT_API extern Function *rl_completion_entry_function;
+EXPORT_API extern char *(*rl_completion_word_break_hook)(void);
+EXPORT_API extern CPPFunction *rl_attempted_completion_function;
+EXPORT_API extern int rl_attempted_completion_over;
+EXPORT_API extern int rl_completion_type;
+EXPORT_API extern int rl_completion_query_items;
+EXPORT_API extern char *rl_special_prefixes;
+EXPORT_API extern int rl_completion_append_character;
+EXPORT_API extern int rl_inhibit_completion;
+EXPORT_API extern Function *rl_pre_input_hook;
+EXPORT_API extern Function *rl_startup_hook;
+EXPORT_API extern char *rl_terminal_name;
+EXPORT_API extern int rl_already_prompted;
+EXPORT_API extern char *rl_prompt;
/*
* The following is not implemented
*/
-extern int rl_catch_signals;
-extern int rl_catch_sigwinch;
-extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
+EXPORT_API extern int rl_catch_signals;
+EXPORT_API extern int rl_catch_sigwinch;
+EXPORT_API EXPORT_API EXPORT_API extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
emacs_meta_keymap,
emacs_ctlx_keymap;
-extern int rl_filename_completion_desired;
-extern int rl_ignore_completion_duplicates;
-extern int (*rl_getc_function)(FILE *);
-extern VFunction *rl_redisplay_function;
-extern VFunction *rl_completion_display_matches_hook;
-extern VFunction *rl_prep_term_function;
-extern VFunction *rl_deprep_term_function;
-extern int readline_echoing_p;
-extern int _rl_print_completions_horizontally;
+EXPORT_API extern int rl_filename_completion_desired;
+EXPORT_API extern int rl_ignore_completion_duplicates;
+EXPORT_API extern int (*rl_getc_function)(FILE *);
+EXPORT_API extern VFunction *rl_redisplay_function;
+EXPORT_API extern VFunction *rl_completion_display_matches_hook;
+EXPORT_API extern VFunction *rl_prep_term_function;
+EXPORT_API extern VFunction *rl_deprep_term_function;
+EXPORT_API extern int readline_echoing_p;
+EXPORT_API extern int _rl_print_completions_horizontally;
/* supported functions */
-char *readline(const char *);
-int rl_initialize(void);
-
-void using_history(void);
-int add_history(const char *);
-void clear_history(void);
-void stifle_history(int);
-int unstifle_history(void);
-int history_is_stifled(void);
-int where_history(void);
-HIST_ENTRY *current_history(void);
-HIST_ENTRY *history_get(int);
-HIST_ENTRY *remove_history(int);
-HIST_ENTRY *replace_history_entry(int, const char *, histdata_t);
-int history_total_bytes(void);
-int history_set_pos(int);
-HIST_ENTRY *previous_history(void);
-HIST_ENTRY *next_history(void);
-int history_search(const char *, int);
-int history_search_prefix(const char *, int);
-int history_search_pos(const char *, int, int);
-int read_history(const char *);
-int write_history(const char *);
-int history_truncate_file (const char *, int);
-int history_expand(char *, char **);
-char **history_tokenize(const char *);
-const char *get_history_event(const char *, int *, int);
-char *history_arg_extract(int, int, const char *);
-
-char *tilde_expand(char *);
-char *filename_completion_function(const char *, int);
-char *username_completion_function(const char *, int);
-int rl_complete(int, int);
-int rl_read_key(void);
-char **completion_matches(const char *, CPFunction *);
-void rl_display_match_list(char **, int, int);
-
-int rl_insert(int, int);
-int rl_insert_text(const char *);
-void rl_reset_terminal(const char *);
-int rl_bind_key(int, rl_command_func_t *);
-int rl_newline(int, int);
-void rl_callback_read_char(void);
-void rl_callback_handler_install(const char *, VCPFunction *);
-void rl_callback_handler_remove(void);
-void rl_redisplay(void);
-int rl_get_previous_history(int, int);
-void rl_prep_terminal(int);
-void rl_deprep_terminal(void);
-int rl_read_init_file(const char *);
-int rl_parse_and_bind(const char *);
-int rl_variable_bind(const char *, const char *);
-void rl_stuff_char(int);
-int rl_add_defun(const char *, Function *, int);
-HISTORY_STATE *history_get_history_state(void);
-void rl_get_screen_size(int *, int *);
-void rl_set_screen_size(int, int);
-char *rl_filename_completion_function (const char *, int);
-int _rl_abort_internal(void);
-int _rl_qsort_string_compare(char **, char **);
-char **rl_completion_matches(const char *, rl_compentry_func_t *);
-void rl_forced_update_display(void);
-int rl_set_prompt(const char *);
-int rl_on_new_line(void);
+EXPORT_API char *readline(const char *);
+EXPORT_API int rl_initialize(void);
+
+EXPORT_API void using_history(void);
+EXPORT_API int add_history(const char *);
+EXPORT_API void clear_history(void);
+EXPORT_API void stifle_history(int);
+EXPORT_API int unstifle_history(void);
+EXPORT_API int history_is_stifled(void);
+EXPORT_API int where_history(void);
+EXPORT_API HIST_ENTRY *current_history(void);
+EXPORT_API HIST_ENTRY *history_get(int);
+EXPORT_API HIST_ENTRY *remove_history(int);
+EXPORT_API HIST_ENTRY *replace_history_entry(int, const char *, histdata_t);
+EXPORT_API int history_total_bytes(void);
+EXPORT_API int history_set_pos(int);
+EXPORT_API HIST_ENTRY *previous_history(void);
+EXPORT_API HIST_ENTRY *next_history(void);
+EXPORT_API int history_search(const char *, int);
+EXPORT_API int history_search_prefix(const char *, int);
+EXPORT_API int history_search_pos(const char *, int, int);
+EXPORT_API int read_history(const char *);
+EXPORT_API int write_history(const char *);
+EXPORT_API int history_truncate_file (const char *, int);
+EXPORT_API int history_expand(char *, char **);
+EXPORT_API char **history_tokenize(const char *);
+EXPORT_API const char *get_history_event(const char *, int *, int);
+EXPORT_API char *history_arg_extract(int, int, const char *);
+
+EXPORT_API char *tilde_expand(char *);
+EXPORT_API char *filename_completion_function(const char *, int);
+EXPORT_API char *username_completion_function(const char *, int);
+EXPORT_API int rl_complete(int, int);
+EXPORT_API int rl_read_key(void);
+EXPORT_API char **completion_matches(const char *, CPFunction *);
+EXPORT_API void rl_display_match_list(char **, int, int);
+
+EXPORT_API int rl_insert(int, int);
+EXPORT_API int rl_insert_text(const char *);
+EXPORT_API void rl_reset_terminal(const char *);
+EXPORT_API int rl_bind_key(int, rl_command_func_t *);
+EXPORT_API int rl_newline(int, int);
+EXPORT_API void rl_callback_read_char(void);
+EXPORT_API void rl_callback_handler_install(const char *, VCPFunction *);
+EXPORT_API void rl_callback_handler_remove(void);
+EXPORT_API void rl_redisplay(void);
+EXPORT_API int rl_get_previous_history(int, int);
+EXPORT_API void rl_prep_terminal(int);
+EXPORT_API void rl_deprep_terminal(void);
+EXPORT_API int rl_read_init_file(const char *);
+EXPORT_API int rl_parse_and_bind(const char *);
+EXPORT_API int rl_variable_bind(const char *, const char *);
+EXPORT_API void rl_stuff_char(int);
+EXPORT_API int rl_add_defun(const char *, Function *, int);
+EXPORT_API HISTORY_STATE *history_get_history_state(void);
+EXPORT_API void rl_get_screen_size(int *, int *);
+EXPORT_API void rl_set_screen_size(int, int);
+EXPORT_API char *rl_filename_completion_function (const char *, int);
+EXPORT_API int _rl_abort_internal(void);
+EXPORT_API int _rl_qsort_string_compare(char **, char **);
+EXPORT_API char **rl_completion_matches(const char *, rl_compentry_func_t *);
+EXPORT_API void rl_forced_update_display(void);
+EXPORT_API int rl_set_prompt(const char *);
+EXPORT_API int rl_on_new_line(void);
/*
* The following are not implemented
*/
-int rl_kill_text(int, int);
-Keymap rl_get_keymap(void);
-void rl_set_keymap(Keymap);
-Keymap rl_make_bare_keymap(void);
-int rl_generic_bind(int, const char *, const char *, Keymap);
-int rl_bind_key_in_map(int, rl_command_func_t *, Keymap);
-void rl_cleanup_after_signal(void);
-void rl_free_line_state(void);
+EXPORT_API int rl_kill_text(int, int);
+EXPORT_API Keymap rl_get_keymap(void);
+EXPORT_API void rl_set_keymap(Keymap);
+EXPORT_API Keymap rl_make_bare_keymap(void);
+EXPORT_API int rl_generic_bind(int, const char *, const char *, Keymap);
+EXPORT_API int rl_bind_key_in_map(int, rl_command_func_t *, Keymap);
+EXPORT_API void rl_cleanup_after_signal(void);
+EXPORT_API void rl_free_line_state(void);
#ifdef __cplusplus
}
#endif
* returns list of completions for text given
* non-static for readline.
*/
-char ** completion_matches(const char *, char *(*)(const char *, int));
+EXPORT_API char ** completion_matches(const char *, char *(*)(const char *, int));
char **
completion_matches(const char *text, char *(*genfunc)(const char *, int))
{
cur_off - (int)len, cur_off);
} else
matches = 0;
- if (!attempted_completion_function ||
+ if (!attempted_completion_function ||
(over != NULL && !*over && !matches))
matches = completion_matches(
ct_encode_string(temp, &el->el_scratch), complet_func);
}
/* matches[1] through matches[i-1] are available */
matches_num = (size_t)(i - 1);
-
+
/* newline to get on next line from command line */
(void)fprintf(el->el_outfile, "\n");
#ifndef _FILECOMPLETE_H_
#define _FILECOMPLETE_H_
-int fn_complete(EditLine *,
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
+EXPORT_API int fn_complete(EditLine *,
char *(*)(const char *, int),
char **(*)(const char *, int, int),
const Char *, const Char *, const char *(*)(const char *), size_t,
int *, int *, int *, int *);
-void fn_display_match_list(EditLine *, char **, size_t, size_t);
-char *fn_tilde_expand(const char *);
-char *fn_filename_completion_function(const char *, int);
+EXPORT_API void fn_display_match_list(EditLine *, char **, size_t, size_t);
+EXPORT_API char *fn_tilde_expand(const char *);
+EXPORT_API char *fn_filename_completion_function(const char *, int);
#endif
#include "histedit.h"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef int (*hist_fun_t)(void *, TYPE(HistEvent) *, int, ...);
typedef struct el_history_t {
protected int hist_init(EditLine *);
protected void hist_end(EditLine *);
-protected el_action_t hist_get(EditLine *);
+EXPORT_API protected el_action_t hist_get(EditLine *);
protected int hist_set(EditLine *, hist_fun_t, void *);
protected int hist_command(EditLine *, int, const Char **);
protected int hist_enlargebuf(EditLine *, size_t, size_t);
/*
* ==== Editing ====
*/
+
+ #ifndef EXPORT_API
+ #define EXPORT_API
+ #endif // EXPORT_API
+
typedef struct editline EditLine;
/*
* Initialization, cleanup, and resetting
*/
-EditLine *el_init(const char *, FILE *, FILE *, FILE *);
-EditLine *el_init_fd(const char *, FILE *, FILE *, FILE *,
+EXPORT_API EditLine *el_init(const char *, FILE *, FILE *, FILE *);
+EXPORT_API EditLine *el_init_fd(const char *, FILE *, FILE *, FILE *,
int, int, int);
-void el_end(EditLine *);
-void el_reset(EditLine *);
+EXPORT_API void el_end(EditLine *);
+EXPORT_API void el_reset(EditLine *);
/*
* Get a line, a character or push a string back in the input queue
*/
-const char *el_gets(EditLine *, int *);
-int el_getc(EditLine *, char *);
-void el_push(EditLine *, const char *);
+EXPORT_API const char *el_gets(EditLine *, int *);
+EXPORT_API int el_getc(EditLine *, char *);
+EXPORT_API void el_push(EditLine *, const char *);
/*
* Beep!
*/
-void el_beep(EditLine *);
+EXPORT_API void el_beep(EditLine *);
/*
* High level function internals control
* Parses argc, argv array and executes builtin editline commands
*/
-int el_parse(EditLine *, int, const char **);
+EXPORT_API int el_parse(EditLine *, int, const char **);
/*
* Low level editline access functions
*/
-int el_set(EditLine *, int, ...);
-int el_get(EditLine *, int, ...);
-unsigned char _el_fn_complete(EditLine *, int);
+EXPORT_API int el_set(EditLine *, int, ...);
+EXPORT_API int el_get(EditLine *, int, ...);
+EXPORT_API unsigned char _el_fn_complete(EditLine *, int);
/*
* el_set/el_get parameters
/*
* Source named file or $PWD/.editrc or $HOME/.editrc
*/
-int el_source(EditLine *, const char *);
+EXPORT_API int el_source(EditLine *, const char *);
/*
* Must be called when the terminal changes size; If EL_SIGNAL
* is set this is done automatically otherwise it is the responsibility
* of the application
*/
-void el_resize(EditLine *);
+EXPORT_API void el_resize(EditLine *);
/*
* User-defined function interface.
*/
-const LineInfo *el_line(EditLine *);
-int el_insertstr(EditLine *, const char *);
-void el_deletestr(EditLine *, int);
+EXPORT_API const LineInfo *el_line(EditLine *);
+EXPORT_API int el_insertstr(EditLine *, const char *);
+EXPORT_API void el_deletestr(EditLine *, int);
/*
/*
* History access functions.
*/
-History * history_init(void);
-void history_end(History *);
+EXPORT_API History * history_init(void);
+EXPORT_API void history_end(History *);
-int history(History *, HistEvent *, int, ...);
+EXPORT_API int history(History *, HistEvent *, int, ...);
#define H_FUNC 0 /* , UTSL */
#define H_SETSIZE 1 /* , const int); */
/*
* String tokenization functions, using simplified sh(1) quoting rules
*/
-Tokenizer *tok_init(const char *);
-void tok_end(Tokenizer *);
-void tok_reset(Tokenizer *);
-int tok_line(Tokenizer *, const LineInfo *,
+EXPORT_API Tokenizer *tok_init(const char *);
+EXPORT_API void tok_end(Tokenizer *);
+EXPORT_API void tok_reset(Tokenizer *);
+EXPORT_API int tok_line(Tokenizer *, const LineInfo *,
int *, const char ***, int *, int *);
-int tok_str(Tokenizer *, const char *,
+EXPORT_API int tok_str(Tokenizer *, const char *,
int *, const char ***);
/*
const wchar_t *lastchar;
} LineInfoW;
-const wchar_t *el_wgets(EditLine *, int *);
-int el_wgetc(EditLine *, wchar_t *);
-void el_wpush(EditLine *, const wchar_t *);
+EXPORT_API const wchar_t *el_wgets(EditLine *, int *);
+EXPORT_API int el_wgetc(EditLine *, wchar_t *);
+EXPORT_API void el_wpush(EditLine *, const wchar_t *);
-int el_wparse(EditLine *, int, const wchar_t **);
+EXPORT_API int el_wparse(EditLine *, int, const wchar_t **);
-int el_wset(EditLine *, int, ...);
-int el_wget(EditLine *, int, ...);
+EXPORT_API int el_wset(EditLine *, int, ...);
+EXPORT_API int el_wget(EditLine *, int, ...);
-int el_cursor(EditLine *, int);
-const LineInfoW *el_wline(EditLine *);
-int el_winsertstr(EditLine *, const wchar_t *);
+EXPORT_API int el_cursor(EditLine *, int);
+EXPORT_API const LineInfoW *el_wline(EditLine *);
+EXPORT_API int el_winsertstr(EditLine *, const wchar_t *);
#define el_wdeletestr el_deletestr
/*
typedef struct historyW HistoryW;
-HistoryW * history_winit(void);
-void history_wend(HistoryW *);
+EXPORT_API HistoryW * history_winit(void);
+EXPORT_API void history_wend(HistoryW *);
-int history_w(HistoryW *, HistEventW *, int, ...);
+EXPORT_API int history_w(HistoryW *, HistEventW *, int, ...);
/*
* ==== Tokenization ====
typedef struct tokenizerW TokenizerW;
/* Wide character tokenizer support */
-TokenizerW *tok_winit(const wchar_t *);
-void tok_wend(TokenizerW *);
-void tok_wreset(TokenizerW *);
-int tok_wline(TokenizerW *, const LineInfoW *,
+EXPORT_API TokenizerW *tok_winit(const wchar_t *);
+EXPORT_API void tok_wend(TokenizerW *);
+EXPORT_API void tok_wreset(TokenizerW *);
+EXPORT_API int tok_wline(TokenizerW *, const LineInfoW *,
int *, const wchar_t ***, int *, int *);
-int tok_wstr(TokenizerW *, const wchar_t *,
+EXPORT_API int tok_wstr(TokenizerW *, const wchar_t *,
int *, const wchar_t ***);
#ifdef __cplusplus
#ifndef _h_el_keymacro
#define _h_el_keymacro
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef union keymacro_value_t {
el_action_t cmd; /* If it is a command the # */
Char *str; /* If it is a string... */
protected int keymacro_init(EditLine *);
protected void keymacro_end(EditLine *);
-protected keymacro_value_t *keymacro_map_cmd(EditLine *, int);
-protected keymacro_value_t *keymacro_map_str(EditLine *, Char *);
+EXPORT_API protected keymacro_value_t *keymacro_map_cmd(EditLine *, int);
+EXPORT_API protected keymacro_value_t *keymacro_map_str(EditLine *, Char *);
protected void keymacro_reset(EditLine *);
protected int keymacro_get(EditLine *, Char *, keymacro_value_t *);
protected void keymacro_add(EditLine *, const Char *, keymacro_value_t *, int);
protected void keymacro_print(EditLine *, const Char *);
protected void keymacro_kprint(EditLine *, const Char *, keymacro_value_t *,
int);
-protected size_t keymacro__decode_str(const Char *, char *, size_t,
+EXPORT_API protected size_t keymacro__decode_str(const Char *, char *, size_t,
const char *);
#endif /* _h_el_keymacro */
protected int parse_line(EditLine *, const Char *);
protected int parse__escape(const Char **);
-protected Char *parse__string(Char *, const Char *);
+
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+EXPORT_API protected Char *parse__string(Char *, const Char *);
protected int parse_cmd(EditLine *, const Char *);
#endif /* _h_el_parse */
#include "histedit.h"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef Char *(*el_pfunc_t)(EditLine *);
typedef struct el_prompt_t {
#ifndef _h_el_read
#define _h_el_read
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef int (*el_rfunc_t)(EditLine *, Char *);
typedef struct el_read_t {
protected void read_prepare(EditLine *);
protected void read_finish(EditLine *);
protected int el_read_setfn(EditLine *, el_rfunc_t);
-protected el_rfunc_t el_read_getfn(EditLine *);
+EXPORT_API protected el_rfunc_t el_read_getfn(EditLine *);
#endif /* _h_el_read */
#include "histedit.h"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef struct {
coord_t r_cursor; /* Refresh cursor position */
int r_oldcv; /* Vertical locations */
#include "histedit.h"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef struct el_search_t {
Char *patbuf; /* The pattern buffer */
size_t patlen; /* Length of the pattern buffer */
protected void search_end(EditLine *);
protected int c_hmatch(EditLine *, const Char *);
protected void c_setpat(EditLine *);
-protected el_action_t ce_inc_search(EditLine *, int);
-protected el_action_t cv_search(EditLine *, int);
-protected el_action_t ce_search_line(EditLine *, int);
-protected el_action_t cv_repeat_srch(EditLine *, Int);
-protected el_action_t cv_csearch(EditLine *, int, Int, int, int);
+EXPORT_API protected el_action_t ce_inc_search(EditLine *, int);
+EXPORT_API protected el_action_t cv_search(EditLine *, int);
+EXPORT_API protected el_action_t ce_search_line(EditLine *, int);
+EXPORT_API protected el_action_t cv_repeat_srch(EditLine *, Int);
+EXPORT_API protected el_action_t cv_csearch(EditLine *, int, Int, int, int);
#endif /* _h_el_search */
_DO(SIGWINCH)
#define ALLSIGSNO 7
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef struct {
struct sigaction sig_action[ALLSIGSNO];
sigset_t sig_set;
#ifndef _PTR_T
# define _PTR_T
+
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
typedef void *ptr_t;
#endif
#ifndef HAVE_STRLCAT
#define strlcat libedit_strlcat
-size_t strlcat(char *dst, const char *src, size_t size);
+EXPORT_API size_t strlcat(char *dst, const char *src, size_t size);
#endif
#ifndef HAVE_STRLCPY
#define strlcpy libedit_strlcpy
-size_t strlcpy(char *dst, const char *src, size_t size);
+EXPORT_API size_t strlcpy(char *dst, const char *src, size_t size);
#endif
#ifndef HAVE_FGETLN
#define fgetln libedit_fgetln
-char *fgetln(FILE *fp, size_t *len);
+EXPORT_API char *fgetln(FILE *fp, size_t *len);
#endif
#ifndef HAVE_WCSDUP
#include <wchar.h>
-wchar_t *wcsdup(const wchar_t *);
+EXPORT_API wchar_t *wcsdup(const wchar_t *);
#endif
#ifndef _DIAGASSERT
#include "histedit.h"
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef struct { /* Symbolic function key bindings */
const Char *name; /* name of the key */
int key; /* Index in termcap table */
#define MD_CHAR 4
#define MD_NN 5
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
+
+
typedef struct {
const char *t_name;
unsigned int t_setmask;
typedef unsigned char ttychar_t[NN_IO][C_NCC];
-protected int tty_init(EditLine *);
-protected void tty_end(EditLine *);
-protected int tty_stty(EditLine *, int, const Char **);
-protected int tty_rawmode(EditLine *);
-protected int tty_cookedmode(EditLine *);
-protected int tty_quotemode(EditLine *);
-protected int tty_noquotemode(EditLine *);
-protected void tty_bind_char(EditLine *, int);
+protected EXPORT_API int tty_init(EditLine *);
+protected EXPORT_API void tty_end(EditLine *);
+protected EXPORT_API int tty_stty(EditLine *, int, const Char **);
+protected EXPORT_API int tty_rawmode(EditLine *);
+protected EXPORT_API int tty_cookedmode(EditLine *);
+protected EXPORT_API int tty_quotemode(EditLine *);
+protected EXPORT_API int tty_noquotemode(EditLine *);
+protected EXPORT_API void tty_bind_char(EditLine *, int);
typedef struct {
ttyperm_t t_t;
__BEGIN_DECLS
char *vis(char *, int, int, int);
-char *nvis(char *, size_t, int, int, int);
-char *svis(char *, int, int, int, const char *);
-char *snvis(char *, size_t, int, int, int, const char *);
+#ifndef EXPORT_API
+#define EXPORT_API
+#endif // EXPORT_API
-int strvis(char *, const char *, int);
-int strnvis(char *, size_t, const char *, int);
+EXPORT_API char *nvis(char *, size_t, int, int, int);
-int strsvis(char *, const char *, int, const char *);
-int strsnvis(char *, size_t, const char *, int, const char *);
+EXPORT_API char *svis(char *, int, int, int, const char *);
+EXPORT_API char *snvis(char *, size_t, int, int, int, const char *);
-int strvisx(char *, const char *, size_t, int);
-int strnvisx(char *, size_t, const char *, size_t, int);
-int strenvisx(char *, size_t, const char *, size_t, int, int *);
+EXPORT_API int strvis(char *, const char *, int);
+EXPORT_API int strnvis(char *, size_t, const char *, int);
-int strsvisx(char *, const char *, size_t, int, const char *);
-int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
-int strsenvisx(char *, size_t, const char *, size_t , int, const char *,
+EXPORT_API int strsvis(char *, const char *, int, const char *);
+EXPORT_API int strsnvis(char *, size_t, const char *, int, const char *);
+
+EXPORT_API int strvisx(char *, const char *, size_t, int);
+EXPORT_API int strnvisx(char *, size_t, const char *, size_t, int);
+EXPORT_API int strenvisx(char *, size_t, const char *, size_t, int, int *);
+
+EXPORT_API int strsvisx(char *, const char *, size_t, int, const char *);
+EXPORT_API int strsnvisx(char *, size_t, const char *, size_t, int, const char *);
+EXPORT_API int strsenvisx(char *, size_t, const char *, size_t , int, const char *,
int *);
-int strunvis(char *, const char *);
-int strnunvis(char *, size_t, const char *);
+EXPORT_API int strunvis(char *, const char *);
+EXPORT_API int strnunvis(char *, size_t, const char *);
-int strunvisx(char *, const char *, int);
-int strnunvisx(char *, size_t, const char *, int);
+EXPORT_API int strunvisx(char *, const char *, int);
+EXPORT_API int strnunvisx(char *, size_t, const char *, int);
#ifndef __LIBC12_SOURCE__
-int unvis(char *, int, int *, int);
+EXPORT_API int unvis(char *, int, int *, int);
#endif
__END_DECLS