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

#include <stdio.h>
#include <os2.h>
#include "testdll6.h"

int _CRT_init (void);
void _CRT_term (void);
void __ctordtorInit (void);
void __ctordtorTerm (void);

unsigned long _DLL_InitTerm (unsigned long mod_handle, unsigned long flag)
{
  switch (flag)
    {
    case 0:
      DosBeep (400, 200);
      if (_CRT_init () != 0)
        return 0;
      __ctordtorInit ();
      return 1;
    case 1:
      DosBeep (1600, 200);
      __ctordtorTerm ();
      _CRT_term ();
      return 1;
    default:
      return 0;
    }
}

void say (const char *s)
{
  fputs (s, stdout);
}
