videoeditorengine/vedengine/videoprocessor/inc/epoclib.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 * Header file for epoclib.cpp.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef _EPOC_LIB
       
    22 #define _EPOC_LIB
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <s32file.h>
       
    26 #include "nrctyp32.h"
       
    27 
       
    28 #ifdef _DEBUG
       
    29 #define MALLOC_DEBUG
       
    30 #endif
       
    31 
       
    32 #define EPOCLIB_DS
       
    33 
       
    34 //#define FILE RFile
       
    35 #define void TAny
       
    36 
       
    37 //specific to this program
       
    38 //#define HANDLE void *
       
    39 
       
    40 #ifndef _SIZE_T_DEFINED
       
    41 typedef unsigned int	size_t;
       
    42 #endif //_SIZE_T_DEFINED
       
    43 
       
    44 #define max(a,b)            (((a) > (b)) ? (a) : (b))
       
    45 #define min(a,b)            (((a) < (b)) ? (a) : (b))
       
    46 
       
    47 #define abs     Abs
       
    48 #define labs    Abs
       
    49 
       
    50 
       
    51 EPOCLIB_DS void free(TAny *ptr);
       
    52 
       
    53 #ifdef MALLOC_DEBUG
       
    54 #define malloc(size) debugMalloc(size, __FILE__, __LINE__)
       
    55 EPOCLIB_DS TAny *debugMalloc(u_int32 size, char *file, int line);
       
    56 #else
       
    57 EPOCLIB_DS TAny *malloc(u_int32 size);
       
    58 #endif
       
    59 EPOCLIB_DS TAny *realloc(void *memblock, u_int32 size);
       
    60 #ifdef MALLOC_DEBUG
       
    61 #define calloc(num, size) debugCalloc(num, size, __FILE__, __LINE__)
       
    62 EPOCLIB_DS TAny *debugCalloc(u_int32 num, u_int32 size, char *file, int line);
       
    63 #else
       
    64 EPOCLIB_DS TAny *calloc(u_int32 num, u_int32 size);
       
    65 #endif
       
    66 EPOCLIB_DS TAny *memset(TAny *dest, TInt c, u_int32 size); 
       
    67 EPOCLIB_DS TAny *memcpy(TAny *dest, const TAny *src, u_int32 size);
       
    68 EPOCLIB_DS TAny *memmove(TAny *dest, const TAny *src, u_int32 count);
       
    69 
       
    70 #define assert(expr) __ASSERT_DEBUG(expr, User::Panic(_L("assert"), 1));
       
    71 EPOCLIB_DS int atoi(const char *nptr);
       
    72 
       
    73 
       
    74 EPOCLIB_DS u_int32 fwrite(const TAny *buffer, u_int32 size, u_int32 count, RFile stream);
       
    75 
       
    76 #endif
       
    77 
       
    78 
       
    79 
       
    80 // End of File