Changeset 2967 for trunk/kLdr/testcase/tst-3-imp-os2.def
- Timestamp:
- Feb 13, 2007, 11:28:46 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/testcase/tst-3-imp-os2.def
r2965 r2967 1 /* $Id$ */ 2 /**@file3 * 4 * kLdr - Dynamic Loader testcase no. 3, Driver.5 * 6 *Copyright (c) 2006 knut st. osmundsen <bird-kbuild-src@anduin.net>7 * 8 * 9 *This file is part of kLdr.10 * 11 *kLdr is free software; you can redistribute it and/or modify12 *it under the terms of the GNU General Public License as published by13 *the Free Software Foundation; either version 2 of the License, or14 *(at your option) any later version.15 * 16 *kLdr is distributed in the hope that it will be useful,17 *but WITHOUT ANY WARRANTY; without even the implied warranty of18 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19 *GNU General Public License for more details.20 * 21 *You should have received a copy of the GNU General Public License22 *along with kLdr; if not, write to the Free Software23 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA24 * 25 */ 1 ; $Id$ 2 ;; @file 3 ; 4 ; kLdr - Dynamic Loader testcase no. 3, Fake module import library - OS/2. 5 ; 6 ; Copyright (c) 2006 knut st. osmundsen <bird-kbuild-src@anduin.net> 7 ; 8 ; 9 ; This file is part of kLdr. 10 ; 11 ; kLdr is free software; you can redistribute it and/or modify 12 ; it under the terms of the GNU General Public License as published by 13 ; the Free Software Foundation; either version 2 of the License, or 14 ; (at your option) any later version. 15 ; 16 ; kLdr is distributed in the hope that it will be useful, 17 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 18 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 ; GNU General Public License for more details. 20 ; 21 ; You should have received a copy of the GNU General Public License 22 ; along with kLdr; if not, write to the Free Software 23 ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 ; 25 ; 26 26 27 LIBRARY tst-3-imp 28 EXPORTS 29 _Tst3Ext 27 30 28 #include "tst.h"29 30 31 int g_i1 = 1;32 int g_i2 = 2;33 int *g_pi1 = &g_i1;34 35 int Tst3Sub(int);36 int (*g_pfnTst3Sub)(int) = &Tst3Sub;37 38 char g_achBss[256];39 40 41 MY_EXPORT(int) Tst3(int iFortyTwo)42 {43 int rc;44 45 if (iFortyTwo != 42)46 return 0;47 if (g_i1 != 1)48 return 1;49 if (g_i2 != 2)50 return 2;51 if (g_pi1 != &g_i1)52 return 3;53 if (g_pfnTst3Sub != &Tst3Sub)54 return 4;55 rc = Tst3Sub(iFortyTwo);56 if (rc != g_pfnTst3Sub(iFortyTwo))57 return 5;58 for (rc = 0; rc < sizeof(g_achBss); rc++)59 if (g_achBss[rc])60 return 6;61 if (g_achBss[0] || g_achBss[1] || g_achBss[255])62 return 7;63 64 return 42;65 }66 67 68 int Tst3Sub(int iFortyTwo)69 {70 return iFortyTwo * 11;71 }72
Note:
See TracChangeset
for help on using the changeset viewer.