-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patha_objc_add.c
37 lines (32 loc) · 999 Bytes
/
a_objc_add.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "gem_aesP.h"
/** establishes a child object's relationship to its parent.
*
* @param tree specifies the object tree to modify.
* @param parent specify the parent object.
* @param child specify the child object to update.
* @param global_aes global AES array
*
* @return 0 if an error occurred or non-zero otherwise.
*
* @since All AES versions.
*
* @sa mt_objc_order(), mt_objc_delete()
*
* In order for this function to work, the object to be added
* must be already be a member of the OBJECT array. This
* function simply updates the ob_next, ob_head, and ob_tail
* structure members of OBJECTs in the object tree. These
* fields should be initialized to #NIL (-1) in the child to be
* added.
*
*/
short
mt_objc_add(OBJECT *tree, short parent, short child, short *global_aes)
{
AES_PARAMS(40,2,1,1,0);
aes_intin[0] = parent;
aes_intin[1] = child;
aes_addrin[0] = (long)tree;
AES_TRAP(aes_params);
return aes_intout[0];
}