Beispiel #1
0
void
        loginproced(char ch, char *defname)
{

  if (ch == 10)
    ch = 13;

#ifdef CONTROL_KEY
  if ((ch == 4 || ch == ((char) ('d' + 96)) || ch == ((char) ('D' + 96))) && state == ST_GETNAME && *tempname == '\0')
#else
  if (ch == 4 && state == ST_GETNAME && *tempname == '\0')
#endif

    {

#ifdef AUTOKEY
      if (autoKey)
  W_AutoRepeatOn();
#endif

      terminate(0);
    }
  if (ch < 32 && ch != 21 && ch != 13 && ch != 8)
    return;
  switch (state)
    {
    case ST_GETNAME:
      if (ch == 13)
  {
    if (*tempname == '\0')
      {
        STRNCPY(tempname, defname, sizeof(tempname));
      }
    loaddude();
    displayStartup(defname);
  }
      else
  {
    adjustString(ch, tempname, defname);
  }
      break;
    case ST_GETPASS:
      if (ch == 13)
  {
    checkpassword();
    displayStartup(defname);
  }
      else
  {
    adjustString(ch, password1, defname);
  }
      break;
    case ST_MAKEPASS1:
      if (ch == 13)
  {
    state = ST_MAKEPASS2;
    displayStartup(defname);
  }
      else
  {
    adjustString(ch, password1, defname);
  }
      break;
    case ST_MAKEPASS2:
      if (ch == 13)
  {
    makeNewGuy();
    displayStartup(defname);
  }
      else
  {
    adjustString(ch, password2, defname);
  }
      break;
    }

  return;

}
Beispiel #2
0
 CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity )
 :   m_caseSensitivity( caseSensitivity ),
     m_str( adjustString( str ) )
 {}