/*****************************************************************************/ /* */ /* UNIT: corresponds (Utility interface level library routine) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 07 SEP 94 Version 1.0 */ /* */ /* Function: */ /* */ /* Procedure interfaces user programs with the "ntl" library utilities; */ /* determines new offset (relative to the new origin) of a position, given */ /* by some origin and offset with respect to it, using the alignment file, */ /* if the two given origins correspond to different species; fixes the path */ /* name for file names needed by lower-level library routines; returns NULL */ /* if there were no errors (and the list of corresponding offsets have been */ /* found), or string containing an error message otherwise */ /* */ /*****************************************************************************/ #include #include #include "ntl4.h" #include "globin/globin_parm.h" /* standard reference files */ /*****************************************************************************/ /* */ /* Definitions section */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* Unit constants */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Code section */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* PROCEDURE: corresponds */ /* */ /* Central procedure for the unit; returns NULL if the alternative offset */ /* has been found and returned, diagnostic string otherwise */ char *corresponds (char *reference, long int offset, char *new_origin, appint_ptr *result) { errind exec_status; char *error_report; if ((exec_status = NTL3_Corresponds (reference, offset, new_origin, globin_filename ("Origins"), globin_filename ("Default_Alignment"), result)) == NULL) return NULL; else { error_report = exec_status -> message; exec_status -> message = NULL; free (exec_status); return error_report; } }