Forum unknown
· C Chest
#AVL Tree
5 messages in this thread
Thanks, the Lattice compiler for the Amiga has a movmem command but it seems to
reverse the source and destination order. I have been using it but it always
deletes the left most node when I try to delete a node with two leaves or
branches. I am going to reverse the order of the calls in the code and see if
that works.
you could try it as a macro, you know:
#define memcpy(d,s,n) movmem(s,d,n)
that way, you don't have to change the actual code. i use this strategy in a
text editor i'm working on, for the one module that contains compiler-dependent
calls. i have a compiler.h file that converts macros like MOVE(d,s,n) to
whatever the particular compiler has, or defines it as a function if the
compiler DOESN'T have it.
Thanks, I am new enough to C that I didn't think (know) of that approach.
Everything works fine when I change memcpy(d,s,n) to movmem(s,d,n).
Thanks, I am new enough to C that I didn't think (know) of that approach.
Everything works fine when I change memcpy(d,s,n) to movmem(s,d,n).
you could try it as a macro, you know:
#define memcpy(d,s,n) movmem(s,d,n)
that way, you don't have to change the actual code. i use this strategy in a
text editor i'm working on, for the one module that contains compiler-dependent
calls. i have a compiler.h file that converts macros like MOVE(d,s,n) to
whatever the particular compiler has, or defines it as a function if the
compiler DOESN'T have it.