]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_slkatr_set.c
ncurses 5.3
[ncurses.git] / ncurses / base / lib_slkatr_set.c
index 0695d186bb5d97b061bb2148ce3c5809128ab832..ec09fddff4f34789b67848fbc745b0b44c93d66c 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_slkatr_set.c,v 1.3 1999/05/16 17:13:59 juergen Exp $")
+MODULE_ID("$Id: lib_slkatr_set.c,v 1.6 2002/07/06 22:47:23 juergen Exp $")
 
-int
-slk_attr_set(const attr_t attr, short color_pair_number, void* opts)
+NCURSES_EXPORT(int)
+slk_attr_set
+(const attr_t attr, short color_pair_number, void *opts)
 {
-  T((T_CALLED("slk_attr_set(%s,%d)"), _traceattr(attr), color_pair_number));
+    T((T_CALLED("slk_attr_set(%s,%d)"), _traceattr(attr), color_pair_number));
 
-  if (SP!=0 && SP->_slk!=0 && !opts &&
-      color_pair_number>=0 && color_pair_number<COLOR_PAIRS)
-    {
-      SP->_slk->attr = attr;
-      toggle_attr_on(SP->_slk->attr,COLOR_PAIR(color_pair_number));
-      returnCode(OK);
-    }
-  else
-    returnCode(ERR);
+    if (SP != 0 && SP->_slk != 0 && !opts &&
+       color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
+       SP->_slk->attr = attr;
+       toggle_attr_on(SP->_slk->attr, COLOR_PAIR(color_pair_number));
+       returnCode(OK);
+    } else
+       returnCode(ERR);
 }