r5546: *** empty log message ***
[uffi.git] / tests / uffi-c-test-lib.c
index c21a6e21376412b5ae28c8f8e73a25a95a215223..26884c638a6e20033ab37ec96adf27d5357afe03 100644 (file)
@@ -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: uffi-c-test-lib.c,v 1.4 2003/08/15 02:34:34 kevin Exp $
  *
  * This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
  *
@@ -39,6 +39,15 @@ BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll,
 #include <math.h>
 
 
+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;
+}
+
+