All pastes #388025 Raw Edit

II

public c v1 · immutable
·published 2007-03-09 19:59 UTC
rendered paste body
int export_PherMap( brEval args[], brEval *result, void *instance ) {    char* filename = BRSTRING( &args[0] );    FILE* OUTFH;        if ( ( OUTFH = fopen( filename, "w" ) ) == NULL ) {        //slMessage( DEBUG_ALL, "Could NOT open file 'myPheromoneColormap-plugin.dll_debug-output.txt'!\n" );        fprintf( stderr, "Could NOT open file 'myPheromoneColormap-plugin.dll_debug-output.txt'!\n" );        return EC_ERROR;	}      for( y = 0; y < PHERMAP_HEIGHT; y++ ) {        I = y * PHERMAP_ROW_WIDTH;        i = PHERMAP_ROW_WIDTH - 1;        for( x = 0; x < i; x+=4 ) {             fprintf( OUTFH, "%d ", PHERMAP [ I + x ] );        }        fprintf( OUTFH, "%d\n", PHERMAP [ I + PHERMAP_ROW_WIDTH ] );    }		fflush( OUTFH );	fclose( OUTFH );	    // DEBUG( fprintf( DBGFH, "testPherMap: vector = (%d, %d, %d)!\n", x, y, pherStr ); )    DEBUG( fflush( DBGFH ); )    return EC_OK;}