-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2104 2013/09/21 20:41:37 tom Exp $
+-- $Id: NEWS,v 1.2109 2013/09/28 22:55:29 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20130928
+ + some build-fixes for ncurses-examples with NetBSD-6.0 curses, though
+ it lacks some common functions such as use_env() which is not yet
+ addressed.
+ + build-fix and some compiler warning fixes for ncurses-examples with
+ OpenBSD 5.3
+ + fix a possible null-pointer reference in a trace message from newterm.
+ + quiet a few warnings from NetBSD 6.0 namespace pollution by
+ nonstandard popcount() function in standard strings.h header.
+ + ignore g++ 4.2.1 warnings for "-Weffc++" in c++/cursesmain.cc
+ + fix a few overlooked places for --enable-string-hacks option.
+
20130921
+ fix typo in curs_attr.3x (patch by Sven Joachim, cf: 20130831).
+ build-fix for --with-shared option for DragonFly and FreeBSD (report
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2013 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 *
#include "cursesapp.h"
#if CPP_HAS_TRY_CATCH && HAVE_IOSTREAM
+#pragma GCC diagnostic ignored "-Weffc++"
#include <iostream>
+#pragma GCC diagnostic warning "-Weffc++"
#else
#undef CPP_HAS_TRY_CATCH
#define CPP_HAS_TRY_CATCH 0
#endif
-MODULE_ID("$Id: cursesmain.cc,v 1.14 2007/04/07 17:10:11 tom Exp $")
+MODULE_ID("$Id: cursesmain.cc,v 1.15 2013/09/28 20:56:47 tom Exp $")
#if HAVE_LOCALE_H
#include <locale.h>
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.945 2013/09/21 15:25:41 tom Exp $
+# $Id: dist.mk,v 1.946 2013/09/28 17:24:42 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 9
-NCURSES_PATCH = 20130921
+NCURSES_PATCH = 20130928
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#include <tic.h>
-MODULE_ID("$Id: lib_newterm.c,v 1.89 2013/08/31 14:56:50 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.90 2013/09/28 21:02:56 tom Exp $")
#ifdef USE_TERM_DRIVER
#define NumLabels InfoOf(SP_PARM).numlabels
START_TRACE();
T((T_CALLED("newterm(%p, \"%s\", %p,%p)"),
(void *) SP_PARM,
- name,
+ (name ? name : ""),
(void *) ofp,
(void *) ifp));
#include <curses.priv.h>
-MODULE_ID("$Id: getenv_num.c,v 1.4 2012/07/14 21:17:19 tom Exp $")
+MODULE_ID("$Id: getenv_num.c,v 1.5 2013/09/28 20:25:08 tom Exp $")
NCURSES_EXPORT(int)
_nc_getenv_num(const char *name)
if (name != 0 && value >= 0) {
char buffer[128];
#if HAVE_SETENV
- sprintf(buffer, "%d", value);
+ _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%d", value);
setenv(name, buffer, 1);
#elif HAVE_PUTENV
char *s;
- sprintf(buffer, "%s=%d", name, value);
+ _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%s=%d", name, value);
if ((s = strdup(buffer)) != 0)
putenv(s);
#endif
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: lib_tparm.c,v 1.88 2013/01/26 17:07:05 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.89 2013/09/28 20:46:56 tom Exp $")
/*
* char *
NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
#define TPS(var) _nc_prescreen.tparm_state.var
+#define popcount _nc_popcount /* workaround for NetBSD 6.0 defect */
#if NO_LEAKS
NCURSES_EXPORT(void)
#include <ctype.h>
-MODULE_ID("$Id: make_hash.c,v 1.12 2013/02/16 21:27:50 tom Exp $")
+MODULE_ID("$Id: make_hash.c,v 1.13 2013/09/28 20:55:47 tom Exp $")
/*
* _nc_make_hash_table()
static char *
strmalloc(char *s)
{
- char *result = malloc(strlen(s) + 1);
+ size_t need = strlen(s) + 1;
+ char *result = malloc(need);
if (result == 0)
- failed("strmalloc");
- strcpy(result, s);
+ failed("strmalloc");
+ _nc_STRCPY(result, s, need);
return result;
}
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.88 2013/07/27 15:52:18 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.89 2013/09/28 20:20:30 tom Exp $")
static int total_written;
char name_list[MAX_TERMINFO_LENGTH];
char *first_name, *other_names;
char *ptr;
- const char *term_names = tp->term_names;
+ char *term_names = tp->term_names;
size_t name_size = strlen(term_names);
if (name_size == 0) {
-ncurses6 (5.9-20130921) unstable; urgency=low
+ncurses6 (5.9-20130928) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 21 Sep 2013 11:25:41 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 28 Sep 2013 13:24:42 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Release: 5.9
-Version: 20130921
+Version: 20130928
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Release: 5.9
-Version: 20130921
+Version: 20130928
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
/****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 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 *
#endif
#include <transform.h>
-MODULE_ID("$Id: tput.c,v 1.48 2012/02/18 21:51:17 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.49 2013/09/28 20:57:25 tom Exp $")
#define PUTS(s) fputs(s, stdout)
#define PUTCHAR(c) putchar(c)
} else if (s != ABSENT_STRING) {
if (argc > 1) {
int k;
- int popcount;
+ int ignored;
long numbers[1 + NUM_PARM];
char *strings[1 + NUM_PARM];
char *p_is_s[NUM_PARM];
break;
case Numbers:
default:
- (void) _nc_tparm_analyze(s, p_is_s, &popcount);
+ (void) _nc_tparm_analyze(s, p_is_s, &ignored);
#define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
s = TPARM_9(s,
myParam(1),
/****************************************************************************
- * Copyright (c) 1999-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2012,2013 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 *
/*
* Author: Thomas E. Dickey
*
- * $Id: cardfile.c,v 1.41 2012/11/03 19:26:50 tom Exp $
+ * $Id: cardfile.c,v 1.42 2013/09/28 22:02:17 tom Exp $
*
* File format: text beginning in column 1 is a title; other text is content.
*/
break;
}
- card = typeCalloc(CARD, 1);
+ card = typeCalloc(CARD, (size_t) 1);
card->title = strdup(title);
card->content = strdup("");
static FIELD **
make_fields(CARD * p, int form_high, int form_wide)
{
- FIELD **f = typeCalloc(FIELD *, 3);
+ FIELD **f = typeCalloc(FIELD *, (size_t) 3);
f[0] = new_field(1, form_wide, 0, 0, 0, 0);
set_field_back(f[0], A_REVERSE);
/****************************************************************************
- * Copyright (c) 2002-2008,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2012,2013 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 *
* authorization. *
****************************************************************************/
/*
- * $Id: demo_defkey.c,v 1.21 2012/12/29 22:55:39 tom Exp $
+ * $Id: demo_defkey.c,v 1.22 2013/09/28 22:02:17 tom Exp $
*
* Demonstrate the define_key() function.
* Thomas Dickey - 2002/11/23
result = typeCalloc(char, need);
}
} else {
- result = typeCalloc(char, 1);
+ result = typeCalloc(char, (size_t) 1);
}
return result;
}
const char *prefix = 0;
char temp[BUFSIZ];
- if (!strncmp(value, "\033[", 2)) {
+ if (!strncmp(value, "\033[", (size_t) 2)) {
prefix = "\033O";
- } else if (!strncmp(value, "\033O", 2)) {
+ } else if (!strncmp(value, "\033O", (size_t) 2)) {
prefix = "\033[";
}
if (prefix != 0) {
* authorization. *
****************************************************************************/
/*
- * $Id: demo_forms.c,v 1.45 2013/09/21 22:51:50 tom Exp $
+ * $Id: demo_forms.c,v 1.46 2013/09/28 21:55:54 tom Exp $
*
* Demonstrate a variety of functions from the form library.
* Thomas Dickey - 2003/4/26
int more = 0;
int item = 0;
- my_data = typeCalloc(MY_DATA, 100); /* FIXME */
+ my_data = typeCalloc(MY_DATA, (size_t) 100); /* FIXME */
while (fgets(buffer, sizeof(buffer), fp) != 0) {
chomp(buffer);
if (more) {
* authorization. *
****************************************************************************/
/*
- * $Id: demo_menus.c,v 1.51 2013/09/07 16:20:08 tom Exp $
+ * $Id: demo_menus.c,v 1.52 2013/09/28 21:55:02 tom Exp $
*
* Demonstrate a variety of functions from the menu library.
* Thomas Dickey - 2005/4/9
MENU_DATA *ap = 0;
MENU_DATA *myList = 0;
int i;
- unsigned count = 0;
+ size_t count = 0;
if (filename != 0) {
struct stat sb;
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_terminfo.c,v 1.18 2013/09/07 17:37:20 tom Exp $
+ * $Id: demo_terminfo.c,v 1.19 2013/09/28 21:50:01 tom Exp $
*
* A simple demo of the terminfo interface.
*/
#include <test.priv.h>
#if NCURSES_XNAMES
+#if HAVE_TERM_ENTRY_H
#include <term_entry.h>
+#else
+#undef NCURSES_XNAMES
+#define NCURSES_XNAMES 0
+#endif
#endif
#if HAVE_TIGETSTR
/****************************************************************************
- * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2011,2013 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 *
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1999
*
- * $Id: dots.c,v 1.23 2011/04/23 19:15:04 tom Exp $
+ * $Id: dots.c,v 1.25 2013/09/28 22:12:09 tom Exp $
*
* A simple demo of the terminfo interface.
*/
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = EOF;
} else {
rc = putc(c, stdout);
}
static bool
-outs(char *s)
+outs(const char *s)
{
if (valid(s)) {
tputs(s, 1, outc);
int x, y, z, p;
double r;
double c;
+ int my_colors;
CATCHALL(onsig);
setupterm((char *) 0, 1, (int *) 0);
outs(clear_screen);
outs(cursor_invisible);
- if (max_colors > 1) {
+ my_colors = max_colors;
+ if (my_colors > 1) {
if (!valid(set_a_foreground)
|| !valid(set_a_background)
|| (!valid(orig_colors) && !valid(orig_pair)))
- max_colors = -1;
+ my_colors = -1;
}
r = (double) (lines - 4);
p = (ranf() > 0.9) ? '*' : ' ';
tputs(tparm3(cursor_address, y, x), 1, outc);
- if (max_colors > 0) {
- z = (int) (ranf() * max_colors);
+ if (my_colors > 0) {
+ z = (int) (ranf() * my_colors);
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {
/*
* Author: Thomas E. Dickey - 2007
*
- * $Id: dots_mvcur.c,v 1.8 2013/05/25 22:58:22 tom Exp $
+ * $Id: dots_mvcur.c,v 1.10 2013/09/28 22:44:18 tom Exp $
*
* A simple demo of the terminfo interface, and mvcur.
*/
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = EOF;
} else {
if (putc(c, stdout) == EOF)
}
static bool
-outs(char *s)
+outs(const char *s)
{
if (valid(s)) {
tputs(s, 1, outc);
double r;
double c;
SCREEN *sp;
+ int my_colors;
CATCHALL(onsig);
outs(clear_screen);
outs(cursor_home);
outs(cursor_invisible);
- if (max_colors > 1) {
+ my_colors = max_colors;
+ if (my_colors > 1) {
if (!valid(set_a_foreground)
|| !valid(set_a_background)
|| (!valid(orig_colors) && !valid(orig_pair)))
- max_colors = -1;
+ my_colors = -1;
}
r = (double) (lines - 4);
y0 = y;
}
- if (max_colors > 0) {
- z = (int) (ranf() * max_colors);
+ if (my_colors > 0) {
+ z = (int) (ranf() * my_colors);
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_termcap.c,v 1.6 2013/09/07 23:12:30 Ray.Donnelly Exp $
+ * $Id: dots_termcap.c,v 1.7 2013/09/28 21:50:35 tom Exp $
*
* A simple demo of the termcap interface.
*/
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = EOF;
} else {
rc = putc(c, stdout);
/****************************************************************************
- * Copyright (c) 2003-2008,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2011,2013 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 *
* authorization. *
****************************************************************************/
/*
- * $Id: edit_field.c,v 1.21 2013/06/08 21:38:12 tom Exp $
+ * $Id: edit_field.c,v 1.22 2013/09/28 22:02:17 tom Exp $
*
* A wrapper for form_driver() which keeps track of the user's editing changes
* for each field, and makes the resulting length available as a
if (ptr == 0) {
int rows, cols, frow, fcol, nrow, nbuf;
- ptr = typeCalloc(FieldAttrs, 1);
+ ptr = typeCalloc(FieldAttrs, (size_t) 1);
ptr->background = field_back(f);
if (field_info(f, &rows, &cols, &frow, &fcol, &nrow, &nbuf) == E_OK) {
ptr->row_count = nrow;
* modified 10-18-89 for curses (jrl)
* 10-18-89 added signal handling
*
- * $Id: gdc.c,v 1.37 2013/04/27 19:50:17 tom Exp $
+ * $Id: gdc.c,v 1.38 2013/09/28 21:58:32 tom Exp $
*/
#include <test.priv.h>
}
/* this depends on the detailed format of ctime(3) */
- (void) strncpy(buf, ctime(&now), 30);
+ (void) strncpy(buf, ctime(&now), (size_t) 30);
(void) strcpy(buf + 10, buf + 19);
MvAddStr(16, 30, buf);
/****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 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 *
*
* Date: 05.Nov.90
*
- * $Id: hanoi.c,v 1.34 2012/12/08 16:41:56 tom Exp $
+ * $Id: hanoi.c,v 1.35 2013/09/28 22:02:17 tom Exp $
*/
#include <test.priv.h>
erase();
MvAddStr(1, 24, "T O W E R S O F H A N O I");
MvAddStr(3, 34, "SJR 1990");
- MvPrintw(19, 5, "Moves : %d of %.0f", NMoves, pow(2.0, NTiles) - 1);
+ MvPrintw(19, 5, "Moves : %d of %.0f", NMoves, pow(2.0, (float) NTiles) - 1);
(void) attrset(A_REVERSE);
MvAddStr(BASELINE, 8,
" ");
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.393 2013/09/07 19:17:48 tom Exp $
+$Id: ncurses.c,v 1.394 2013/09/28 21:58:37 tom Exp $
***************************************************************************/
MvAddStr(SLK_WORK, 0, "Please enter the label value: ");
strcpy(buf, "");
if ((s = slk_label(c - '0')) != 0) {
- strncpy(buf, s, 8);
+ strncpy(buf, s, (size_t) 8);
}
wGetstring(stdscr, buf, 8);
slk_set((c - '0'), buf, fmt);
transient((FRAME *) 0, (char *) 0);
switch (c) {
case CTRL('C'):
- if ((neww = typeCalloc(FRAME, 1)) == 0) {
+ if ((neww = typeCalloc(FRAME, (size_t) 1)) == 0) {
failed("acs_and_scroll");
goto breakout;
}
if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) {
transient(current, "Can't open screen dump file");
} else {
- if ((neww = typeCalloc(FRAME, 1)) != 0) {
+ if ((neww = typeCalloc(FRAME, (size_t) 1)) != 0) {
neww->next = current ? current->next : 0;
neww->last = current;
command = 0;
for (;;) {
char ch = '\0';
- if (read(fileno(stdin), &ch, 1) <= 0) {
+ if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
if (command == 0)
command = 'q';
break;
/****************************************************************************
- * Copyright (c) 2000-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 2000-2011,2013 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 *
/*
* Author: Thomas E. Dickey - 2000
*
- * $Id: railroad.c,v 1.20 2011/04/23 19:15:04 tom Exp $
+ * $Id: railroad.c,v 1.21 2013/09/28 22:02:17 tom Exp $
*
* A simple demo of the termcap interface.
*/
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = ERR;
} else {
if (putc(c, stdout) == EOF)
-/* $Id: tclock.c,v 1.32 2013/09/07 23:12:30 Ray.Donnelly Exp $ */
+/* $Id: tclock.c,v 1.33 2013/09/28 21:52:34 tom Exp $ */
#include <test.priv.h>
/* Plot a point */
static void
-plot(int x, int y, char col)
+plot(int x, int y, int col)
{
MvAddCh(y, x, (chtype) col);
}
/* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */
static void
-dline(int pair, int from_x, int from_y, int x2, int y2, char ch)
+dline(int pair, int from_x, int from_y, int x2, int y2, int ch)
{
int dx, dy;
int ax, ay;
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: test.priv.h,v 1.119 2013/09/07 18:49:43 tom Exp $ */
+/* $Id: test.priv.h,v 1.121 2013/09/28 22:43:22 tom Exp $ */
#ifndef __TEST_PRIV_H
#define __TEST_PRIV_H 1
#define HAVE_RIPOFFLINE 0
#endif
+#ifndef HAVE_SCR_DUMP
+#define HAVE_SCR_DUMP 0
+#endif
+
#ifndef HAVE_SETUPTERM
#define HAVE_SETUPTERM 0
#endif
#define HAVE_TERMNAME 0
#endif
+#ifndef HAVE_TERM_ENTRY_H
+#define HAVE_TERM_ENTRY_H 0
+#endif
+
#ifndef HAVE_TGETENT
#define HAVE_TGETENT 0
#endif
* So far (2013 - more than ten years), only ncurses implements
* use_extended_names().
*/
-#if defined(NCURSES_VERSION) && defined(HAVE_TERM_ENTRY_H) && HAVE_TERM_ENTRY_H
+#if defined(NCURSES_XNAMES)
+#elif defined(NCURSES_VERSION) && defined(HAVE_TERM_ENTRY_H) && HAVE_TERM_ENTRY_H
#define NCURSES_XNAMES 1
#else
#define NCURSES_XNAMES 0
* authorization. *
****************************************************************************/
/*
- * $Id: test_vid_puts.c,v 1.4 2013/01/13 01:04:14 tom Exp $
+ * $Id: test_vid_puts.c,v 1.5 2013/09/28 22:42:29 tom Exp $
*
* Demonstrate the vid_puts and vid_attr functions.
* Thomas Dickey - 2013/01/12
}
static bool
-outs(char *s)
+outs(const char *s)
{
if (valid(s)) {
tputs(s, 1, outc);
* authorization. *
****************************************************************************/
/*
- * $Id: test_vidputs.c,v 1.3 2013/01/13 00:58:54 tom Exp $
+ * $Id: test_vidputs.c,v 1.4 2013/09/28 22:45:21 tom Exp $
*
* Demonstrate the vidputs and vidattr functions.
* Thomas Dickey - 2013/01/12
}
static bool
-outs(char *s)
+outs(const char *s)
{
if (valid(s)) {
tputs(s, 1, outc);
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.93 2013/04/27 19:46:53 tom Exp $
+ * $Id: view.c,v 1.94 2013/09/28 21:58:42 tom Exp $
*/
#include <test.priv.h>
printw("%.*s", COLS, temp);
clrtoeol();
this_time = time((time_t *) 0);
- strncpy(temp, ctime(&this_time), 30);
+ strncpy(temp, ctime(&this_time), (size_t) 30);
if ((i = (int) strlen(temp)) != 0) {
temp[--i] = 0;
if (move(0, COLS - i - 2) != ERR)