1 /***************************************************************************
5 * Purpose: Test functions in C for UFFI library
6 * Programer: Kevin M. Rosenberg
7 * Date Started: Mar 2002
11 * This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg
13 * These variables are correct for GCC
14 * you'll need to modify these for other compilers
15 ***************************************************************************/
17 #if defined(WIN32)||defined(WIN64)
20 BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll,
27 #define DLLEXPORT __declspec(dllexport)
38 /* Test of constant input string */
41 cs_count_upper (char* psz)
56 /* Test of input and output of a string */
59 cs_to_upper (char* psz)
63 *psz = toupper (*psz);
69 /* Test of an output only string */
72 cs_make_random (int size, char* buffer)
75 for (i = 0; i < size; i++)
76 buffer[i] = 'A' + (rand() % 26);
80 /* Test of input/output vector */
83 half_double_vector (int size, double* vec)
86 for (i = 0; i < size; i++)