/* sys/scrsize.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes */

#define INCL_VIO
#include <os2emx.h>
#include <os2thunk.h>
#include <emx/syscalls.h>

void __scrsize (int *dst)
{
  VIOMODEINFO vmi1, vmi2, *pvmi;

  /* At most one of vmi1, vmi2 crosses a 64Kbyte boundary.  Use one
     which doesn't. */

  pvmi = _THUNK_PTR_STRUCT_OK (&vmi1) ? &vmi1 : &vmi2;
  pvmi->cb = sizeof (*pvmi);
  VioGetMode (pvmi, 0);
  dst[0] = pvmi->col;
  dst[1] = pvmi->row;
}
