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 by Kevin M. Rosenberg
13 * UFFI users are granted the rights to distribute and use this software
14 * as governed by the terms of the Lisp Lesser GNU Public License
15 * (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 * These variables are correct for GCC
18 * you'll need to modify these for other compilers
19 ***************************************************************************/
24 BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll,
31 #define DLLEXPORT __declspec(dllexport)
42 /* Test of constant input string */
45 cs_count_upper (char* psz)
60 /* Test of input and output of a string */
63 cs_to_upper (char* psz)
67 *psz = toupper (*psz);
73 /* Test of an output only string */
76 cs_make_random (int size, char* buffer)
79 for (i = 0; i < size; i++)
80 buffer[i] = 'A' + (rand() % 26);
84 /* Test of input/output vector */
87 half_double_vector (int size, double* vec)
90 for (i = 0; i < size; i++)