/*****************************************************************************
**                               **
**    Einfache Routine zur Vergroesserung des CLI Windows auf die maximale  **
**    Groesse im PAL Bildschirm.                            **
**                               **
**                        P  A  L    W  i  n  d  o  w                       **
**                                    **
** 1987 by Holger Banko, Ligusterstr. 4, 4570 Quakenbrueck, Tel.:05431/4803 **
**                                    **
*****************************************************************************/

#include"intuition/intuition.h"
struct Window *ActCliWind;
struct IntuitionBase *IntuitionBase;

main()
{
   SHORT x, y;

   if(!(IntuitionBase= OpenLibrary("intuition.library",0))) {
   printf("Kann 'intuition.library' nicht oeffnen\n");
   exit(FALSE);
   }

   ActCliWind=IntuitionBase->ActiveWindow;

   if(ActCliWind != NULL) {

      x=-ActCliWind->LeftEdge;      /* Entfernung vom Linken Rand -     */
      y=-ActCliWind->TopEdge;       /* Entfernung von Oben -            */
      MoveWindow(ActCliWind,x,y);   /* Um -x und -y Window zurueckbewegen */

      /* Breite vom Screen von der Breite des Windows abziehen */
      x=IntuitionBase->ActiveScreen->Width-ActCliWind->Width;  

      /* Hoehe vom Screen von der Hoehe des Windows abziehen */
      y=IntuitionBase->ActiveScreen->Height-ActCliWind->Height;

      SizeWindow(ActCliWind,x,y);  /* Window um x und y vergroessern */

      CloseLibrary(IntuitionBase);
   } 
   else
   {
      CloseLibrary(IntuitionBase);
      exit(FALSE);
   }
}
