1 /***************************************************************************
5 * Purpose: Test functions in C for UFFI library
6 * Programer: Kevin M. Rosenberg
7 * Date Started: Mar 2002
9 * CVS Id: $Id: c-test-fns.c,v 1.3 2002/03/21 05:29:57 kevin Exp $
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)
40 /* Test of constant input string */
43 cs_count_upper (char* psz)
58 /* Test of input and output of a string */
61 cs_to_upper (char* psz)
65 *psz = toupper (*psz);
71 /* Test of an output only string */
74 cs_make_random (int size, char* buffer)
77 for (i = 0; i < size; i++)
78 buffer[i] = 'A' + (rand() % 26);