Changeset c2c5c77 for filter.c


Ignore:
Timestamp:
Mar 28, 2007, 10:54:33 PM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
7f33c18
Parents:
af9b92e
Message:
Adding 256-color support. This requires a version of ncurses that
supports ABI-6. Colors beyond the first eight are refered to by
number.

Perl now has the number of colors exposed to it by way of
  BarnOwl::getnumcolors()
and also has a mechanism for undefining filters using
  BarnOwl::_remove_filter([filter-name])

You can't remove the 'all' filter or the current filter.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • filter.c

    r1716fed rc2c5c77  
    217217  if (f->fgcolor!=OWL_COLOR_DEFAULT) {
    218218    strcat(out, "-c ");
    219     strcat(out, owl_util_color_to_string(f->fgcolor));
     219    if (f->fgcolor < 8) {
     220      strcat(out, owl_util_color_to_string(f->fgcolor));
     221    }
     222    else {
     223      char* c = owl_sprintf("%i",f->fgcolor);
     224      strcat(out, c);
     225      owl_free(c);
     226    }
    220227    strcat(out, " ");
    221228  }
    222229  if (f->bgcolor!=OWL_COLOR_DEFAULT) {
    223230    strcat(out, "-b ");
    224     strcat(out, owl_util_color_to_string(f->bgcolor));
     231    if (f->bgcolor < 8) {
     232      strcat(out, owl_util_color_to_string(f->bgcolor));
     233    }
     234    else {
     235      char* c = owl_sprintf("%i",f->bgcolor);
     236      strcat(out, c);
     237      owl_free(c);
     238    }
    225239    strcat(out, " ");
    226240  }
Note: See TracChangeset for help on using the changeset viewer.