home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / graphics.17 / graphics / graphics-0.17 / plot2tek / linemod.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-12  |  1.7 KB  |  58 lines

  1. /* This file is the linemod routine, which is a standard part of the plot
  2.    library.  It sets the line type according to the name contained in
  3.    the string argument s */
  4.  
  5. #include "sys-defines.h"
  6. #include "libplot.h"
  7.  
  8. int
  9. linemod (s)
  10.      char *s;
  11. {
  12.   if (strcmp( s, "longdashed") == 0)
  13.     {
  14.       fputs ("\033d", stdout);
  15.     }
  16.   else if (strcmp( s, "disconnected") == 0)
  17.     {
  18.       fputs ("\034", stdout);
  19.     }
  20.   else if (strcmp( s, "dotdashed") == 0)
  21.     {
  22.       fputs ("\033b", stdout);
  23.     }
  24.   else if (strcmp( s, "dotted") == 0)
  25.     {
  26.       fputs ("\033a", stdout);
  27.    }
  28.   else if (strcmp( s, "solid") == 0)
  29.     {
  30.       fputs ("\033`", stdout);
  31.     }
  32.   else if (strcmp( s, "shortdashed") == 0)
  33.     {
  34.       fputs ("\033c", stdout);
  35.     }
  36.   else
  37.     {
  38.       fprintf( stderr, "Unrecognized line mode `%s' ignored.\n", s);          
  39.     }
  40.  
  41.   return 0;
  42. }
  43. /* libtek, a library of functions for tektronics 4010 compatible devices.
  44.    Copyright (C) 1989 Free Software Foundation, Inc.
  45.  
  46. libtek is distributed in the hope that it will be useful, but WITHOUT ANY
  47. WARRANTY.  No author or distributor accepts responsibility to anyone for the
  48. consequences of using it or for whether it serves any particular purpose or
  49. works at all, unless he says so in writing.  Refer to the GNU General Public
  50. License for full details.
  51.  
  52. Everyone is granted permission to copy, modify and redistribute libtek, but
  53. only under the conditions described in the GNU General Public License.  A copy
  54. of this license is supposed to have been given to you along with libtek so
  55. you can know your rights and responsibilities.  It should be in a file named
  56. COPYING.  Among other things, the copyright notice and this notice must be
  57. preserved on all copies.  */
  58.