Driver.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.Polydots = NULL;
  31. drv.Polyline = PS_Polyline;
  32. drv.Polygon = PS_Polygon;
  33. drv.Set_window = PS_Set_window;
  34. drv.Begin_scaled_raster = PS_begin_scaled_raster;
  35. drv.Scaled_raster = PS_scaled_raster;
  36. drv.End_scaled_raster = PS_end_scaled_raster;
  37. drv.Respond = PS_Respond;
  38. drv.lookup_color = PS_lookup_color;
  39. drv.color = PS_color;
  40. drv.draw_line = PS_draw_line;
  41. drv.draw_point = PS_draw_point;
  42. drv.draw_bitmap = PS_draw_bitmap;
  43. drv.draw_text = NULL;
  44. initialized = 1;
  45. return &drv;
  46. }