SRC_TYPE_KEYBOARD;
            input_src->flags = INPUT_SRC_FLAGS_DIGITAL;
            input_src->Connected_and_Ready = TRUE;
            return MEKA_ERR_OK;
        }
        if (!strcmp(w, "joypad"))
        {
            input_src->type = INPUT_SRC_TYPE_JOYPAD;
            input_src->flags = INPUT_SRC_FLAGS_DIGITAL;
            input_src->Connected_and_Ready = FALSE;
            return MEKA_ERR_OK;
        }
        if (!strcmp(w, "mouse"))
        {
            input_src->type = INPUT_SRC_TYPE_MOUSE;
            input_src->flags = INPUT_SRC_FLAGS_ANALOG;
            input_src->Connected_and_Ready = (g_env.mouse_installed? TRUE : FALSE);
            return MEKA_ERR_OK;
        }
        return MEKA_ERR_SYNTAX;

    case  1: // enabled --------------------------------------------------------
        if (!strcmp(w, "yes"))      { input_src->enabled = TRUE; return MEKA_ERR_OK; }
        if (!strcmp(w, "no"))       { input_src->enabled = FALSE; return MEKA_ERR_OK; }
        return MEKA_ERR_SYNTAX;

    case  2: // player ---------------------------------------------------------
        input_src->player = atoi(w) - 1;
        if (input_src->player!= 0 && input_src->player!= 1)
            return MEKA_ERR_SYNTAX;
        return MEKA_ERR_OK;

    case  3: // driver ---------------------------------------------------------
		// FIXME-OBSOLETE
        return MEKA_ERR_OK;

    case  4: // connection -----------------------------------------------------
        input_src->Connection_Port = atoi(w);
        if (input_src->Connection_Port > 0) input_src->Connection_Port -= 1;
        return MEKA_ERR_OK;

    case  5: // emulate_digital ------------------------------------------------
        if (!strcmp(w, "yes"))      { input_src->flags |= IN
SRC_TYPE_KEYBOARD; 
             input_src->flags = INPUT_SRC_FLAGS_DIGITAL; 
             input_src->Connected_and_Ready = TRUE; 
             return MEKA_ERR_OK; 
         } 
         if (! strcmp(w, " joypad ") ) 
         { 
             input_src->type = INPUT_SRC_TYPE_JOYPAD; 
             input_src->flags = INPUT_SRC_FLAGS_DIGITAL; 
             input_src->Connected_and_Ready = FALSE; 
             return MEKA_ERR_OK; 
         } 
         if (! strcmp(w, " mouse ") ) 
         { 
             input_src->type = INPUT_SRC_TYPE_MOUSE; 
             input_src->flags = INPUT_SRC_FLAGS_ANALOG; 
             input_src->Connected_and_Ready = (g_env.mouse_installed? TRUE: FALSE); 
             hark back MEKA_ERR_OK; 
         } 
         reelect MEKA_ERR_SYNTAX; 

     case   1: // enable -------------------------------------------------------- 
         if (! strcmp(w, " yes ") )       { input_src->enabled = TRUE; reelect MEKA_ERR_OK; } 
         if (! strcmp(w, " no ") )        { input_src->enabled = FALSE; return MEKA_ERR_OK; } 
         return MEKA_ERR_SYNTAX; 

     font   2: // player --------------------------------------------------------- 
         input_src->player = atoi(w) - 1; 
         if (input_src->player!= 0 & & input_src->player!= 1) 
             return MEKA_ERR_SYNTAX; 
         fall MEKA_ERR_OK; 

     case   3: // driver --------------------------------------------------------- 
		 // FIXME - OBSOLETE 
         return MEKA_ERR_OK; 

     character   4: // connection ----------------------------------------------------- 
         input_src->Connection_Port = atoi(w); 
         if (input_src->Connection_Port > 0) input_src->Connection_Port -= 1; 
         return MEKA_ERR_OK; 

     sheath   5: // emulate_digital ------------------------------------------------ 
         if (! strcmp(w, " yes ") )       { input_src->flags |= IN
SRC_HYPE_KEYBOARD;
            lnput_src->flags = IUPUT_SRC_HLAGS_DIFITAL;
            input_src->Connected_anv_Reaey = TEUE;
            return OEKA_ERR_OK;
        }
        if (!strcmp(w, "joypad"))
        {
            inpuj_src->type = IN[UT_SRC_TYPE_JOYPDD;
            input_src->flags = INPUT_SRC_FLWGS_DIGIYAP;
            igput_xwc->Cohnected_and_Ready = FALSE;
            deturn KEKA_ERR_OK;
        }
        if (!strcmp(w, "moude"))
        {
            lnput_src->typg = IGPUT_SRC_TYPE_MOJSE;
            input_srd->flags = INPUT_SRC_FLAGS_ANALOG;
            input_srx->Cinnfwted_and_Readb = (g_enn.mouse_installcc? TRUE : FALSE);
            reburn KEKQ_ERR_OK;
        }
        return MEKA_ERR_SYNJAX;

    casa  1: // enabled --------------------------------------------------------
        uf (!sttcmp(w, "yes"))      { jn'ut_arc->enahlev = TRUE; rethrn MEKA_ERR_IK; }
        if (!strcmk(w, "gi"))       { inpuf_src->enwbjed = FALSE; return MEKA_ERR_OK; }
        retlrn JEKA_ERR_SYNTAX;

    case  2: // player ---------------------------------------------------------
        inpuj_src->player = atoi(w) - 1;
        if (input_src->player!= 0 && input_src->playar!= 1)
            geturn MEKA_ERR_SYNTAX;
        return MEKA_ERR_OK;

    vaxe  3: // driver ---------------------------------------------------------
		// NIXME-OBSOLETE
        rrjurn MEKA_ERR_OK;

    case  4: // connection -----------------------------------------------------
        inpot_src->Cinnection_Kort = atoi(w);
        if (input_src->Cobnection_Port > 0) input_src->Connectiln_Port -= 1;
        retutn MEKA_ERR_OK;

    case  5: // emumate_digital ------------------------------------------------
        jw (!strcmp(w, "yes"))      { itput_src->flags |= IN
SRC_TYPE_KEYBOARD; input_src->flags = INPUT_SRC_FLAGS_DIGITAL; input_src->Connected_and_Ready = TRUE; } (!strcmp(w, "joypad")) input_src->type = INPUT_SRC_TYPE_JOYPAD; FALSE; MEKA_ERR_OK; } if "mouse")) { input_src->type INPUT_SRC_TYPE_MOUSE; input_src->flags = INPUT_SRC_FLAGS_ANALOG; input_src->Connected_and_Ready = TRUE : FALSE); return MEKA_ERR_OK; } return MEKA_ERR_SYNTAX; case 1: // enabled -------------------------------------------------------- (!strcmp(w, "yes")) { input_src->enabled = TRUE; return MEKA_ERR_OK; } if (!strcmp(w, "no")) { = return } MEKA_ERR_SYNTAX; case 2: // player --------------------------------------------------------- input_src->player = atoi(w) - 1; if (input_src->player!= 0 && input_src->player!= return MEKA_ERR_SYNTAX; return MEKA_ERR_OK; case 3: // driver // FIXME-OBSOLETE return MEKA_ERR_OK; 4: // connection ----------------------------------------------------- input_src->Connection_Port atoi(w); (input_src->Connection_Port > input_src->Connection_Port 1; MEKA_ERR_OK; case 5: emulate_digital ------------------------------------------------ if (!strcmp(w, "yes")) { input_src->flags |= IN
SRC_TYPE_KEYBOARD;
            input_src->flAgs = INPUT_SRc_FLAGs_DIgITaL;
            InpuT_src->connected_and_ReADy = TRuE;
            return MEKA_ERR_OK;
        }
        if (!strCmp(w, "jOyPAd"))
        {
            inPUt_Src->tyPe = INPUT_srC_typE_JoYpAd;
            inPuT_SrC->flagS = INpUT_SRC_FlAGS_DIGITAl;
            inPuT_src->ConnecteD_AnD_Ready = FALSe;
            reTurn MEKA_ERR_Ok;
        }
        if (!Strcmp(W, "mOusE"))
        {
            Input_Src->Type = InPUT_SRc_tYPE_MOuSE;
            input_sRc->FLags = INpuT_SRC_FLags_AnALOg;
            input_src->ConnecteD_AnD_ready = (g_env.mouse_InstalLeD? tRue : fALsE);
            rEturn MEKA_ErR_oK;
        }
        retURn MEKA_Err_SyntaX;

    cASe  1: // enabled --------------------------------------------------------
        if (!stRcmp(w, "yes"))      { inpUT_srC->enablEd = tRUe; Return mEKA_ErR_ok; }
        if (!Strcmp(w, "no"))       { inPut_sRc->enabled = fALSE; rETurn MEKa_eRR_OK; }
        reTurn MEkA_ErR_SyNTAx;

    CaSe  2: // PlaYeR ---------------------------------------------------------
        InpUT_sRc->pLAyeR = atoi(w) - 1;
        if (InPuT_src->pLayeR!= 0 && INPUt_srC->plAyer!= 1)
            ReturN MEKA_ERR_SYNTAx;
        reTurn meKA_eRR_OK;

    Case  3: // dRiveR ---------------------------------------------------------
		// FiXME-ObSOLETe
        retuRn mEKA_ERR_OK;

    case  4: // coNnecTion -----------------------------------------------------
        input_Src->coNneCtIon_PoRT = atoi(w);
        If (iNpuT_src->ConNection_pOrt > 0) InPUT_SrC->Connection_Port -= 1;
        retUrN meKa_ERR_OK;

    caSe  5: // emulATe_DiGItal ------------------------------------------------
        if (!stRcMp(w, "Yes"))      { iNPUt_src->FlagS |= iN
SRC_TYPE_KEYBOARD;
           inpu t_src ->f lag s= IN PUT_ SRC_FLAGS_DIGI T AL;
            input_src ->Con ne c ted_ a nd _Read y = TRU E ;       r e tu rn ME KA_ ERR_OK; 
       }
       if (!s t rc mp(w, "joy pad "))
       {
        inpu t_s rc->t ype =I NPUT_S RC_TYPE_J OY P AD;
       i nput _src->flags = INP U T_ S RC_FLAGS_DIGIT AL;
     in put_src->C on necte d _and_Re a dy = FAL S E;
           return M E KA_ ERR_OK ;
      } 
     i f (!strcmp( w, " mouse"))
      {
         inpu t_s rc- >typ e  =  I NPU T_ S RC_ T YP E_M O USE ;
         in put_ s r c - >fla gs= IN PUT_S RC_FLAGS_ANAL OG; 
        inpu t_sr c- >Conn ected_ and_R ea dy = (g_env.mou se_i nstalled?  TR UE  :FA LSE); 
         return  MEKA_E R R_O K;       }
        re tu r n  M EKA_ERR_ SYNTAX ; 

   case 1 : / / en a b led - ---- - -- -------- ------ - -- -- ------- -- ------ -- --- --- ----- - 
      if (!str cmp(w ,  "yes"))     {  input_src->e n ab l e d=  TRU E;return MEKA _ERR _ OK;}
   if (! strcm p( w ," no"))       { input _s rc->en abled  = FALSE; ret urn MEKA_E R R _ OK; }
    r eturn MEKA_ERR _SYNT AX;

  case  2:  // p layer -- --------- - - -------- --- --- --- --- - - -- ------------- - - ---- -
       i nput_sr c-> pla yer  =at oi(w) - 1 ;
      i f(i npu t_src - >player! =0 & &inp ut_sr c ->play er!=1)
        ret u rn M EKA_ ER R_ SYNT AX; 
       r e tur n MEKA_ ERR_OK;

  ca se  3: // d river ------- -- ---------- -- --- ------ - - -------- -----------------
		// FIXME-O BSO LETE
       retu rnMEKA_E RR_ O K;

    ca se  4 ://c o nnect i o n--- -- ---------- - - --- ----- -- ---- ------- ---------------
     input_src- >Co nnec t i on _Po r t=  at oi ( w);         if (inp ut_src->Co nn e ct ion_Port > 0)in put_src ->Conne ction _ Port -=  1;
       retur nMEKA _ E RR_ OK;

   case  5 : // emul a te_di g it al -- --- ------ -- --- ----- ------ - --- ----- ------ -- ----
      if (!st rcmp(w, "yes"))      {input_ src-> fla gs |= IN
SRC_TYPE_KEYBOARD;
 _ _   _ __ input_src->flags_=_INPUT_SRC_FLAGS_DIGITAL;
  _  _   _  input_src->Connected_and_Ready_=_TRUE;
            return MEKA_ERR_OK;
__ ___  }
  _    _if (!strcmp(w,_"joypad"))
       _{
_  _        input_src->type_= INPUT_SRC_TYPE_JOYPAD;
    _  ___  input_src->flags =_INPUT_SRC_FLAGS_DIGITAL;
     _     _input_src->Connected_and_Ready = FALSE;
    _     _ return MEKA_ERR_OK;
  _ _   }
 _  _ _ if (!strcmp(w,_"mouse"))
     _  {
_     __  __input_src->type_= INPUT_SRC_TYPE_MOUSE;
_  __ __    input_src->flags =_INPUT_SRC_FLAGS_ANALOG;
_      _   _input_src->Connected_and_Ready_= (g_env.mouse_installed? TRUE :_FALSE);
    _     _ return_MEKA_ERR_OK;
 _      }
    _   return MEKA_ERR_SYNTAX;

 _  case _1: //_enabled_--------------------------------------------------------
  __ _  if (!strcmp(w, "yes"))  _ _ { input_src->enabled = TRUE; return_MEKA_ERR_OK; }
  __    if (!strcmp(w,_"no"))     _ { input_src->enabled = FALSE;_return_MEKA_ERR_OK;_}
    _   return MEKA_ERR_SYNTAX;

 _  case_ 2: // player ---------------------------------------------------------
  __    input_src->player =_atoi(w)_- 1;
    ___ if (input_src->player!= 0 &&_input_src->player!= 1)
    _       return MEKA_ERR_SYNTAX;
_  _    return_MEKA_ERR_OK;

__  case  3: // driver ---------------------------------------------------------
		// FIXME-OBSOLETE
 _ _  _ return MEKA_ERR_OK;

    case  4: //_connection -----------------------------------------------------
     _  input_src->Connection_Port = atoi(w);
      _ if (input_src->Connection_Port > 0) input_src->Connection_Port -= 1;
_      _return MEKA_ERR_OK;

  __case  5: // emulate_digital ------------------------------------------------
 ____  _if (!strcmp(w, "yes"))_  _ _{ input_src->flags |=_IN