Changeset c2c5c77 for util.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
  • util.c

    rd524c83 rc2c5c77  
    390390}
    391391
     392int owl_util_find_trans_short(short *in, int len)
     393{
     394  int i;
     395  for (i=1; i<len; i++) {
     396    if (in[i] != in[0]) return(i-1);
     397  }
     398  return(i);
     399}
     400
    392401/* downcase the string 'foo' */
    393402void downstr(char *foo)
     
    488497int owl_util_string_to_color(char *color)
    489498{
     499  int c;
    490500  if (!strcasecmp(color, "black")) {
    491501    return(OWL_COLOR_BLACK);
     
    507517    return(OWL_COLOR_DEFAULT);
    508518  }
     519  c = atoi(color);
     520  if (c >= -1 && c < COLORS) {
     521    return(c);
     522  }
    509523  return(-1);
    510524}
Note: See TracChangeset for help on using the changeset viewer.