int pv_reinit_buffer(void) { if(_pv_print_buffer_size==_pv_print_buffer_size_active && _pv_print_buffer_slots==_pv_print_buffer_slots_active) return 0; pv_destroy_buffer(); return pv_init_buffer(); }
int pv_reinit_buffer(void) { if(_pv_print_buffer_size==PV_DEFAULT_PRINT_BUFFER_SIZE && _pv_print_buffer_slots==PV_DEFAULT_PRINT_BUFFER_SLOTS) return 0; pv_destroy_buffer(); return pv_init_buffer(); }
/** init pv api (optional). * @return 0 on success, -1 on error */ int pv_init_api(void) { pv_init_table(); tr_init_table(); if(pv_init_buffer()<0) return -1; if(register_pvars_mod("core", _core_pvs)<0) return -1; return 0; }
/** init pv api (optional). * @return 0 on success, -1 on error */ int pv_init_api(void) { pv_init_table(); tr_init_table(); if(pv_init_buffer()<0) return -1; pv_str_empty_buf[0] = '\0'; pv_str_empty_buf[1] = '\0'; pv_str_empty.s = pv_str_empty_buf; strcpy(pv_str_null_buf, "<null>"); pv_str_null.s = pv_str_null_buf; if(register_pvars_mod("core", _core_pvs)<0) return -1; return 0; }