All pastes #388039 Raw Edit

III

public c v1 · immutable
·published 2007-03-09 20:10 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;	}      I = PHERMAP_ROW_WIDTH * PHERMAP_HEIGHT;    for( i = 0; i < I; i+=4 ) {        fprintf( OUTFH, "%d ", PHERMAP [ i ] );        if ( (i % PHERMAP_ROW_WIDTH) == 0 ) fprintf( OUTFH, "\n" );    }		fclose( OUTFH );	    // DEBUG( fprintf( DBGFH, "testPherMap: vector = (%d, %d, %d)!\n", x, y, pherStr ); )    DEBUG( fflush( DBGFH ); )    return EC_OK;}