Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/curses-v3]: src/lib/libcurses New files for SUS v2 curses:



details:   https://anonhg.NetBSD.org/src/rev/d5309c6aef83
branches:  curses-v3
changeset: 479953:d5309c6aef83
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Jan 09 20:47:18 2000 +0000

description:
New files for SUS v2 curses:
  Move macros from curses.h
  Add prototype for wchar_t

diffstat:

 lib/libcurses/clearok.c  |  55 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/libcurses/flushok.c  |  55 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/libcurses/inch.c     |  55 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/libcurses/leaveok.c  |  55 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/libcurses/scrollok.c |  55 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/libcurses/wchar.h    |  44 ++++++++++++++++++++++++++++++++++++++
 6 files changed, 319 insertions(+), 0 deletions(-)

diffs (truncated from 343 to 300 lines):

diff -r b1ddb1c7adc2 -r d5309c6aef83 lib/libcurses/clearok.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcurses/clearok.c   Sun Jan 09 20:47:18 2000 +0000
@@ -0,0 +1,55 @@
+/*     $NetBSD: clearok.c,v 1.1.2.1 2000/01/09 20:47:18 jdc Exp $      */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "curses.h"
+
+/*
+ * clearok --
+ *     Turn on and off clear before refresh for the given window.
+ */
+int
+clearok(win, bf)
+       WINDOW  *win;
+       bool     bf;
+{
+       if (bf)
+               win->flags |= __CLEAROK;
+       else
+               win->flags &= ~__CLEAROK;
+       return (OK);
+}
diff -r b1ddb1c7adc2 -r d5309c6aef83 lib/libcurses/flushok.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcurses/flushok.c   Sun Jan 09 20:47:18 2000 +0000
@@ -0,0 +1,55 @@
+/*     $NetBSD: flushok.c,v 1.1.2.1 2000/01/09 20:47:19 jdc Exp $      */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "curses.h"
+
+/*
+ * flushok --
+ *     Turn on and off Fflush(stdout) after refresh for the given window.
+ */
+int
+flushok(win, bf)
+       WINDOW  *win;
+       bool     bf;
+{
+       if (bf)
+               win->flags |= __FLUSH;
+       else
+               win->flags &= ~__FLUSH;
+       return (OK);
+}
diff -r b1ddb1c7adc2 -r d5309c6aef83 lib/libcurses/inch.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcurses/inch.c      Sun Jan 09 20:47:18 2000 +0000
@@ -0,0 +1,55 @@
+/*     $NetBSD: inch.c,v 1.1.2.1 2000/01/09 20:47:20 jdc Exp $ */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "curses.h"
+
+/*
+ * winch --
+ *     Return character at cursor position.
+ */
+chtype
+winch(win)
+       WINDOW  *win;
+{
+
+       chtype   ch;
+
+       ch = (chtype) (((win)->lines[(win)->cury]->line[(win)->curx].ch & __CHARTEXT) |
+         (chtype) ((win)->lines[(win)->cury]->line[(win)->curx].attr & __ATTRIBUTES));
+       return (ch);
+}
diff -r b1ddb1c7adc2 -r d5309c6aef83 lib/libcurses/leaveok.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcurses/leaveok.c   Sun Jan 09 20:47:18 2000 +0000
@@ -0,0 +1,55 @@
+/*     $NetBSD: leaveok.c,v 1.1.2.1 2000/01/09 20:47:20 jdc Exp $      */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "curses.h"
+
+/*
+ * leaveok --
+ *     Turn on and off leave cursor after refresh for the given window.
+ */
+int
+leaveok(win, bf)
+       WINDOW  *win;
+       bool     bf;
+{
+       if (bf)
+               win->flags |= __LEAVEOK;
+       else
+               win->flags &= ~__LEAVEOK;
+       return (OK);
+}
diff -r b1ddb1c7adc2 -r d5309c6aef83 lib/libcurses/scrollok.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcurses/scrollok.c  Sun Jan 09 20:47:18 2000 +0000
@@ -0,0 +1,55 @@
+/*     $NetBSD: scrollok.c,v 1.1.2.1 2000/01/09 20:47:21 jdc Exp $     */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "curses.h"
+
+/*
+ * scrollok --
+ *     Turn on and off scrolling for the given window.
+ */
+int
+scrollok(win, bf)
+       WINDOW  *win;
+       bool     bf;
+{
+       if (bf)
+               win->flags |= __SCROLLOK;
+       else
+               win->flags &= ~__SCROLLOK;
+       return (OK);
+}
diff -r b1ddb1c7adc2 -r d5309c6aef83 lib/libcurses/wchar.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libcurses/wchar.h     Sun Jan 09 20:47:18 2000 +0000
@@ -0,0 +1,44 @@
+/*     $NetBSD: wchar.h,v 1.1.2.1 2000/01/09 20:47:21 jdc Exp $        */



Home | Main Index | Thread Index | Old Index