mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 08:15:27 +00:00
Fill in the return values for unused functions; naming.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
RCSID("$Id: pdcclip.c,v 1.1 2007/06/12 07:02:53 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcclip.c,v 1.2 2007/06/13 18:45:34 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -58,7 +58,7 @@ RCSID("$Id: pdcclip.c,v 1.1 2007/06/12 07:02:53 wmcbrine Exp $");
|
||||
|
||||
/* global clipboard contents, should be NULL if none set */
|
||||
|
||||
static char *pdc_FOO_clipboard = NULL;
|
||||
static char *pdc_SDL_clipboard = NULL;
|
||||
|
||||
int PDC_getclipboard(char **contents, long *length)
|
||||
{
|
||||
@@ -66,14 +66,14 @@ int PDC_getclipboard(char **contents, long *length)
|
||||
|
||||
PDC_LOG(("PDC_getclipboard() - called\n"));
|
||||
|
||||
if (!pdc_FOO_clipboard)
|
||||
if (!pdc_SDL_clipboard)
|
||||
return PDC_CLIP_EMPTY;
|
||||
|
||||
len = strlen(pdc_FOO_clipboard);
|
||||
len = strlen(pdc_SDL_clipboard);
|
||||
if ((*contents = malloc(len + 1)) == NULL)
|
||||
return PDC_CLIP_MEMORY_ERROR;
|
||||
|
||||
strcpy(*contents, pdc_FOO_clipboard);
|
||||
strcpy(*contents, pdc_SDL_clipboard);
|
||||
*length = len;
|
||||
|
||||
return PDC_CLIP_SUCCESS;
|
||||
@@ -83,18 +83,18 @@ int PDC_setclipboard(const char *contents, long length)
|
||||
{
|
||||
PDC_LOG(("PDC_setclipboard() - called\n"));
|
||||
|
||||
if (pdc_FOO_clipboard)
|
||||
if (pdc_SDL_clipboard)
|
||||
{
|
||||
free(pdc_FOO_clipboard);
|
||||
pdc_FOO_clipboard = NULL;
|
||||
free(pdc_SDL_clipboard);
|
||||
pdc_SDL_clipboard = NULL;
|
||||
}
|
||||
|
||||
if (contents)
|
||||
{
|
||||
if ((pdc_FOO_clipboard = malloc(length + 1)) == NULL)
|
||||
if ((pdc_SDL_clipboard = malloc(length + 1)) == NULL)
|
||||
return PDC_CLIP_MEMORY_ERROR;
|
||||
|
||||
strcpy(pdc_FOO_clipboard, contents);
|
||||
strcpy(pdc_SDL_clipboard, contents);
|
||||
}
|
||||
|
||||
return PDC_CLIP_SUCCESS;
|
||||
@@ -129,10 +129,10 @@ int PDC_clearclipboard(void)
|
||||
{
|
||||
PDC_LOG(("PDC_clearclipboard() - called\n"));
|
||||
|
||||
if (pdc_FOO_clipboard)
|
||||
if (pdc_SDL_clipboard)
|
||||
{
|
||||
free(pdc_FOO_clipboard);
|
||||
pdc_FOO_clipboard = NULL;
|
||||
free(pdc_SDL_clipboard);
|
||||
pdc_SDL_clipboard = NULL;
|
||||
}
|
||||
|
||||
return PDC_CLIP_SUCCESS;
|
||||
|
||||
@@ -13,13 +13,15 @@
|
||||
|
||||
#include "pdcsdl.h"
|
||||
|
||||
RCSID("$Id: pdcgetsc.c,v 1.2 2007/06/12 17:28:34 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcgetsc.c,v 1.3 2007/06/13 18:45:34 wmcbrine Exp $");
|
||||
|
||||
/* get the cursor size/shape */
|
||||
|
||||
int PDC_get_cursor_mode(void)
|
||||
{
|
||||
PDC_LOG(("PDC_get_cursor_mode() - called\n"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* return number of screen rows */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "pdcsdl.h"
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.6 2007/06/13 17:43:31 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.7 2007/06/13 18:45:34 wmcbrine Exp $");
|
||||
|
||||
static SDL_Event event;
|
||||
static SDLKey oldkey;
|
||||
@@ -104,6 +104,8 @@ static struct
|
||||
unsigned long PDC_get_input_fd(void)
|
||||
{
|
||||
PDC_LOG(("PDC_get_input_fd() - called\n"));
|
||||
|
||||
return 0L; /* test this */
|
||||
}
|
||||
|
||||
void PDC_set_keyboard_binary(bool on)
|
||||
@@ -358,8 +360,11 @@ void PDC_flushinp(void)
|
||||
int PDC_mouse_set(void)
|
||||
{
|
||||
SDL_ShowCursor(SP->_trap_mbe ? SDL_ENABLE : SDL_DISABLE);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
int PDC_modifiers_set(void)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user