/usr/include/flext/flutil.cpp is in pd-flext-dev 0.6.0+git20161101.1.01318a94-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | /*
flext - C++ layer for Max and Pure Data externals
Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
/*! \file flutil.cpp
\brief Implementation of the various utility functions.
*/
#ifndef __FLEXT_UTIL_CPP
#define __FLEXT_UTIL_CPP
#include "flext.h"
#include <cstring>
#if FLEXT_OS == FLEXT_OS_WIN
#include <windows.h>
#elif FLEXT_OS == FLEXT_OS_MAC
#if FLEXT_OSAPI != FLEXT_OSAPI_MAC_MACH
#include <MacMemory.h>
#else
#include <Carbon/Carbon.h>
#endif
#endif
#include "flpushns.h"
FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::CopyMem(void *dst,const void *src,int bytes)
{
#if FLEXT_OS == FLEXT_OS_WIN
MoveMemory(dst,src,bytes);
#elif FLEXT_OS == FLEXT_OS_MAC && !defined(__LP64__)
BlockMoveData(src,dst,bytes); // not available for 64 bits
#else
memmove(dst,src,bytes);
#endif
}
FLEXT_TEMPIMPL(void FLEXT_CLASSDEF(flext))::ZeroMem(void *dst,int bytes)
{
#if FLEXT_OS == FLEXT_OS_WIN
ZeroMemory(dst,bytes);
#elif FLEXT_OS == FLEXT_OS_MAC
# ifdef __LP64__ // 64 bits compilation
bzero(dst,bytes);
# else
BlockZero(dst,bytes);
# endif
#else
memset(dst,0,bytes);
#endif
}
#include "flpopns.h"
#endif // __FLEXT_UTIL_CPP
|