bfckr.c
/**
 * @brief       Initialize a brainfuck object by setting all values to zero
 * @type        static
 * @param[in]   Pointer to a bf_code_t type
 * @return      void
 **/
@brief       Initialize a brainfuck object by setting all values to zero
@type        static
@param[in]   Pointer to a bf_code_t type
@return      void
@brief Initialize a brainfuck object by setting all values to zero @type static @param [ in ] Pointer to a bf_code_t type @return void
static void init_bf_object(bf_code_t *bf)
{
    bf->mp = 0; 
    bf->ip = 0; 
    bf->debug = false; 
    for(size_t i = 0; i < MEMORY_SIZE; i++) {
        bf->memory[i] = 0;
    }
    for(size_t i = 0; i < MAX_INPUT_SIZE; i++) {
        bf->code[i] = 0;
    }
    for(size_t i = 0; i < MEMORY_SIZE; i++) {
        output_buffer[i] = 0;
    }
}
static void init_bf_object ( bf_code_t * bf ) { bf -> mp = 0 ; bf -> ip = 0 ; bf -> debug = false ; for ( size_t i = 0 ; i < MEMORY_SIZE ; i ++ ) { bf -> memory [ i ] = 0 ; } for ( size_t i = 0 ; i < MAX_INPUT_SIZE ; i ++ ) { bf -> code [ i ] = 0 ; } for ( size_t i = 0 ; i < MEMORY_SIZE ; i ++ ) { output_buffer [ i ] = 0 ; } }
@brief       Initialize a brainfuck object by setting all values to zero
 @type        static
 @param[in]   Pointer to a bf_code_t type
 @return      void
@brief Initialize a brainfuck object by setting all values to zero @type static @param [ in ] Pointer to a bf_code_t type @return void
// set data pointer to zero // set instruction pointer to zero // reset the debug flag