Esempio n. 1
0
static void
setSessionEntry (void) {
  describeScreen(&scr);
  if (scr.number == -1) scr.number = userVirtualTerminal(0);

  {
    typedef enum {SAME, DIFFERENT, FIRST} State;
    State state = (!ses)? FIRST:
                  (scr.number == ses->number)? SAME:
                  DIFFERENT;

    if (state != SAME) {
      ses = getSessionEntry(scr.number);

      if (state == FIRST) {
        pushCommandEnvironment("main", preprocessCommand, postprocessCommand);
        pushCommandHandler("unhandled", KTB_CTX_DEFAULT, handleUnhandledCommand, NULL);

#ifdef ENABLE_SPEECH_SUPPORT
        pushCommandHandler("speech", KTB_CTX_DEFAULT, handleSpeechCommand, NULL);
#endif /*  ENABLE_SPEECH_SUPPORT */

        pushCommandHandler("navigation", KTB_CTX_DEFAULT, handleNavigationCommand, NULL);
        pushCommandHandler("screen", KTB_CTX_DEFAULT, handleScreenCommand, NULL);
      }
    }
  }
}
Esempio n. 2
0
static int
currentVirtualTerminal_HelpScreen (void) {
  return userVirtualTerminal(1);
}