1 /***************************************************************************
5 * Purpose: Test functions in C for UFFI library
6 * Programer: Kevin M. Rosenberg
7 * Date Started: Mar 2002
9 * This file, part of UFFI, is Copyright (c) 2002-2010 by Kevin M. Rosenberg
11 * These variables are correct for GCC
12 * you'll need to modify these for other compilers
13 ***************************************************************************/
15 #if defined(WIN32)||defined(WIN64)
18 BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll,
25 #define DLLEXPORT __declspec(dllexport)
36 /* Test of constant input string */
39 cs_count_upper (char* psz)
54 /* Test of input and output of a string */
57 cs_to_upper (char* psz)
61 *psz = toupper (*psz);
67 /* Test of an output only string */
70 cs_make_random (int size, char* buffer)
73 for (i = 0; i < size; i++)
74 buffer[i] = 'A' + (rand() % 26);
78 /* Test of input/output vector */
81 half_double_vector (int size, double* vec)
84 for (i = 0; i < size; i++)