[BACK]Return to funcs.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Annotation of src/usr.bin/less/funcs.h, Revision 1.26

1.9       nicm        1: /*
                      2:  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
                      3:  *
                      4:  * This file is made available under the terms of the Less License.
                      5:  */
                      6:
                      7: #include <regex.h>
                      8:
                      9: struct mlist;
                     10: struct loption;
                     11:
1.17      mmcc       12: void *ecalloc(int, unsigned int);
                     13: char *easprintf(const char *, ...);
                     14: char *estrdup(const char *);
                     15: char *skipsp(char *);
                     16: int sprefix(char *, char *, int);
                     17: void quit(int);
                     18: void raw_mode(int);
                     19: char *special_key_str(int);
                     20: void get_term(void);
                     21: void init(void);
                     22: void deinit(void);
                     23: void home(void);
                     24: void add_line(void);
                     25: void lower_left(void);
                     26: void line_left(void);
                     27: void goto_line(int);
                     28: void vbell(void);
                     29: void ring_bell(void);
                     30: void do_clear(void);
                     31: void clear_eol(void);
                     32: void clear_bot(void);
                     33: void at_enter(int);
                     34: void at_exit(void);
                     35: void at_switch(int);
                     36: int is_at_equiv(int, int);
                     37: int apply_at_specials(int);
                     38: void putbs(void);
                     39: void match_brac(int, int, int, int);
                     40: int ch_get(void);
                     41: void ch_ungetchar(int);
                     42: void end_logfile(void);
                     43: void sync_logfile(void);
                     44: int ch_seek(off_t);
                     45: int ch_end_seek(void);
                     46: int ch_beg_seek(void);
                     47: off_t ch_length(void);
                     48: off_t ch_tell(void);
                     49: int ch_forw_get(void);
                     50: int ch_back_get(void);
                     51: void ch_setbufspace(int);
                     52: void ch_flush(void);
                     53: int seekable(int);
                     54: void ch_set_eof(void);
                     55: void ch_init(int, int);
                     56: void ch_close(void);
                     57: int ch_getflags(void);
1.24      schwarze   58: int mbtowc_left(wchar_t *, const char *, size_t);
1.17      mmcc       59: void init_charset(void);
                     60: char *prchar(LWCHAR);
                     61: char *prutfchar(LWCHAR);
                     62: int utf_len(char);
                     63: int is_utf8_well_formed(const char *);
                     64: LWCHAR step_char(char **, int, char *);
                     65: int is_composing_char(LWCHAR);
                     66: int is_ubin_char(LWCHAR);
                     67: int is_wide_char(LWCHAR);
                     68: void cmd_reset(void);
                     69: void clear_cmd(void);
                     70: void cmd_putstr(char *);
                     71: int len_cmdbuf(void);
                     72: void set_mlist(void *, int);
                     73: void cmd_addhist(struct mlist *, const char *);
                     74: void cmd_accept(void);
                     75: int cmd_char(int);
                     76: off_t cmd_int(long *);
                     77: char *get_cmdbuf(void);
                     78: char *cmd_lastpattern(void);
                     79: void init_cmdhist(void);
                     80: void save_cmdhist(void);
                     81: int in_mca(void);
                     82: void dispversion(void);
                     83: int getcc(void);
                     84: void ungetcc(int);
                     85: void ungetsc(char *);
                     86: void commands(void);
                     87: int cvt_length(int);
                     88: int *cvt_alloc_chpos(int);
                     89: void cvt_text(char *, char *, int *, int *, int);
                     90: void init_cmds(void);
                     91: void add_fcmd_table(char *, int);
                     92: void add_ecmd_table(char *, int);
                     93: int fcmd_decode(const char *, char **);
                     94: int ecmd_decode(const char *, char **);
                     95: char *lgetenv(char *);
                     96: int lesskey(char *, int);
                     97: void add_hometable(char *, char *, int);
                     98: int editchar(int, int);
                     99: void init_textlist(struct textlist *, char *);
                    100: char *forw_textlist(struct textlist *, char *);
                    101: char *back_textlist(struct textlist *, char *);
                    102: int edit(char *);
                    103: int edit_ifile(IFILE);
                    104: int edit_list(char *);
                    105: int edit_first(void);
                    106: int edit_last(void);
                    107: int edit_next(int);
                    108: int edit_prev(int);
                    109: int edit_index(int);
                    110: IFILE save_curr_ifile(void);
                    111: void unsave_ifile(IFILE);
                    112: void reedit_ifile(IFILE);
                    113: void reopen_curr_ifile(void);
                    114: int edit_stdin(void);
                    115: void cat_file(void);
                    116: void use_logfile(char *);
                    117: char *shell_unquote(char *);
                    118: char *get_meta_escape(void);
                    119: char *shell_quote(const char *);
                    120: char *homefile(char *);
                    121: char *fexpand(char *);
                    122: char *fcomplete(char *);
                    123: int bin_file(int f);
                    124: char *lglob(char *);
                    125: int is_dir(char *);
                    126: char *bad_file(char *);
                    127: off_t filesize(int);
                    128: char *last_component(char *);
                    129: int eof_displayed(void);
                    130: int entire_file_displayed(void);
                    131: void squish_check(void);
                    132: void forw(int, off_t, int, int, int);
                    133: void back(int, off_t, int, int);
                    134: void forward(int, int, int);
                    135: void backward(int, int, int);
                    136: int get_back_scroll(void);
                    137: void del_ifile(IFILE);
                    138: IFILE next_ifile(IFILE);
                    139: IFILE prev_ifile(IFILE);
                    140: IFILE getoff_ifile(IFILE);
                    141: int nifile(void);
                    142: IFILE get_ifile(char *, IFILE);
                    143: char *get_filename(IFILE);
                    144: int get_index(IFILE);
                    145: void store_pos(IFILE, struct scrpos *);
                    146: void get_pos(IFILE, struct scrpos *);
                    147: int opened(IFILE);
                    148: void hold_ifile(IFILE, int);
                    149: int held_ifile(IFILE);
                    150: void set_open(IFILE);
                    151: void *get_filestate(IFILE);
                    152: void set_filestate(IFILE, void *);
                    153: off_t forw_line(off_t);
                    154: off_t back_line(off_t);
                    155: void set_attnpos(off_t);
                    156: void jump_forw(void);
                    157: void jump_back(off_t);
                    158: void repaint(void);
                    159: void jump_percent(int, long);
                    160: void jump_line_loc(off_t, int);
                    161: void jump_loc(off_t, int);
                    162: void init_line(void);
                    163: void prewind(void);
                    164: void plinenum(off_t);
                    165: void pshift_all(void);
                    166: int is_ansi_middle(LWCHAR);
                    167: int pappend(char, off_t);
                    168: int pflushmbc(void);
                    169: void pdone(int, int);
                    170: void set_status_col(char);
                    171: int gline(int, int *);
                    172: void null_line(void);
                    173: off_t forw_raw_line(off_t, char **, int *);
                    174: off_t back_raw_line(off_t, char **, int *);
                    175: void clr_linenum(void);
                    176: void add_lnum(off_t, off_t);
                    177: off_t find_linenum(off_t);
                    178: off_t find_pos(off_t);
                    179: off_t currline(int);
                    180: void lsystem(const char *, const char *);
                    181: int pipe_mark(int, char *);
                    182: void init_mark(void);
                    183: int badmark(int);
                    184: void setmark(int);
                    185: void lastmark(void);
                    186: void gomark(int);
                    187: off_t markpos(int);
                    188: void unmark(IFILE);
                    189: void opt_o(int, char *);
                    190: void opt__O(int, char *);
                    191: void opt_j(int, char *);
                    192: void calc_jump_sline(void);
                    193: void opt_shift(int, char *);
                    194: void calc_shift_count(void);
                    195: void opt_k(int, char *);
                    196: void opt_t(int, char *);
                    197: void opt__T(int, char *);
                    198: void opt_p(int, char *);
                    199: void opt__P(int, char *);
                    200: void opt_b(int, char *);
                    201: void opt_i(int, char *);
                    202: void opt__V(int, char *);
                    203: void opt_x(int, char *);
                    204: void opt_quote(int, char *);
                    205: void opt_query(int, char *);
                    206: int get_swindow(void);
                    207: char *propt(int);
1.19      krw       208: void scan_option(char *, int);
1.17      mmcc      209: void toggle_option(struct loption *, int, char *, int);
                    210: int opt_has_param(struct loption *);
                    211: char *opt_prompt(struct loption *);
                    212: int isoptpending(void);
                    213: void nopendopt(void);
                    214: int getnum(char **, char *, int *);
                    215: long getfraction(char **, char *, int *);
                    216: int get_quit_at_eof(void);
                    217: void init_option(void);
                    218: struct loption *findopt(int);
                    219: struct loption *findopt_name(char **, char **, int *);
                    220: int iread(int, unsigned char *, unsigned int);
                    221: char *errno_message(char *);
                    222: int percentage(off_t, off_t);
                    223: off_t percent_pos(off_t, int, long);
                    224: void put_line(void);
                    225: void flush(int);
                    226: int putchr(int);
                    227: void putstr(const char *);
                    228: void get_return(void);
                    229: void error(const char *, PARG *);
                    230: void ierror(const char *, PARG *);
                    231: int query(const char *, PARG *);
                    232: int compile_pattern(char *, int, regex_t **);
                    233: void uncompile_pattern(regex_t **);
                    234: int match_pattern(void *, char *, char *, int, char **, char **,
1.9       nicm      235:     int, int);
1.17      mmcc      236: off_t position(int);
                    237: void add_forw_pos(off_t);
                    238: void add_back_pos(off_t);
                    239: void pos_clear(void);
                    240: void pos_init(void);
                    241: int onscreen(off_t);
                    242: int empty_screen(void);
                    243: int empty_lines(int, int);
                    244: void get_scrpos(struct scrpos *);
                    245: int adjsline(int);
                    246: void init_prompt(void);
                    247: char *pr_expand(const char *, int);
                    248: char *eq_message(void);
                    249: char *prompt_string(void);
                    250: char *wait_message(void);
                    251: void init_search(void);
                    252: void repaint_hilite(int);
                    253: void clear_attn(void);
                    254: void undo_search(void);
                    255: void clr_hilite(void);
                    256: int is_filtered(off_t);
                    257: int is_hilited(off_t, off_t, int, int *);
                    258: void chg_caseless(void);
                    259: void chg_hilite(void);
                    260: int search(int, char *, int);
                    261: void prep_hilite(off_t, off_t, int);
                    262: void set_filter_pattern(char *, int);
                    263: int is_filtering(void);
                    264: void sigwinch(int);
                    265: void init_signals(int);
                    266: void psignals(void);
                    267: void cleantags(void);
                    268: void findtag(char *);
                    269: off_t tagsearch(void);
                    270: char *nexttag(int);
                    271: char *prevtag(int);
                    272: int ntags(void);
                    273: int curr_tag(void);
                    274: int edit_tagfile(void);
                    275: void open_getchr(void);
                    276: int getchr(void);
                    277: void *lsignal(int, void (*)(int));
                    278: char *helpfile(void);