/****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 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 <curses.priv.h>
-MODULE_ID("$Id: hardscroll.c,v 1.50 2012/09/01 23:24:49 tom Exp $")
+MODULE_ID("$Id: hardscroll.c,v 1.53 2016/05/28 23:32:40 tom Exp $")
#if defined(SCROLLDEBUG) || defined(HASHDEBUG)
oldnums(SP_PARM));
if (!new_oldnums)
return;
- FreeIfNeeded(oldnums(SP_PARM));
oldnums(SP_PARM) = new_oldnums;
OLDNUM_SIZE(SP_PARM) = need_lines;
}
NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_DCL0)
/* dump the state of the real and virtual oldnum fields */
{
- int n;
char *buf = 0;
size_t want = ((size_t) screen_lines(SP_PARM) + 1) * 4;
+ (void) SP_PARM;
if ((buf = typeMalloc(char, want)) != 0) {
+ int n;
*buf = '\0';
for (n = 0; n < screen_lines(SP_PARM); n++)
for (;;) {
int n;
- for (n = 0; n < screen_lines; n++)
+ for (n = 0; n < screen_lines(sp); n++)
oldnums[n] = _NEWINDEX;
/* grab the test vector */