X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fuffi-c-test-lib.c;h=ee1ab3a3f6fd6ddd542c3b65a823223285dc2a54;hb=d4695a6e633b7982d567a62dd0b5939f53496af4;hp=c21a6e21376412b5ae28c8f8e73a25a95a215223;hpb=77fd04d570b9ae1fd40c1f7b0134af826576210b;p=uffi.git diff --git a/tests/uffi-c-test-lib.c b/tests/uffi-c-test-lib.c index c21a6e2..ee1ab3a 100644 --- a/tests/uffi-c-test-lib.c +++ b/tests/uffi-c-test-lib.c @@ -6,7 +6,7 @@ * Programer: Kevin M. Rosenberg * Date Started: Mar 2002 * - * CVS Id: $Id: uffi-c-test-lib.c,v 1.2 2003/08/14 19:35:05 kevin Exp $ + * CVS Id: $Id$ * * This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg * @@ -39,6 +39,15 @@ BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, #include +DLLEXPORT unsigned char uchar_13 = 13; +DLLEXPORT signed char schar_neg_120 = -120; +DLLEXPORT unsigned short uword_257 = 257; +DLLEXPORT signed short sword_neg_321 = -321; +DLLEXPORT unsigned int uint_1234567 = 1234567; +DLLEXPORT signed int sint_neg_123456 = -123456; +DLLEXPORT double double_3_1 = 3.1; +DLLEXPORT float float_neg_4_5 = -4.5; + /* Test of constant input string */ DLLEXPORT int @@ -109,3 +118,24 @@ cast_test_float () *y = 3.21; return y; } + +DLLEXPORT int fvar_addend = 3; + +typedef struct { + int i; + double d; +} fvar_struct_type; + +fvar_struct_type fvar_struct = {42, 3.2}; + +DLLEXPORT +int fvar_struct_int () { + return (fvar_addend + fvar_struct.i); +} + +DLLEXPORT +double fvar_struct_double () { + return fvar_struct.d; +} + +