/* testdll1.c (emx+gcc) */

#include <os2.h>

unsigned long _DLL_InitTerm (unsigned long mod_handle, unsigned long flag)
{
  switch (flag)
    {
    case 0:
      DosBeep (400, 200);
      return 1;
    case 1:
      DosBeep (1600, 200);
      return 1;
    default:
      DosBeep (6400, 1000);
      return 0;
    }
}


void say (const char *txt)
{
  ULONG len, written;
  
  len = 0;
  while (txt[len] != 0)
    ++len;
  DosWrite (1, txt, len, &written);
}


void hello (const char *txt)
{
  say ("hello ");
  say (txt);
  say ("!\r\n");
}
