Exemplo n.º 1
0
void 
moveCursor(){
	if(currentProcessTTY == currentTTY)
	{
		_export(0x3D4, 0x0F);
		_export(0x3D5, (terminals[currentTTY].curpos/2) & 0xFF);
		_export(0x3D4, 0x0E);
		_export(0x3D5, ((terminals[currentTTY].curpos/2)>>8) & 0xFF);
	}
Exemplo n.º 2
0
   INT32 expRoutine::run()
   {
      INT32 rc = SDB_OK ;
      sdbConnectionHandle hConn = SDB_INVALID_HANDLE ;

      rc = _connectDB(hConn) ;
      if ( SDB_OK != rc )
      {
         cerr << "failed to connect to " << _options.hostName() << ":"
              << _options.svcName() << endl ;
         goto error ;
      }
      PD_LOG ( PDINFO, "Connect to %s:%s", 
               _options.hostName().c_str(), _options.svcName().c_str() );

      rc = _clSet.parse(hConn) ;
      if ( SDB_OK != rc )
      {
         PD_LOG ( PDERROR, "Failed to parse collection set, rc = %d", rc ) ;
         goto error ;
      }

      if ( _options.hasGenConf() )
      {
         rc = _options.writeToConf( _clSet ) ;
         if ( SDB_OK != rc )
         {
            cerr << "Failed to write configure-file" << endl ;
            PD_LOG ( PDERROR, "Failed to write configure-file, rc = %d", rc ) ;
            goto error ;
         }
         goto done ;
      }

      rc = _export( hConn ) ;
      if ( SDB_OK != rc )
      {
         PD_LOG ( PDERROR, "Failed to export collections, rc = %d", rc ) ;
         goto error ;
      }

   done :
      if ( SDB_INVALID_HANDLE != hConn )
      {
         sdbDisconnect (hConn) ;
         sdbReleaseConnection(hConn) ;
      }
      return rc ;
   error :
      goto done ;
   }
Exemplo n.º 3
0
bool ConvexShape::buildPolyList( PolyListContext context, AbstractPolyList *plist, const Box3F &box, const SphereF &sphere )
{
   if ( mGeometry.points.empty() )	
      return false;

   // If we're exporting deal with that first.
   if ( context == PLC_Export )
   {
      AssertFatal( dynamic_cast<OptimizedPolyList*>( plist ), "ConvexShape::buildPolyList - Bad polylist for export!" );
      _export( (OptimizedPolyList*)plist, box, sphere );
      return true;
   }

   plist->setTransform( &mObjToWorld, mObjScale );
   plist->setObject( this );


   // Add points...

   const Vector< Point3F > pointList = mGeometry.points;

   S32 base = plist->addPoint( pointList[0] );

   for ( S32 i = 1; i < pointList.size(); i++ )	
      plist->addPoint( pointList[i] );


   // Add Surfaces...

   const Vector< ConvexShape::Face > faceList = mGeometry.faces;

   for ( S32 i = 0; i < faceList.size(); i++ )
   {
      const ConvexShape::Face &face = faceList[i];		

      plist->begin( 0, i );

      plist->plane( PlaneF( face.centroid, face.normal ) );

      for ( S32 j = 0; j < face.triangles.size(); j++ )
      {
         plist->vertex( base + face.points[ face.triangles[j].p0 ] );
         plist->vertex( base + face.points[ face.triangles[j].p1 ] );
         plist->vertex( base + face.points[ face.triangles[j].p2 ] );
      }      

      plist->end();
   }

   return true;
}
Exemplo n.º 4
0
void
reboot(){
	_export( 0x64, 0xFE); /* pulse CPU reset line */
	return;
}