driver.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.name = "ps";
  26. drv.Box = PS_Box;
  27. drv.Erase = PS_Erase;
  28. drv.Graph_set = PS_Graph_set;
  29. drv.Graph_close = PS_Graph_close;
  30. drv.Graph_get_file = PS_Graph_get_file;
  31. drv.Line_width = PS_Line_width;
  32. drv.Set_window = PS_Set_window;
  33. drv.Begin_raster = PS_begin_raster;
  34. drv.Raster = PS_raster;
  35. drv.End_raster = PS_end_raster;
  36. drv.Begin = PS_Begin;
  37. drv.Move = PS_Move;
  38. drv.Cont = PS_Cont;
  39. drv.Close = PS_Close;
  40. drv.Stroke = PS_Stroke;
  41. drv.Fill = PS_Fill;
  42. drv.Point = PS_Point;
  43. drv.Color = PS_Color;
  44. drv.Bitmap = PS_Bitmap;
  45. drv.Text = NULL;
  46. drv.Text_box = NULL;
  47. drv.Set_font = NULL;
  48. drv.Font_list = NULL;
  49. drv.Font_info = NULL;
  50. initialized = 1;
  51. return &drv;
  52. }