apps/graphics/pdcurs34: Fix or remove monst #warning's

This commit is contained in:
Gregory Nutt 2017-11-21 08:18:21 -06:00
parent 678af717c8
commit 63e3af2d62
5 changed files with 39 additions and 14 deletions

View File

@ -65,7 +65,6 @@
int PDC_getclipboard(char **contents, long *length)
{
PDC_LOG(("PDC_getclipboard() - called\n"));
#warning Missing logic
return PDC_CLIP_ACCESS_ERROR;
}
@ -88,7 +87,6 @@ int PDC_getclipboard(char **contents, long *length)
int PDC_setclipboard(const char *contents, long length)
{
PDC_LOG(("PDC_setclipboard() - called\n"));
#warning Missing logic
return PDC_CLIP_ACCESS_ERROR;
}
@ -110,7 +108,6 @@ int PDC_setclipboard(const char *contents, long length)
int PDC_freeclipboard(char *contents)
{
PDC_LOG(("PDC_freeclipboard() - called\n"));
#warning Missing logic
return PDC_CLIP_ACCESS_ERROR;
}
@ -132,6 +129,5 @@ int PDC_freeclipboard(char *contents)
int PDC_clearclipboard(void)
{
PDC_LOG(("PDC_clearclipboard() - called\n"));
#warning Missing logic
return PDC_CLIP_ACCESS_ERROR;
}

View File

@ -396,8 +396,7 @@ void PDC_gotoyx(int row, int col)
if (SP->visibility != 0)
{
/* Draw a new cursor by overprinting the existing character in
* reverse, either the full cell (when visibility == 2) or the
* lowest quarter of it (when visibility == 1)
* reverse. NOTE: visibility {1, 2} are treated the same.
*/
ch = curscr->_y[row][col] ^ A_REVERSE;

View File

@ -210,6 +210,9 @@ int PDC_get_key(void)
* at a most rate if held down.
* 2) Otherwise, block, polling for a change in button state. But,
* apparently, we can just return ERR in this case.
*
* The joystick driver also supports a notification via signal
* when a button change occurs. This could be an option to poll().
*/
return ERR;

View File

@ -58,9 +58,38 @@
int PDC_curs_set(int visibility)
{
int ret;
PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility));
#warning Missing logic
return ERR;
/* The return value is the previous visibility */
ret = SP->visibility;
/* Make sure that the new visibility is within range, then instantiate it. */
if (visibility < 0)
{
visibility = 0;
}
else if (visibility > 2)
{
visibility = 2;
}
SP->visibility = visibility;
/* Redraw the cursor of the visiblity has change. For our purses 1 and 2
* are currently treated the same.
*/
if ((ret == 0 && visibility > 0) || /* From OFF to ON */
(ret > 0 && visibility == 0)) /* From ON to OFF */
{
PDC_gotoyx(SP->cursrow, SP->curscol);
}
return ret;
}
/****************************************************************************
@ -75,8 +104,7 @@ int PDC_curs_set(int visibility)
void PDC_set_title(const char *title)
{
PDC_LOG(("PDC_set_title() - called:<%s>\n", title));
#warning Missing logic
PDC_LOG(("PDC_set_title() - called:<%s>\n", title));
}
/****************************************************************************
@ -85,7 +113,7 @@ void PDC_set_title(const char *title)
* Description:
* PDC_set_blink() toggles whether the A_BLINK attribute sets an actual
* blink mode (true), or sets the background color to high intensity
* (false). The default is platform-dependent (false in most cases). It
* (false). The default is platform-dependent (false in most cases). It
* returns OK if it could set the state to match the given parameter,
* ERR otherwise. Current platforms also adjust the value of COLORS
* according to this function -- 16 for false, and 8 for true.
@ -94,6 +122,6 @@ void PDC_set_title(const char *title)
int PDC_set_blink(bool blinkon)
{
#warning Missing logic
return ERR;
COLORS = 16;
return blinkon ? ERR : OK;
}

View File

@ -60,7 +60,6 @@
void PDC_beep(void)
{
PDC_LOG(("PDC_beep() - called\n"));
#warning Missing logic
}
/****************************************************************************