aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_slkinit.c
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-12-30 11:08:14 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-12-30 11:08:14 +0000
commit5ca44d1c915a0e0c87f8f347e61f7bfa65d609af (patch)
tree319eb1471eaf8c0c9cfc606e7cb8987ca9167507 /contrib/ncurses/ncurses/base/lib_slkinit.c
parent01b82453a3d0c6d76d4afc340c07cfc2be4a6b7a (diff)
downloadsrc-5ca44d1c915a0e0c87f8f347e61f7bfa65d609af.tar.gz
src-5ca44d1c915a0e0c87f8f347e61f7bfa65d609af.zip
Import ncurses 5.6-20071222 snapshot onto the vender branch
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=174993
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_slkinit.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkinit.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_slkinit.c b/contrib/ncurses/ncurses/base/lib_slkinit.c
index f003b5f033f0..20c0baa59646 100644
--- a/contrib/ncurses/ncurses/base/lib_slkinit.c
+++ b/contrib/ncurses/ncurses/base/lib_slkinit.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2007 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 *
@@ -38,14 +38,17 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkinit.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_slkinit.c,v 1.6 2007/05/12 18:14:21 tom Exp $")
NCURSES_EXPORT(int)
slk_init(int format)
{
+ int code = ERR;
+
T((T_CALLED("slk_init(%d)"), format));
- if (format < 0 || format > 3)
- returnCode(ERR);
- _nc_slk_format = 1 + format;
- returnCode(OK);
+ if (format >= 0 && format <= 3 && !_nc_slk_format) {
+ _nc_slk_format = 1 + format;
+ code = _nc_ripoffline(-SLK_LINES(_nc_slk_format), _nc_slk_initialize);
+ }
+ returnCode(code);
}