=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.434 retrieving revision 1.435 diff -c -r1.434 -r1.435 *** src/usr.bin/tmux/tmux.h 2014/01/28 22:19:17 1.434 --- src/usr.bin/tmux/tmux.h 2014/01/28 23:07:09 1.435 *************** *** 1,4 **** ! /* $OpenBSD: tmux.h,v 1.434 2014/01/28 22:19:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.h,v 1.435 2014/01/28 23:07:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 726,736 **** enum { OPTIONS_STRING, OPTIONS_NUMBER, ! OPTIONS_DATA, } type; ! char *str; ! long long num; RB_ENTRY(options_entry) entry; }; --- 726,737 ---- enum { OPTIONS_STRING, OPTIONS_NUMBER, ! OPTIONS_STYLE } type; ! char *str; ! long long num; ! struct grid_cell style; RB_ENTRY(options_entry) entry; }; *************** *** 1453,1459 **** OPTIONS_TABLE_COLOUR, OPTIONS_TABLE_ATTRIBUTES, OPTIONS_TABLE_FLAG, ! OPTIONS_TABLE_CHOICE }; struct options_table_entry { --- 1454,1461 ---- OPTIONS_TABLE_COLOUR, OPTIONS_TABLE_ATTRIBUTES, OPTIONS_TABLE_FLAG, ! OPTIONS_TABLE_CHOICE, ! OPTIONS_TABLE_STYLE }; struct options_table_entry { *************** *** 1466,1471 **** --- 1468,1475 ---- const char *default_str; long long default_num; + + const char *style; }; /* Tree of format entries. */ *************** *** 1577,1588 **** struct options_entry *options_find1(struct options *, const char *); struct options_entry *options_find(struct options *, const char *); void options_remove(struct options *, const char *); ! struct options_entry *printflike3 options_set_string( ! struct options *, const char *, const char *, ...); char *options_get_string(struct options *, const char *); ! struct options_entry *options_set_number( ! struct options *, const char *, long long); long long options_get_number(struct options *, const char *); /* options-table.c */ extern const struct options_table_entry server_options_table[]; --- 1581,1595 ---- struct options_entry *options_find1(struct options *, const char *); struct options_entry *options_find(struct options *, const char *); void options_remove(struct options *, const char *); ! struct options_entry *printflike3 options_set_string(struct options *, ! const char *, const char *, ...); char *options_get_string(struct options *, const char *); ! struct options_entry *options_set_number(struct options *, const char *, ! long long); long long options_get_number(struct options *, const char *); + struct options_entry *options_set_style(struct options *, const char *, + const char *, int); + struct grid_cell *options_get_style(struct options *, const char *); /* options-table.c */ extern const struct options_table_entry server_options_table[]; *************** *** 2042,2049 **** ssize_t, struct grid_cell *, int, const char *, ...); void screen_write_vnputs(struct screen_write_ctx *, ssize_t, struct grid_cell *, int, const char *, va_list); - void screen_write_parsestyle( - struct grid_cell *, struct grid_cell *, const char *); void screen_write_putc( struct screen_write_ctx *, struct grid_cell *, u_char); void screen_write_copy(struct screen_write_ctx *, --- 2049,2054 ---- *************** *** 2173,2179 **** void window_set_name(struct window *, const char *); void window_remove_ref(struct window *); void winlink_clear_flags(struct winlink *); - void window_mode_attrs(struct grid_cell *, struct options *); /* layout.c */ u_int layout_count_cells(struct layout_cell *); --- 2178,2183 ---- *************** *** 2344,2348 **** --- 2348,2362 ---- int xvasprintf(char **, const char *, va_list); int printflike3 xsnprintf(char *, size_t, const char *, ...); int xvsnprintf(char *, size_t, const char *, va_list); + + /* style.c */ + int style_parse(const struct grid_cell *, + struct grid_cell *, const char *); + const char *style_tostring(struct grid_cell *); + void style_update_new(struct options *, const char *, const char *); + void style_update_old(struct options *, const char *, + struct grid_cell *); + void style_apply(struct grid_cell *, struct options *, const char *); + void style_apply_update(struct grid_cell *, struct options *, const char *); #endif /* TMUX_H */