ncurses 5.3
[ncurses.git] / ncurses / base / lib_slkcolor.c
index 3728808f9b6c16820347959a2fdd3ac5288289a8..b6032b4dde7d9bc60fb7f6a811c0ab596a0a6d79 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -27,7 +27,8 @@
  ****************************************************************************/
 
 /****************************************************************************
- *  Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1998                  *
+ *  Author:  Juergen Pfeifer, 1998                                          *
+ *  Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en              *
  ****************************************************************************/
 
 /*
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkcolor.c,v 1.5 1999/05/16 17:14:13 juergen Exp $")
+MODULE_ID("$Id: lib_slkcolor.c,v 1.8 2002/07/06 22:49:22 juergen Exp $")
 
-int
+NCURSES_EXPORT(int)
 slk_color(short color_pair_number)
 {
-  T((T_CALLED("slk_color(%d)"), color_pair_number));
+    T((T_CALLED("slk_color(%d)"), color_pair_number));
 
-  if (SP!=0 && SP->_slk!=0 &&
-      color_pair_number>=0 && color_pair_number<COLOR_PAIRS)
-    {
-      T(("... current %ld", (long) PAIR_NUMBER(SP->_slk->attr)));
-      toggle_attr_on(SP->_slk->attr,COLOR_PAIR(color_pair_number));
-      returnCode(OK);
-    }
-  else
-    returnCode(ERR);
+    if (SP != 0 && SP->_slk != 0 &&
+       color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
+       T(("... current %ld", (long) PAIR_NUMBER(SP->_slk->attr)));
+       toggle_attr_on(SP->_slk->attr, COLOR_PAIR(color_pair_number));
+       returnCode(OK);
+    } else
+       returnCode(ERR);
 }