CompuServe Thread

Forum unknown · C Chest

#AVL Tree

5 messages in this thread
#6400From: Bill HogsettSep 7, 1986 9:02 PM
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.
#6404From: Jeff BrentonSep 7, 1986 9:36 PM
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.
#6407From: Bill HogsettSep 8, 1986 5:25 AM
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).
#6407From: Bill HogsettSep 8, 1986 5:25 AM
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).
#6404From: Jeff BrentonSep 7, 1986 9:36 PM
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.