⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 structcpy.c

📁 c++写的一个脚本解释器
💻 C
字号:
/* copy structs *//* * Copyright 1995-1999 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. */#if defined(__STDC__) || defined(__GNUC__) || defined(__cplusplus)void __structcpy (void* dest, void* src, unsigned long size, unsigned long alignment)#elsevoid __structcpy(dest,src,size,alignment)  void* dest;  void* src;  unsigned long size;  unsigned long alignment;#endif{  if (alignment % sizeof(long))    { char* d = (char*)dest;      char* s = (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;      long* s = (long*)src;      do { *d++ = *s++; } while ((size -= sizeof(long)) > 0);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -