a->bi_func_id = i;
read_activ(activation * a, int which_vector){    DB_Version version;    Var *old_rt_env;    const char **old_names;    int old_size, stack_in_use;    unsigned i;    const char *func_name;    int max_stack;    char c;    if (dbio_input_version < DBV_Float)	version = dbio_input_version;    else if (dbio_scanf("language version %u\n", &version) != 1) {	errlog("READ_ACTIV: Malformed language version\n");	return 0;    } else if (!check_version(version)) {	errlog("READ_ACTIV: Unrecognized language version: %d\n",	       version);	return 0;    }    if (!(a->prog = dbio_read_program(version,				      0, (void *) "suspended task"))) {	errlog("READ_ACTIV: Malformed program\n");	return 0;    }    if (!read_rt_env(&old_names, &old_rt_env, &old_size)) {	errlog("READ_ACTIV: Malformed runtime environment\n");	return 0;    }    a->rt_env = reorder_rt_env(old_rt_env, old_names, old_size, a->prog);    max_stack = (which_vector == MAIN_VECTOR		 ? a->prog->main_vector.max_stack		 : a->prog->fork_vectors[which_vector].max_stack);    alloc_rt_stack(a, max_stack);    if (dbio_scanf("%d rt_stack slots in use\n", &stack_in_use) != 1) {	errlog("READ_ACTIV: Bad stack_in_use number\n");	return 0;    }    a->top_rt_stack = a->base_rt_stack;    for (i = 0; i < stack_in_use; i++)	*(a->top_rt_stack++) = dbio_read_var();    if (!read_activ_as_pi(a)) {	errlog("READ_ACTIV: Bad activ.\n", stack_in_use);	return 0;    }    a->temp = dbio_read_var();    if (dbio_scanf("%u %u%c", &a->pc, &i, &c) != 3) {	errlog("READ_ACTIV: bad pc, next. stack_in_use = %d\n", stack_in_use);	return 0;    }    a->bi_func_pc = i;    if (c == '\n')	a->error_pc = a->pc;    else if (dbio_scanf("%u\n", &a->error_pc) != 1) {	errlog("READ_ACTIV: no error pc.\n");	return 0;    }    if (!check_pc_validity(a->prog, which_vector, a->pc)) {	errlog("READ_ACTIV: Bad PC for suspended task.\n");	return 0;    }    if (a->bi_func_pc != 0) {	func_name = dbio_read_string();	a->bi_func_id = number_func_by_name(func_name);	if (a->bi_func_id == FUNC_NOT_FOUND) {	    errlog("READ_ACTIV: Unknown built-in function `%s'\n", func_name);	    return 0;	}	if (!read_bi_func_data(a->bi_func_id, &a->bi_func_data,			       &a->bi_func_pc)) {	    errlog("READ_ACTIV: Bad saved state for built-in function `%s'\n",		   func_name);	    return 0;	}    }    return 1;}