home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emx / test / testdll1.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  660 b   |  46 lines

  1. /* testdll1.c (emx+gcc) */
  2.  
  3. #include <os2.h>
  4.  
  5. unsigned long _DLL_InitTerm (unsigned long mod_handle, unsigned long flag)
  6. {
  7.   switch (flag)
  8.     {
  9.     case 0:
  10.       DosBeep (400, 200);
  11.       return (1);
  12.     case 1:
  13.       DosBeep (1600, 200);
  14.       return (1);
  15.     default:
  16.       DosBeep (6400, 1000);
  17.       return (0);
  18.     }
  19. }
  20.  
  21.  
  22. void say (const char *txt)
  23. {
  24.   ULONG len, written;
  25.   
  26.   len = 0;
  27.   while (txt[len] != 0)
  28.     ++len;
  29.   DosWrite (1, txt, len, &written);
  30. }
  31.  
  32.  
  33. int main (void)
  34. {
  35.   say ("Here's emxdll1.\r\n");
  36.   return (1);
  37. }
  38.  
  39.  
  40. void hello (const char *txt)
  41. {
  42.   say ("hello ");
  43.   say (txt);
  44.   say ("!\r\n");
  45. }
  46.