char *old_spec_id, new_file, new_spec_id, my_application_name;
Tt_status tterr;
new_spec_id = tt_spec_move(old_spec_id, new_file);
tterr = tt_ptr_error(new_spec_id);
switch (tterr) {
case TT_OK:
/*
* Replace old_spec_id with new_spec_id in my internal
* data structures.
*/
update_my_spec_ids(old_spec_id, new_spec_id);
break;
case TT_WRN_SAME_OBJID:
/*
* The spec must have stayed in the same filesystem,
* since ToolTalk is reusing the spec id. Do nothing.
*/
break;
case TT_ERR_FILE:
case TT_ERR_ACCESS:
default:
fprintf(stderr, “%s: %s\n”, my_application_name,
tt_status_message(tterr));
break;
}
|