/** Find the residue and atom index of an atom in the supplied configuration. Prints error and returns FREESASA_FAIL if not found. */ static int find_atom(const struct classifier_config *config, const char *res_name, const char *atom_name, int* res, int* atom) { *atom = -1; *res = find_string(config->residue_name,res_name,config->n_residues); if (*res < 0) { find_any(config,atom_name,res,atom); } else { const struct classifier_residue *residue = config->residue[*res]; *atom = find_string(residue->atom_name,atom_name,residue->n_atoms); if (*atom < 0) { find_any(config,atom_name,res,atom); } } if (*atom < 0) { //return freesasa_warn("in %s(): Unknown residue '%s' and/or atom '%s'.", // __func__, res_name, atom_name); return FREESASA_WARN; } return FREESASA_SUCCESS; }
static int find_bind(int fd , struct sockaddr const *addr , socklen_t addrlen ) { anyfn_type *anyfn ; int tmp ; { { #line 61 anyfn = find_any("bind"); } #line 61 if (! anyfn) { #line 61 return (-1); } { #line 62 old_bind = (bindfn_type *)anyfn; #line 63 tmp = (*old_bind)(fd, addr, addrlen); } #line 63 return (tmp); } }