Changeset 601733d for functions.c


Ignore:
Timestamp:
Jul 30, 2008, 6:35:08 PM (12 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
731dd1e
Parents:
bfc127b
Message:
The color default has been -1 for a while now, so we match what curses thinks.
We shouldn't also believe that -1 means invalid color.
Adding OWL_COLOR_INVALID (-2) and using that in place of -1 when checking for invalid colors.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rdd28b51 r601733d  
    23922392      return;
    23932393    }
    2394     if (owl_util_string_to_color(argv[3])==-1) {
     2394    if (owl_util_string_to_color(argv[3])==OWL_COLOR_INVALID) {
    23952395      owl_function_error("The color '%s' is not available.", argv[3]);
    23962396      return;
     
    24072407      return;
    24082408    }
    2409     if (owl_util_string_to_color(argv[3])==-1) {
     2409    if (owl_util_string_to_color(argv[3])==OWL_COLOR_INVALID) {
    24102410      owl_function_error("The color '%s' is not available.", argv[3]);
    24112411      return;
     
    29412941  }
    29422942
    2943   if (owl_util_string_to_color(fgcolor)==-1) {
     2943  if (owl_util_string_to_color(fgcolor)==OWL_COLOR_INVALID) {
    29442944    owl_function_error("No color named '%s' avilable.", fgcolor);
    29452945    return(-1);
     
    29482948
    29492949  if (bgcolor != NULL) {
    2950     if (owl_util_string_to_color(bgcolor)==-1) {
     2950    if (owl_util_string_to_color(bgcolor)==OWL_COLOR_INVALID) {
    29512951      owl_function_error("No color named '%s' avilable.", bgcolor);
    29522952      return(-1);
Note: See TracChangeset for help on using the changeset viewer.