I am working two clinics now and I'm gone about 70 hrs a week. I do not have time to learn the new code to get the borg's keypress stuff working.
I will need someone to help me rewrite the inkey_ex() from util.c to allow the borg to function.
The old 320 code looked like this:
The new 330 stuff looks like this:
For the rest of the 330 code changes, I was able to quickly identify the variable name changes and the few struct changes-- most have been updated. But I have no idea how the event handler works.
I see there is a change to the feature array as well. I will cross that bridge when I come to it.
The borg source code is at innovapain.com/borg
Andrew
I will need someone to help me rewrite the inkey_ex() from util.c to allow the borg to function.
The old 320 code looked like this:
Code:
ui_event_data inkey_ex(void)
{
bool cursor_state;
ui_event_data kk;
ui_event_data ke;
bool done = FALSE;
term *old = Term;
/* Initialise keypress */
ke.key = 0;
ke.type = EVT_NONE;
/* Hack -- Use the "inkey_next" pointer */
[B]if (inkey_next && *inkey_next && !inkey_xtra)[/B]
{
/* Get next character, and advance */
ke.key = *inkey_next++;
ke.type = EVT_KBRD;
/* Cancel the various "global parameters" */
inkey_base = inkey_xtra = inkey_flag = FALSE;
inkey_scan = 0;
/* Accept result */
return (ke);
}
/* Forget pointer */
inkey_next = NULL;
#ifdef ALLOW_BORG
/* Mega-Hack -- Use the special hook */
[B]if (inkey_hack && ((ke.key = (*inkey_hack)(inkey_xtra)) != 0))[/B]
{
/* Cancel the various "global parameters" */
inkey_base = inkey_xtra = inkey_flag = FALSE;
inkey_scan = 0;
ke.type = EVT_KBRD;
/* Accept result */
return (ke);
}
#endif /* ALLOW_BORG */
Code:
ui_event inkey_ex(void)
{
bool cursor_state;
ui_event kk;
ui_event ke = EVENT_EMPTY;
bool done = FALSE;
term *old = Term;
/* Delayed flush */
if (inkey_xtra) {
Term_flush();
inkey_next = NULL;
inkey_xtra = FALSE;
}
/* Hack -- Use the "inkey_next" pointer */
[B]if (inkey_next && inkey_next->code)[/B]
{
/* Get next character, and advance */
ke.key = *inkey_next++;
/* Cancel the various "global parameters" */
inkey_flag = FALSE;
inkey_scan = 0;
/* Accept result */
return (ke);
}
/* Forget pointer */
inkey_next = NULL;
#ifdef ALLOW_BORG
/* Mega-Hack -- Use the special hook */
[B]if (inkey_hack && ((ke.key = (*inkey_hack)(inkey_xtra)) != 0))[/B]
{
/* Cancel the various "global parameters" */
inkey_flag = FALSE;
inkey_scan = 0;
ke.type = EVT_KBRD;
/* Accept result */
return (ke);
}
#endif /* ALLOW_BORG */
I see there is a change to the feature array as well. I will cross that bridge when I come to it.
The borg source code is at innovapain.com/borg
Andrew
Comment