Esempio n. 1
0
void EarlyEOF( void )
/**************************/
{
    CurrMod->f.source->file->flags |= INSTAT_IOERR;
    Locator( CurrMod->f.source->file->name, NULL, 0 );
    LnkMsg( ERR+MSG_EARLY_EOF, NULL );
}
Esempio n. 2
0
static void BadLibrary( file_list *list )
/***************************************/
{
    list->file->flags |= INSTAT_IOERR;
    _LnkFree( list->u.dict );
    list->u.dict = NULL;
    Locator( list->file->name, NULL, 0 );
    LnkMsg( ERR+MSG_LIB_FILE_ATTR, NULL );
}
Esempio n. 3
0
Soprano::Error::Locator Soprano::Error::ParserError::locator() const
{
    if ( isParserError() ) {
        return static_cast<const ParserErrorData*>( d.constData() )->locator;
    }
    else {
        return Locator();
    }
}
Esempio n. 4
0
static void LocateFile( unsigned num )
/************************************/
{
    unsigned    rec;

    if( num & LOC ) {
        if( num & (LOC_REC & ~LOC) ) {
            rec = RecNum;
        } else {
            rec = 0;
        }
        if( CurrMod == NULL ) {
            if( CmdFile == NULL ) {
                Locator( NULL, NULL, 0 );
            } else {
                Locator( CmdFile->name, NULL, 0 );
            }
         } else {
            Locator( CurrMod->f.source->file->name, CurrMod->name, rec );
        }
    }
}
Esempio n. 5
0
static bool ReadARDict( file_list *list, unsigned long *loc, bool makedict )
/**************************************************************************/
{
    ar_header       *ar_hdr;
    unsigned long   size;
    int             numdicts;

    numdicts = 0;
    if( makedict ) {
        if( list->u.dict == NULL ) {
            _ChkAlloc( list->u.dict, sizeof( dict_entry ) );
        }
    }
    for( ;; ) {
        ar_hdr = CacheRead( list, *loc, sizeof( ar_header ) );
        size = GetARValue( ar_hdr->size, AR_SIZE_LEN );
        if( ar_hdr->name[0] == '/' && ar_hdr->name[1] == ' ' ) {
            ++numdicts;
            *loc += sizeof( ar_header );
            if( makedict )
                ReadARDictData( list, loc, size, numdicts );
            *loc += MAKE_EVEN( size );
        } else if( ar_hdr->name[0] == '/' && ar_hdr->name[1] == '/' ) {
            *loc += sizeof( ar_header );
            ReadARStringTable( list, loc, size );
            *loc += MAKE_EVEN( size );
        } else {
            break;         // found an actual object file
        }
    }
    if( makedict ) {
        if( numdicts == 0 ) {
            Locator( list->file->name, NULL, 0 );
            LnkMsg( ERR+MSG_NO_DICT_FOUND, NULL );
            _LnkFree( list->u.dict );
            list->u.dict = NULL;
            return( FALSE );
        }
        if( !(LinkFlags & CASE_FLAG) || numdicts == 1 ) {
            SortARDict( &list->u.dict->a );
        }
    }
    return( TRUE );
}
Esempio n. 6
0
// Window dimensions
const GLuint WIDTH = 800, HEIGHT = 600;

// Camera
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
bool keys[1024];
GLfloat lastX = 400, lastY = 300;
bool firstMouse = true;

GLfloat deltaTime = 0.0f;	// Time between current frame and last frame
GLfloat lastFrame = 0.0f;  	// Time of last frame

glm::vec3 inputPos = glm::vec3(0.0f, 0.0f, 0.0f);
GLfloat inputSpeed = 0.01f;

Locator loc = Locator();

// The MAIN function, from here we start the application and run the game loop
int main()
{

	
	

	// Init GLFW
	glfwInit();
	// Set all the required options for GLFW
	glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
	glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
	glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
	glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
Esempio n. 7
0
 ParserErrorData( const Locator& loc = Locator(), const QString& message = QString(), int code = ErrorNone )
     : ErrorData( message, code ),
       locator( loc ) {
 }