コード例 #1
0
ファイル: techinfo.c プロジェクト: ABratovic/open-watcom-v2
void machine_type( int print )
/****************************/
{
    int manuf, plevel, buswidth, ndptype, ndp;

    techoutput( "\n------------------------------------------------------\n");
    manuf = 0;
    buswidth = 0;
    plevel = PType();
    if( plevel < 2 ) buswidth = PBus();
    if( plevel < 1 ) manuf = PPrefix();
    ndptype = NDPType();
    if( (plevel ==  4) && (ndptype == 3) ) ndptype = 4;
    if( (plevel ==  5) && (ndptype == 3) ) ndptype = 5;
    if( (plevel ==  6) && (ndptype == 3) ) ndptype = 6;
    if( (plevel ==  7) && (ndptype == 3) ) ndptype = 7;
    techoutput( "An %s processor is installed in this system.\n",
                ProcessorType[manuf][plevel][buswidth] );

#ifdef __OS2__
    DosDevConfig( &ndp, 3, 0 );
    if( ndp != 0 ) ndp = 1;
#else
    ndp = NDPEquip();
#endif
    techoutput( "%s math coprocessor (NDP) is present\n",
                CoProcessorType[ ndptype ] );
    techoutput( "\tand Equipment Flags say math coprocessor %s present.\n",
                IsNotIs[ ndp ] );
#ifdef __OS2__
    techoutput( "Skipping math coprocessor interrupt check since this is not DOS.\n" );
    print = print; /* stop the warning message */
#else
    if( ndptype != 0 ) {
        LineCount++;
        techoutput( "The next test may cause the system to hang if math\n"
                "\tcoprocessor (NDP) interrupts are not handled properly.\n" );
        techoutput( "%s (NDP) interrupts are %s.\n",
                    CoProcessorType[ ndptype ],
                    monint( print ) ?
                        "properly enabled" :
                        "not enabled (math exceptions will not be detected!)"
                  );
    } else {
        techoutput( "Skipping math coprocessor interrupt check.\n" );
    }
#endif
}
コード例 #2
0
ファイル: parser_base.C プロジェクト: tradowsk/antioch
  ParsingType ParserBase<NumericType>::enum_type() const
  {
    ParsingType PType(ASCII);
    if(_type == "ascii")
      {
        PType = ASCII;
      }
    else if(_type == "ChemKin")
      {
        PType = CHEMKIN;
      }
    else if(_type == "XML")
      {
        PType = XML;
      }
    else
      {
        antioch_parsing_error(std::string("unknown parser type!!! " + _type));
      }

    return PType;
  }