/* Copyright 1996 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*52 instructions*/

#include "colourtrans.h"
#include "font.h"
#include "os.h"
#include "pdriver.h"

os_error *x (int page, char *t)

{  bool more;
   os_box req;
   os_error *error = NULL;

   if ((error = xpdriver_draw_page (1, &req, page, NULL, &more,
         NULL)) != NULL)
      goto finish;

   while (more)
   {  if ((error = xcolourtrans_set_gcol (os_COLOUR_BLACK,
            colourtrans_SET_FG_GCOL, os_ACTION_OVERWRITE, NULL, NULL))
            != NULL)
         goto finish;

      if ((error = xfont_paint (0, t, NONE, 0, 0, NULL, NULL, 0))
            != NULL)
         goto finish;

      if ((error = xpdriver_get_rectangle (&req, &more, NULL)) !=
            NULL)
         goto finish;
   }

finish:
  return error;
}
