Driver.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /****************************************************************************
  2. *
  3. * MODULE: PS driver
  4. * AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
  5. * COPYRIGHT: (C) 2007 Glynn Clements
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. *****************************************************************************/
  18. #include "psdriver.h"
  19. const struct driver *PS_Driver(void)
  20. {
  21. static struct driver drv;
  22. static int initialized;
  23. if (initialized)
  24. return &drv;
  25. drv.Box = PS_Box;
  26. drv.Erase = PS_Erase;
  27. drv.Graph_set = PS_Graph_set;
  28. drv.Graph_close = PS_Graph_close;
  29. drv.Line_width = PS_Line_width;
  30. drv.Set_window = PS_Set_window;
  31. drv.Begin_raster = PS_begin_raster;
  32. drv.Raster = PS_raster;
  33. drv.End_raster = PS_end_raster;
  34. drv.Begin = PS_Begin;
  35. drv.Move = PS_Move;
  36. drv.Cont = PS_Cont;
  37. drv.Close = PS_Close;
  38. drv.Stroke = PS_Stroke;
  39. drv.Fill = PS_Fill;
  40. drv.Point = PS_Point;
  41. drv.Color = PS_Color;
  42. drv.Bitmap = PS_Bitmap;
  43. drv.Text = NULL;
  44. drv.Text_box = NULL;
  45. drv.Set_font = NULL;
  46. drv.Font_list = NULL;
  47. drv.Font_info = NULL;
  48. initialized = 1;
  49. return &drv;
  50. }