head	2.3;
access;
symbols;
locks; strict;
comment	@ * @;


2.3
date	2000.05.10.04.44.05;	author mcalabre;	state Exp;
branches;
next	2.2;

2.2
date	99.06.16.00.07.23;	author mcalabre;	state Exp;
branches;
next	2.1;

2.1
date	98.02.25.07.05.50;	author mcalabre;	state Exp;
branches;
next	2.0;

2.0
date	95.09.12.06.23.56;	author mcalabre;	state Exp;
branches;
next	1.2;

1.2
date	95.09.12.06.22.33;	author mcalabre;	state Exp;
branches;
next	1.1;

1.1
date	95.01.31.03.13.15;	author mcalabre;	state Exp;
branches;
next	;


desc
@C interfaces to FORTRAN PGPLOT routines used by the WCSLIB test programs.
@


2.3
log
@Updated date in copyright notice.
@
text
@/*============================================================================
*
*   WCSLIB - an implementation of the FITS WCS proposal.
*   Copyright (C) 1995-2000, Mark Calabretta
*
*   This library is free software; you can redistribute it and/or modify it
*   under the terms of the GNU Library General Public License as published
*   by the Free Software Foundation; either version 2 of the License, or (at
*   your option) any later version.
*
*   This library is distributed in the hope that it will be useful, but
*   WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
*   General Public License for more details.
*
*   You should have received a copy of the GNU Library General Public License
*   along with this library; if not, write to the Free Software Foundation,
*   Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*   Correspondence concerning WCSLIB may be directed to:
*      Internet email: mcalabre@@atnf.csiro.au
*      Postal address: Dr. Mark Calabretta,
*                      Australia Telescope National Facility,
*                      P.O. Box 76,
*                      Epping, NSW, 2121,
*                      AUSTRALIA
*
*=============================================================================
*
* C interfaces to FORTRAN PGPLOT routines used by the WCSLIB test programs.
* These are provided to allow call-by-value semantics particularly in relation
* to the use of constant arguments.
*
* $Id: tpgc.c,v 2.2 1999/06/16 00:07:23 mcalabre Exp mcalabre $
*---------------------------------------------------------------------------*/

void pgbeg (unit, file, nxsub, nysub)

char  file[80];
int   nxsub, nysub, unit;

{
   register int j;

   for (j = 0; j < 80; j++) {
      if (file[j] == '\0') {
         for (; j < 80; file[j++] = ' ');
      }
   }

   pgbeg2_(&unit, file, &nxsub, &nysub);
}

/*--------------------------------------------------------------------------*/

void pgend ()

{
   pgend_();
}

/*--------------------------------------------------------------------------*/

void pgenv (dxmin, dxmax, dymin, dymax, just, axis)

int axis, just;
double dxmax, dxmin, dymax, dymin;

{
   float  fxmax, fxmin, fymax, fymin;

   fxmax = (float)dxmax;
   fxmin = (float)dxmin;
   fymax = (float)dymax;
   fymin = (float)dymin;
   pgenv_(&fxmin, &fxmax, &fymin, &fymax, &just, &axis);
}

/*--------------------------------------------------------------------------*/

void pgline (n, xpts, ypts)

int n;
float xpts[], ypts[];

{
   pgline_(&n, xpts, ypts);
}

/*--------------------------------------------------------------------------*/

void pgpage ()

{
   pgpage_();
}

/*--------------------------------------------------------------------------*/

void pgpt (n, xpts, ypts, symbol)

int n;
float xpts[], ypts[];
int symbol;

{
   pgpt_(&n, xpts, ypts, &symbol);
}

/*--------------------------------------------------------------------------*/

void pgsci (ci)

int ci;

{
   pgsci_(&ci);
}

/*--------------------------------------------------------------------------*/

void pgscr (ci, dcr, dcg, dcb)

int    ci;
double dcr, dcg, dcb;

{
   float  fcr, fcg, fcb;

   fcr = (float)dcr;
   fcg = (float)dcg;
   fcb = (float)dcb;
   pgscr_(&ci, &fcr, &fcg, &fcb);
}

/*--------------------------------------------------------------------------*/

void pgsls (ls)

int ls;

{
   pgsls_(&ls);
}

/*--------------------------------------------------------------------------*/

void pgslw (lw)

int lw;

{
   pgslw_(&lw);
}

/*--------------------------------------------------------------------------*/

void pgtext (dx, dy, text)

char text[80];
double dx, dy;

{
   register int j;
   float  fx, fy;

   fx = (float)dx;
   fy = (float)dy;

   for (j = 0; j < 80; j++) {
      if (text[j] == '\0') {
         for (; j < 80; text[j++] = ' ');
      }
   }

   pgtxt2_(&fx, &fy, text);
}
@


2.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-1999, Mark Calabretta
d34 1
a34 1
* $Id: tpgc.c,v 2.1 1998/02/25 07:05:50 mcalabre Exp mcalabre $
@


2.1
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-1998, Mark Calabretta
d34 1
a34 1
* $Id: tpgc.c,v 2.0 1995/09/12 06:23:56 mcalabre Exp mcalabre $
@


2.0
log
@WCSLIB 2.0
@
text
@d4 1
a4 1
*   Copyright (C) 1995, Mark Calabretta
d34 1
a34 1
* $Id: tpgc.c,v 1.2 1995/09/12 06:22:33 mcalabre Exp mcalabre $
@


1.2
log
@Added wrappers for PGPAGE, PGPT, PGSLS, and PGSLW.
@
text
@d34 1
a34 1
* $Id: tpgc.c,v 1.1 1995/01/31 03:13:15 mcalabre Exp mcalabre $
@


1.1
log
@Initial revision
@
text
@d34 1
a34 1
* $Id$
d56 1
a56 4
void pgscr (ci, dcr, dcg, dcb)

int    ci;
double dcr, dcg, dcb;
d59 1
a59 6
   float  fcr, fcg, fcb;

   fcr = (float)dcr;
   fcg = (float)dcg;
   fcb = (float)dcb;
   pgscr_(&ci, &fcr, &fcg, &fcb);
d81 10
a90 1
void pgtext (dx, dy, text)
d92 1
a92 2
char text[80];
double dx, dy;
d95 4
a98 2
   register int j;
   float  fx, fy;
d100 1
a100 2
   fx = (float)dx;
   fy = (float)dy;
d102 3
a104 5
   for (j = 0; j < 80; j++) {
      if (text[j] == '\0') {
         for (; j < 80; text[j++] = ' ');
      }
   }
d106 2
a107 1
   pgtxt2_(&fx, &fy, text);
d122 27
a148 1
void pgline (n, xpts, ypts)
d150 1
a150 2
int n;
float xpts[], ypts[];
d153 1
a153 1
   pgline_(&n, xpts, ypts);
d158 4
a161 1
void pgend ()
d164 13
a176 1
   pgend_();
@
