Esempio n. 1
0
/*------------------------------------------------------Routine::unsetTrapper-+
|                                                                             |
+----------------------------------------------------------------------------*/
void Routine::unsetTrapper(RexxString const & key, bool isSignalStmt)
{
   unsigned short & condSide = isSignalStmt? m_signals : m_callons;

   switch (key.charAt(0)) {
   case 'E':
      condSide &= ~SIG_ERROR;
      break;
   case 'F':
      condSide &= ~SIG_FAILURE;
      break;
   case 'H':
      condSide &= ~SIG_HALT;
      break;
   case 'L':
      condSide &= ~SIG_LOSTDIGITS;
      break;
   case 'N':
      if (key.charAt(2)=='V') {
         condSide &= ~SIG_NOVALUE;
      }else {
         condSide &= ~SIG_NOTREADY;
      }
      break;
   case 'S':
      condSide &= ~SIG_SYNTAX;
      break;
   }
}
Esempio n. 2
0
/*--------------------------------------------------------Routine::setTrapper-+
|                                                                             |
+----------------------------------------------------------------------------*/
void Routine::setTrapper(
   RexxString const & key, RexxString & strName, bool isSignalStmt
) {
   Signaled sig;

   switch (key.charAt(0)) {
   case 'E':
      sig = SIG_ERROR;
      m_strError = strName;
      break;
   case 'F':
      sig = SIG_FAILURE;
      m_strFailure = strName;
      break;
   case 'H':
      sig = SIG_HALT;
      m_strHalt = strName;
      break;
   case 'L':
      sig = SIG_LOSTDIGITS;
      m_strLostDigits = strName;
      break;
   case 'N':
      if (key.charAt(2)=='V') {
         sig = SIG_NOVALUE;
         m_strNoValue = strName;
      } else {
         sig = SIG_NOTREADY;
         m_strNotReady = strName;
      }
      break;
   case 'S':
      sig = SIG_SYNTAX;
      m_strSyntax = strName;
      break;
   }
   if (isSignalStmt) {
      m_signals |= sig;
      m_callons &= ~sig;
   }else {
      m_callons |= sig;
      m_signals &= ~sig;
   }
}