mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 15:55:14 +00:00
With ANSI as the new base requirement, PDC_memmove() is unneeded
(memmove() is ANSI), and memory.h is _probably_ unneeded -- still have to check the 16-bit DOS compilers.
This commit is contained in:
@@ -34,12 +34,8 @@
|
||||
#include <curses.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_newdemo = "$Id: newdemo.c,v 1.19 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_newdemo = "$Id: newdemo.c,v 1.20 2006/01/28 18:19:50 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
int WaitForUser(void);
|
||||
|
||||
@@ -509,7 +509,6 @@ FUNCTIONS
|
||||
PDC_getclipboard pdcclip
|
||||
PDC_gotoxy pdcdisp
|
||||
PDC_makenew pdcwin
|
||||
PDC_memmove pdcutil
|
||||
PDC_newline pdcdisp
|
||||
PDC_print pdcprint
|
||||
PDC_putc pdcdisp
|
||||
|
||||
@@ -21,15 +21,10 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <curses.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.11 2006/01/28 17:41:25 wmcbrine Exp $";
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.12 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
#include <curses.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
/* undefine any macros for functions defined in this module */
|
||||
#undef delch
|
||||
#undef wdelch
|
||||
@@ -39,13 +35,8 @@
|
||||
# undef wmove
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
# define memmove PDC_memmove
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_delch = "$Id: delch.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_delch = "$Id: delch.c,v 1.8 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
@@ -90,18 +81,14 @@ char *rcsid_delch = "$Id: delch.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_CDECL delch(void)
|
||||
/***********************************************************************/
|
||||
int PDC_CDECL delch(void)
|
||||
{
|
||||
PDC_LOG(("delch() - called\n"));
|
||||
|
||||
return wdelch(stdscr);
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_CDECL wdelch(WINDOW *win)
|
||||
/***********************************************************************/
|
||||
int PDC_CDECL wdelch(WINDOW *win)
|
||||
{
|
||||
int y, x, maxx;
|
||||
chtype *temp1;
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
#include <curses.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
/* undefine any macros for functions defined in this module */
|
||||
#undef initscr
|
||||
#undef endwin
|
||||
@@ -47,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_initscr = "$Id: initscr.c,v 1.25 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_initscr = "$Id: initscr.c,v 1.26 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#else
|
||||
char *_curses_notice = "PDCurses 2.7b - Public Domain 2006";
|
||||
#endif
|
||||
|
||||
@@ -24,13 +24,8 @@
|
||||
# define INCLUDE_WINDOWS_H
|
||||
#endif
|
||||
#include <curses.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
@@ -77,7 +72,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_kernel = "$Id: kernel.c,v 1.26 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_kernel = "$Id: kernel.c,v 1.27 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
RIPPEDOFFLINE linesripped[5];
|
||||
|
||||
@@ -21,13 +21,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <curses.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
/* undefine any macros for functions defined in this module */
|
||||
#undef newpad
|
||||
#undef subpad
|
||||
@@ -41,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_pad = "$Id: pad.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_pad = "$Id: pad.c,v 1.10 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/* save values for pechochar() */
|
||||
|
||||
@@ -24,60 +24,16 @@
|
||||
# define INCLUDE_WINDOWS_H
|
||||
#endif
|
||||
#include <curses.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCutil = "$Id: pdcutil.c,v 1.22 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_PDCutil = "$Id: pdcutil.c,v 1.23 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
|
||||
PDC_memmove() - Replacement memmove() for lacking compliers.
|
||||
|
||||
PDCurses Description:
|
||||
This is a private PDCurses routine.
|
||||
|
||||
Move a portion of memory taking consideration of overlapping memory
|
||||
areas.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns NULL if no temporary memory could be allocated.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_memmove(void *s1, const void *s2, size_t n);
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
void *PDC_memmove(void *s1, const void *s2, size_t n)
|
||||
/***********************************************************************/
|
||||
{
|
||||
char *dd;
|
||||
const char *ss;
|
||||
|
||||
dd = (char *) s1;
|
||||
ss = (const char *) s2;
|
||||
|
||||
if (dd > ss && dd < ss + n)
|
||||
{
|
||||
dd += n;
|
||||
ss += n;
|
||||
while (n--)
|
||||
*--dd = *--ss;
|
||||
} else
|
||||
while (n--)
|
||||
*dd++ = *ss++;
|
||||
|
||||
return s1;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
void PDC_beep(void)
|
||||
/***********************************************************************/
|
||||
{
|
||||
#if defined(XCURSES)
|
||||
XCursesInstruct(CURSES_BELL);
|
||||
@@ -148,9 +104,7 @@ void PDC_beep(void)
|
||||
--buf; *buf = x; --chars; \
|
||||
} while (0)
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_vsscanf(char *buf, const char *fmt, va_list arg_ptr)
|
||||
/***********************************************************************/
|
||||
{
|
||||
int count, chars, c, width, radix, d, i;
|
||||
int *int_ptr;
|
||||
@@ -603,9 +557,7 @@ int PDC_vsscanf(char *buf, const char *fmt, va_list arg_ptr)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
bool PDC_breakout(void)
|
||||
/***********************************************************************/
|
||||
{
|
||||
extern int c_pindex; /* putter index */
|
||||
extern int c_gindex; /* getter index */
|
||||
|
||||
@@ -21,19 +21,10 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <curses.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
# define memmove PDC_memmove
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.17 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.18 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
@@ -60,12 +51,10 @@ char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.17 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_copy_win(const WINDOW *src_w, WINDOW *dst_w,
|
||||
int src_tr, int src_tc, int src_br, int src_bc,
|
||||
int dst_tr, int dst_tc, int dst_br, int dst_bc,
|
||||
bool overlay)
|
||||
/***********************************************************************/
|
||||
{
|
||||
int col, line, y1, fc, *minchng, *maxchng;
|
||||
chtype *w1ptr, *w2ptr;
|
||||
@@ -157,9 +146,7 @@ int PDC_copy_win(const WINDOW *src_w, WINDOW *dst_w,
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
WINDOW *PDC_makenew(int num_lines, int num_columns, int begy, int begx)
|
||||
/***********************************************************************/
|
||||
{
|
||||
extern void *(*mallc)(size_t);
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
@@ -272,9 +259,7 @@ WINDOW *PDC_makenew(int num_lines, int num_columns, int begy, int begx)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
void PDC_sync(WINDOW *win)
|
||||
/***********************************************************************/
|
||||
{
|
||||
PDC_LOG(("PDC_sync() - called:\n"));
|
||||
|
||||
@@ -322,9 +307,7 @@ void PDC_sync(WINDOW *win)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_CDECL PDC_chadd(WINDOW *win, chtype ch, bool xlat, bool advance)
|
||||
/***********************************************************************/
|
||||
{
|
||||
int x, y, newx, ts, retval;
|
||||
chtype attr = 0, bktmp;
|
||||
@@ -544,9 +527,7 @@ int PDC_CDECL PDC_chadd(WINDOW *win, chtype ch, bool xlat, bool advance)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_chg_attrs(WINDOW *win, chtype attr, int sy, int sx, int ey, int ex)
|
||||
/***********************************************************************/
|
||||
{
|
||||
chtype oldattr = win->_attrs;
|
||||
int c, l;
|
||||
@@ -613,9 +594,7 @@ int PDC_chg_attrs(WINDOW *win, chtype attr, int sy, int sx, int ey, int ex)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_chins(WINDOW *win, chtype c, bool xlat)
|
||||
/***********************************************************************/
|
||||
{
|
||||
int x, y, maxx, offset;
|
||||
chtype *temp1;
|
||||
@@ -663,9 +642,7 @@ int PDC_chins(WINDOW *win, chtype c, bool xlat)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_clr_scrn(WINDOW *win)
|
||||
/***********************************************************************/
|
||||
{
|
||||
#if !defined(XCURSES)
|
||||
# if defined(UNIX_WCLR)
|
||||
@@ -706,9 +683,7 @@ int PDC_clr_scrn(WINDOW *win)
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
int PDC_newline(WINDOW *win, int lin)
|
||||
/***********************************************************************/
|
||||
{
|
||||
PDC_LOG(("PDC_newline() - called: line %d\n", lin));
|
||||
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
/* undefine any macros for functions defined in this module */
|
||||
#undef refresh
|
||||
#undef wrefresh
|
||||
@@ -47,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_refresh = "$Id: refresh.c,v 1.11 2006/01/28 16:53:26 wmcbrine Exp $";
|
||||
char *rcsid_refresh = "$Id: refresh.c,v 1.12 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
|
||||
@@ -297,7 +297,6 @@ EXPORTS PDC_get_rows
|
||||
EXPORTS PDC_get_scrn_mode
|
||||
EXPORTS PDC_gotoxy
|
||||
EXPORTS PDC_makenew
|
||||
EXPORTS PDC_memmove
|
||||
EXPORTS PDC_newline
|
||||
EXPORTS PDC_print
|
||||
EXPORTS PDC_putc
|
||||
|
||||
@@ -290,7 +290,6 @@ PDC_get_rows
|
||||
PDC_get_scrn_mode
|
||||
PDC_gotoxy
|
||||
PDC_makenew
|
||||
PDC_memmove
|
||||
PDC_newline
|
||||
PDC_print
|
||||
PDC_putc
|
||||
|
||||
@@ -16,20 +16,17 @@
|
||||
* See the file maintain.er for details of the current maintainer.
|
||||
**************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#define CURSES_LIBRARY 1
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#include <curses.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
extern HANDLE hConOut;
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.10 2006/01/28 17:41:25 wmcbrine Exp $";
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.11 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
static CHAR_INFO ci[512];
|
||||
|
||||
@@ -21,15 +21,10 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <curses.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.10 2006/01/28 17:41:25 wmcbrine Exp $";
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.11 2006/01/28 18:19:51 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
|
||||
Reference in New Issue
Block a user