- Timestamp:
- Aug 15, 2009, 7:08:18 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 77bced3
- Parents:
- 64735f0
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/03/09 23:52:03)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fmtext.c
re19eb97 r075ba92 170 170 171 171 /* Internal function. Scan for attribute characters. */ 172 void _owl_fmtext_scan_attributes( owl_fmtext *f, int start, char *attr, short *fgcolor, short *bgcolor) /*noproto*/172 void _owl_fmtext_scan_attributes(const owl_fmtext *f, int start, char *attr, short *fgcolor, short *bgcolor) /*noproto*/ 173 173 { 174 174 const char *p; … … 184 184 * bytes. 185 185 */ 186 void _owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in, int start, int stop) /*noproto*/186 void _owl_fmtext_append_fmtext(owl_fmtext *f, const owl_fmtext *in, int start, int stop) /*noproto*/ 187 187 { 188 188 char attrbuff[6]; … … 230 230 231 231 /* append fmtext 'in' to 'f' */ 232 void owl_fmtext_append_fmtext(owl_fmtext *f, owl_fmtext *in)232 void owl_fmtext_append_fmtext(owl_fmtext *f, const owl_fmtext *in) 233 233 { 234 234 _owl_fmtext_append_fmtext(f, in, 0, in->textlen); … … 248 248 * freeing the return 249 249 */ 250 char *owl_fmtext_print_plain( owl_fmtext *f)250 char *owl_fmtext_print_plain(const owl_fmtext *f) 251 251 { 252 252 return owl_strip_format_chars(f->textbuff); … … 278 278 * must already be initiatlized with curses 279 279 */ 280 void _owl_fmtext_curs_waddstr( owl_fmtext *f, WINDOW *w, int do_search) /*noproto*/280 void _owl_fmtext_curs_waddstr(const owl_fmtext *f, WINDOW *w, int do_search) /*noproto*/ 281 281 { 282 282 /* char *tmpbuff; */ … … 367 367 } 368 368 369 void owl_fmtext_curs_waddstr( owl_fmtext *f, WINDOW *w)369 void owl_fmtext_curs_waddstr(const owl_fmtext *f, WINDOW *w) 370 370 { 371 371 _owl_fmtext_curs_waddstr(f, w, owl_global_is_search_active(&g)); 372 372 } 373 373 374 void owl_fmtext_curs_waddstr_without_search( owl_fmtext *f, WINDOW *w)374 void owl_fmtext_curs_waddstr_without_search(const owl_fmtext *f, WINDOW *w) 375 375 { 376 376 _owl_fmtext_curs_waddstr(f, w, 0); … … 380 380 * 'lines' number of lines into 'out' 381 381 */ 382 int owl_fmtext_truncate_lines( owl_fmtext *in, int aline, int lines, owl_fmtext *out)382 int owl_fmtext_truncate_lines(const owl_fmtext *in, int aline, int lines, owl_fmtext *out) 383 383 { 384 384 const char *ptr1, *ptr2; … … 424 424 * character and stop there. 425 425 */ 426 void owl_fmtext_truncate_cols( owl_fmtext *in, int acol, int bcol, owl_fmtext *out)426 void owl_fmtext_truncate_cols(const owl_fmtext *in, int acol, int bcol, owl_fmtext *out) 427 427 { 428 428 const char *ptr_s, *ptr_e, *ptr_c, *last; … … 500 500 501 501 /* Return the number of lines in 'f' */ 502 int owl_fmtext_num_lines( owl_fmtext *f)502 int owl_fmtext_num_lines(const owl_fmtext *f) 503 503 { 504 504 int lines, i; … … 517 517 } 518 518 519 const char *owl_fmtext_get_text( owl_fmtext *f)519 const char *owl_fmtext_get_text(const owl_fmtext *f) 520 520 { 521 521 return(f->textbuff); … … 534 534 535 535 /* Make a copy of the fmtext 'src' into 'dst' */ 536 void owl_fmtext_copy(owl_fmtext *dst, owl_fmtext *src)536 void owl_fmtext_copy(owl_fmtext *dst, const owl_fmtext *src) 537 537 { 538 538 int mallocsize; … … 555 555 * insensitive search. 556 556 */ 557 int owl_fmtext_search( owl_fmtext *f, owl_regex *re)557 int owl_fmtext_search(const owl_fmtext *f, owl_regex *re) 558 558 { 559 559 if (owl_regex_compare(re, f->textbuff, NULL, NULL) == 0) return(1);
Note: See TracChangeset
for help on using the changeset viewer.