Deleted Added
full compact
ed.h (101093) ed.h (115717)
1/* ed.h: type and constant definitions for the ed editor. */
2/*
3 * Copyright (c) 1993 Andrew Moore
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * @(#)ed.h,v 1.5 1994/02/01 00:34:39 alm Exp
1/* ed.h: type and constant definitions for the ed editor. */
2/*
3 * Copyright (c) 1993 Andrew Moore
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * @(#)ed.h,v 1.5 1994/02/01 00:34:39 alm Exp
28 * $FreeBSD: head/bin/ed/ed.h 101093 2002-07-31 16:52:16Z markm $
28 * $FreeBSD: head/bin/ed/ed.h 115717 2003-06-02 19:06:28Z markm $
29 */
30
31#include <sys/param.h>
32#include <errno.h>
33#include <limits.h>
34#include <regex.h>
35#include <signal.h>
36#include <stdio.h>

--- 133 unchanged lines hidden (view full) ---

170#define REMQUE(elem) REQUE((elem)->q_back, (elem)->q_forw);
171
172/* NUL_TO_NEWLINE: overwrite ASCII NULs with newlines */
173#define NUL_TO_NEWLINE(s, l) translit_text(s, l, '\0', '\n')
174
175/* NEWLINE_TO_NUL: overwrite newlines with ASCII NULs */
176#define NEWLINE_TO_NUL(s, l) translit_text(s, l, '\n', '\0')
177
29 */
30
31#include <sys/param.h>
32#include <errno.h>
33#include <limits.h>
34#include <regex.h>
35#include <signal.h>
36#include <stdio.h>

--- 133 unchanged lines hidden (view full) ---

170#define REMQUE(elem) REQUE((elem)->q_back, (elem)->q_forw);
171
172/* NUL_TO_NEWLINE: overwrite ASCII NULs with newlines */
173#define NUL_TO_NEWLINE(s, l) translit_text(s, l, '\0', '\n')
174
175/* NEWLINE_TO_NUL: overwrite newlines with ASCII NULs */
176#define NEWLINE_TO_NUL(s, l) translit_text(s, l, '\n', '\0')
177
178#ifdef ED_DES_INCLUDES
179void des_error(const char *);
180void expand_des_key(char *, char *);
181void set_des_key(DES_cblock *);
182#endif
183
184/* Other DES support stuff */
185void init_des_cipher(void);
186int flush_des_file(FILE *);
187int get_des_char(FILE *);
188int put_des_char(int, FILE *);
189
178/* Local Function Declarations */
179void add_line_node(line_t *);
180int append_lines(long);
181int apply_subst_template(const char *, regmatch_t *, int, int);
182int build_active_list(int);
183int cbc_decode(unsigned char *, FILE *);
184int cbc_encode(unsigned char *, int, FILE *);
185int check_addr_range(long, long);
186void clear_active_list(void);
187void clear_undo_stack(void);
188int close_sbuf(void);
189int copy_lines(long);
190int delete_lines(long, long);
190/* Local Function Declarations */
191void add_line_node(line_t *);
192int append_lines(long);
193int apply_subst_template(const char *, regmatch_t *, int, int);
194int build_active_list(int);
195int cbc_decode(unsigned char *, FILE *);
196int cbc_encode(unsigned char *, int, FILE *);
197int check_addr_range(long, long);
198void clear_active_list(void);
199void clear_undo_stack(void);
200int close_sbuf(void);
201int copy_lines(long);
202int delete_lines(long, long);
191void des_error(const char *);
192int display_lines(long, long, int);
193line_t *dup_line_node(line_t *);
194int exec_command(void);
195long exec_global(int, int);
203int display_lines(long, long, int);
204line_t *dup_line_node(line_t *);
205int exec_command(void);
206long exec_global(int, int);
196void expand_des_key(char *, char *);
197int extract_addr_range(void);
198char *extract_pattern(int);
199int extract_subst_tail(int *, long *);
200char *extract_subst_template(void);
201int filter_lines(long, long, char *);
207int extract_addr_range(void);
208char *extract_pattern(int);
209int extract_subst_tail(int *, long *);
210char *extract_subst_template(void);
211int filter_lines(long, long, char *);
202int flush_des_file(FILE *);
203line_t *get_addressed_line_node(long);
204pattern_t *get_compiled_pattern(void);
212line_t *get_addressed_line_node(long);
213pattern_t *get_compiled_pattern(void);
205int get_des_char(FILE *);
206char *get_extended_line(int *, int);
207char *get_filename(void);
208int get_keyword(void);
209long get_line_node_addr(line_t *);
210long get_matching_node_addr(pattern_t *, int);
211long get_marked_node_addr(int);
212char *get_sbuf_line(line_t *);
213int get_shell_command(void);
214int get_stream_line(FILE *);
215int get_tty_line(void);
216void handle_hup(int);
217void handle_int(int);
218void handle_winch(int);
219int has_trailing_escape(char *, char *);
220int hex_to_binary(int, int);
221void init_buffers(void);
214char *get_extended_line(int *, int);
215char *get_filename(void);
216int get_keyword(void);
217long get_line_node_addr(line_t *);
218long get_matching_node_addr(pattern_t *, int);
219long get_marked_node_addr(int);
220char *get_sbuf_line(line_t *);
221int get_shell_command(void);
222int get_stream_line(FILE *);
223int get_tty_line(void);
224void handle_hup(int);
225void handle_int(int);
226void handle_winch(int);
227int has_trailing_escape(char *, char *);
228int hex_to_binary(int, int);
229void init_buffers(void);
222void init_des_cipher(void);
223int is_legal_filename(char *);
224int join_lines(long, long);
225int mark_line_node(line_t *, int);
226int move_lines(long);
227line_t *next_active_node(void);
228long next_addr(void);
229int open_sbuf(void);
230char *parse_char_class(char *);
231int pop_undo_stack(void);
232undo_t *push_undo_stack(int, long, long);
230int is_legal_filename(char *);
231int join_lines(long, long);
232int mark_line_node(line_t *, int);
233int move_lines(long);
234line_t *next_active_node(void);
235long next_addr(void);
236int open_sbuf(void);
237char *parse_char_class(char *);
238int pop_undo_stack(void);
239undo_t *push_undo_stack(int, long, long);
233int put_des_char(int, FILE *);
234const char *put_sbuf_line(const char *);
235int put_stream_line(FILE *, const char *, int);
236int put_tty_line(const char *, int, long, int);
237void quit(int);
238long read_file(char *, long);
239long read_stream(FILE *, long);
240int search_and_replace(pattern_t *, int, int);
241int set_active_node(line_t *);
240const char *put_sbuf_line(const char *);
241int put_stream_line(FILE *, const char *, int);
242int put_tty_line(const char *, int, long, int);
243void quit(int);
244long read_file(char *, long);
245long read_stream(FILE *, long);
246int search_and_replace(pattern_t *, int, int);
247int set_active_node(line_t *);
242void set_des_key(char *);
243void signal_hup(int);
244void signal_int(int);
245char *strip_escapes(char *);
246int substitute_matching_text(pattern_t *, line_t *, int, int);
247char *translit_text(char *, int, int, int);
248void unmark_line_node(line_t *);
249void unset_active_nodes(line_t *, line_t *);
250long write_file(char *, const char *, long, long);

--- 24 unchanged lines hidden ---
248void signal_hup(int);
249void signal_int(int);
250char *strip_escapes(char *);
251int substitute_matching_text(pattern_t *, line_t *, int, int);
252char *translit_text(char *, int, int, int);
253void unmark_line_node(line_t *);
254void unset_active_nodes(line_t *, line_t *);
255long write_file(char *, const char *, long, long);

--- 24 unchanged lines hidden ---