Artifact e15e74bd38bcc3f4e90f9431158adcef6285b1ab:
- File ffcall/avcall/structcpy.c — part of check-in [c83183fa27] at 2013-05-11 07:09:05 on branch trunk — Updated ffcall src. Removed canvas-draw (can use direct from site now?) (user: matt, size: 815) [annotate] [blame] [check-ins using] [more...]
- File ffcall/callback/vacall_r/structcpy.c — part of check-in [c83183fa27] at 2013-05-11 07:09:05 on branch trunk — Updated ffcall src. Removed canvas-draw (can use direct from site now?) (user: matt, size: 815) [annotate] [blame] [check-ins using]
- File ffcall/vacall/structcpy.c — part of check-in [c83183fa27] at 2013-05-11 07:09:05 on branch trunk — Updated ffcall src. Removed canvas-draw (can use direct from site now?) (user: matt, size: 815) [annotate] [blame] [check-ins using]
/* copy structs */ /* * Copyright 1995-1999, 2005 Bruno Haible, <bruno@clisp.org> * * This is free software distributed under the GNU General Public Licence * described in the file COPYING. Contact the author if you don't have this * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied, * on this software. */ void __structcpy (void* dest, const void* src, unsigned long size, unsigned long alignment) { if (alignment % sizeof(long)) { char* d = (char*)dest; const char* s = (const char*)src; do { *d++ = *s++; } while (--size > 0); } else /* If the alignment is a multiple of sizeof(long), the size is as well. */ { long* d = (long*)dest; const long* s = (const long*)src; do { *d++ = *s++; } while ((size -= sizeof(long)) > 0); } }