file: New ef_typedstr_eq(), factored out of obj_changed()
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
e70d8f07f9
commit
7d3a3df283
3 changed files with 19 additions and 14 deletions
|
@ -29,7 +29,7 @@
|
|||
* Known contributors to this file:
|
||||
* Dave Pare, 1989
|
||||
* Steve McClure, 2000
|
||||
* Markus Armbruster, 2005-2013
|
||||
* Markus Armbruster, 2005-2014
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -600,6 +600,19 @@ ef_set_uid(int type, void *buf, int uid)
|
|||
elt->seqno = get_seqno(ep, uid);
|
||||
}
|
||||
|
||||
/*
|
||||
* Are *A and *B equal, except for timestamps and such?
|
||||
*/
|
||||
int
|
||||
ef_typedstr_eq(struct ef_typedstr *a, struct ef_typedstr *b)
|
||||
{
|
||||
return a->ef_type == b->ef_type
|
||||
&& a->seqno == b->seqno
|
||||
&& a->uid == b->uid
|
||||
&& !memcmp((char *)a + sizeof(*a), (char *)b + sizeof(*a),
|
||||
empfile[a->ef_type].size - sizeof(*a));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return sequence number of element ID in table EP.
|
||||
* Return zero if table is not EFF_TYPED (it has no sequence number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue