home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / plot / plot2ps.sha / linemod.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-28  |  1.3 KB  |  51 lines

  1. /*
  2.     This file is part of plot2ps.
  3.  
  4.     Copyright (C) 1989 Rene' Seindal
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 1, or (at your option)
  9.     any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.     My current address is: seindal@diku.dk
  21. */
  22.  
  23. #include "defs.h"
  24.  
  25. struct linemod {
  26.     char *name;
  27.     char *pat;
  28. } linemods[] = {
  29.     { "solid", "[] 0" },
  30.     { "dotted", "[1 2] 0" },
  31.     { "longdashed",  "[9 2] 0" },
  32.     { "shortdashed", "[4.5 2] 0" },
  33.     { "dotdashed" , "[9 2 1 2] 0" },
  34.     { 0 , 0 },
  35. };
  36.  
  37. linemod(s)
  38.     char *s;
  39. {
  40.     struct linemod *lm;
  41.  
  42.     for ( lm = linemods; lm->name && strcmp( lm->name, s ); lm++ )
  43.     ;
  44.     if ( lm->name == 0 )
  45.     lm = linemods;
  46.  
  47.     clear();
  48.     printf( "%s setdash\n", lm->pat );
  49. }
  50.  
  51.