summaryrefslogtreecommitdiff
path: root/lib/libcurses/base/lib_slkatr_set.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-01-22 18:02:21 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-01-22 18:02:21 +0000
commit7fe795010750d2e2889d7085abeaa1ee0926c69b (patch)
treeb52138c43e052b09287afed0fb6351cd31249bda /lib/libcurses/base/lib_slkatr_set.c
parent85db479b2362c15a2266e01737d835e86cda1b1e (diff)
Update to ncurses-5.2-20010114
Diffstat (limited to 'lib/libcurses/base/lib_slkatr_set.c')
-rw-r--r--lib/libcurses/base/lib_slkatr_set.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/libcurses/base/lib_slkatr_set.c b/lib/libcurses/base/lib_slkatr_set.c
index 4f22dd3517b..403ec288aab 100644
--- a/lib/libcurses/base/lib_slkatr_set.c
+++ b/lib/libcurses/base/lib_slkatr_set.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: lib_slkatr_set.c,v 1.2 1999/05/17 03:03:59 millert Exp $ */
+/* $OpenBSD: lib_slkatr_set.c,v 1.3 2001/01/22 18:01:44 millert Exp $ */
/****************************************************************************
- * 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 *
@@ -39,20 +39,19 @@
*/
#include <curses.priv.h>
-MODULE_ID("$From: lib_slkatr_set.c,v 1.3 1999/05/16 17:13:59 juergen Exp $")
+MODULE_ID("$From: lib_slkatr_set.c,v 1.5 2000/12/10 02:43:27 tom 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);
}