|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 1646 (0x66e) Types: TextFile Names: »ap_equ.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Lib/addr/ap_equ.c«
/* ap_equ: check to see if to strings represent same address */ # ifndef lint static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/addr/RCS/ap_equ.c,v 5.0 90/09/20 16:03:36 pp Exp Locker: pp $"; # endif /* * $Header: /cs/research/pp/hubris/pp-beta/Lib/addr/RCS/ap_equ.c,v 5.0 90/09/20 16:03:36 pp Exp Locker: pp $ * * $Log: ap_equ.c,v $ * Revision 5.0 90/09/20 16:03:36 pp * rcsforce : 5.0 public release * */ #include "util.h" #include "ap.h" #include "adr.h" #include "chan.h" extern char *loc_dom_site, *loc_dom_mta; extern char *ad_getlocal(); ap_equ (one, two) char *one, *two; { AP_ptr one_tree, two_tree, loc1, dom1, loc2, dom2; int equ = FALSE; one_tree = ap_s2t(one); one_tree = ap_normalize(one_tree, CH_UK_PREF); two_tree = ap_s2t(two); two_tree = ap_normalize(two_tree, CH_UK_PREF); (void) ap_t2p (one_tree, (AP_ptr *)0, (AP_ptr *)0, &loc1, &dom1, (AP_ptr *)0); (void) ap_t2p (two_tree, (AP_ptr *)0, (AP_ptr *)0, &loc2, &dom2, (AP_ptr *)0); if (dom1 && dom2 && lexequ(dom1->ap_obvalue, dom2->ap_obvalue) ==0) { /* same domains */ if (lexequ(dom1->ap_obvalue, loc_dom_site) == 0 || lexequ(dom1->ap_obvalue, loc_dom_mta) == 0) { /* local addresses */ char *oneloc, *twoloc; oneloc = ad_getlocal(one, AD_822_TYPE); twoloc = ad_getlocal(two, AD_822_TYPE); if (lexequ(oneloc, twoloc) == 0) equ = TRUE; free(oneloc); free(twoloc); } else if (loc1 && loc2 && lexequ(loc1->ap_obvalue, loc2->ap_obvalue) == 0) equ = TRUE; } ap_sqdelete(one_tree, NULLAP); ap_sqdelete(two_tree, NULLAP); return equ; }