home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / graphics-0.17 / plot2ps / line.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  1.2 KB  |  35 lines

  1. /* plot2ps, a utility for converting Unix plot files into postscript.
  2.    Copyright (C) 1989 Free Software Foundation, Inc.
  3.  
  4. Plot2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  5. WARRANTY.  No author or distributor accepts responsibility to anyone for the
  6. consequences of using it or for whether it serves any particular purpose or
  7. works at all, unless he says so in writing.  Refer to the GNU General Public
  8. License for full details.
  9.  
  10. Everyone is granted permission to copy, modify and redistribute plot2ps, but
  11. only under the conditions described in the GNU General Public License.  A copy
  12. of this license is supposed to have been given to you along with plot2ps so
  13. you can know your rights and responsibilities.  It should be in a file named
  14. COPYING.  Among other things, the copyright notice and this notice must be
  15. preserved on all copies.  */
  16.  
  17. /* This file is the line routine, which is a standard part of the plot
  18.    library.  It draws a line from coordinate x0,y0 to x1,y1 */
  19.  
  20. #include "sys-defines.h"
  21. #include "libplot.h"
  22.  
  23. int
  24. line (x0, y0, x1, y1)
  25.      int x0, y0, x1, y1;
  26. {
  27.   draw_line ();
  28. #ifdef DEBUG
  29.   printf ("%% line: %d %d %d %d\n", x0, y0, x1, y1);
  30. #endif
  31.   move (x0,y0);
  32.   cont (x1,y1);
  33.   return 0;
  34. }
  35.