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


8.7
date	2026.05.11.12.01.10;	author mcalabre;	state Exp;
branches;
next	8.6;

8.6
date	2026.03.29.13.53.56;	author mcalabre;	state Exp;
branches
	8.6.1.1;
next	8.5;

8.5
date	2025.12.06.13.47.41;	author mcalabre;	state Exp;
branches
	8.5.1.1;
next	8.4;

8.4
date	2024.10.28.13.56.17;	author mcalabre;	state Exp;
branches
	8.4.1.1;
next	8.3;

8.3
date	2024.05.13.16.33.01;	author mcalabre;	state Exp;
branches
	8.3.1.1;
next	8.2;

8.2
date	2023.11.16.10.00.30;	author mcalabre;	state Exp;
branches
	8.2.1.1;
next	8.1;

8.1
date	2023.07.05.17.12.07;	author mcalabre;	state Exp;
branches
	8.1.1.1;
next	8.0;

8.0
date	2023.07.01.06.15.05;	author mcalabre;	state Exp;
branches
	8.0.1.1;
next	7.13;

7.13
date	2022.10.07.03.43.35;	author mcalabre;	state Exp;
branches
	7.13.1.1;
next	7.12;

7.12
date	2022.09.09.04.57.58;	author mcalabre;	state Exp;
branches
	7.12.1.1;
next	7.11;

7.11
date	2022.04.26.06.13.52;	author mcalabre;	state Exp;
branches
	7.11.1.1;
next	7.10;

7.10
date	2022.04.23.14.25.15;	author mcalabre;	state Exp;
branches
	7.10.1.1;
next	7.9;

7.9
date	2022.03.25.15.14.49;	author mcalabre;	state Exp;
branches
	7.9.1.1;
next	7.8;

7.8
date	2022.03.25.06.11.49;	author mcalabre;	state Exp;
branches
	7.8.1.1;
next	7.7;

7.7
date	2021.07.12.06.36.49;	author mcalabre;	state Exp;
branches
	7.7.1.1;
next	7.6;

7.6
date	2021.04.13.12.57.01;	author mcalabre;	state Exp;
branches
	7.6.1.1;
next	7.5;

7.5
date	2021.03.20.05.54.58;	author mcalabre;	state Exp;
branches
	7.5.1.1;
next	7.4;

7.4
date	2021.01.31.02.24.52;	author mcalabre;	state Exp;
branches
	7.4.1.1;
next	7.3;

7.3
date	2020.06.03.03.37.03;	author mcalabre;	state Exp;
branches
	7.3.1.1;
next	7.2;

7.2
date	2020.03.09.07.31.23;	author mcalabre;	state Exp;
branches
	7.2.1.1;
next	7.1;

7.1
date	2019.12.31.13.25.19;	author mcalabre;	state Exp;
branches
	7.1.1.1;
next	6.4;

6.4
date	2019.08.15.09.30.18;	author mcalabre;	state Exp;
branches
	6.4.1.1;
next	6.3;

6.3
date	2019.07.12.07.33.39;	author mcalabre;	state Exp;
branches
	6.3.1.1;
next	6.2;

6.2
date	2018.10.20.10.03.14;	author mcalabre;	state Exp;
branches
	6.2.1.1;
next	6.1;

6.1
date	2018.10.19.08.35.17;	author mcalabre;	state Exp;
branches
	6.1.1.1;
next	5.20;

5.20
date	2018.10.05.05.32.41;	author mcalabre;	state Exp;
branches
	5.20.1.1;
next	5.19;

5.19
date	2018.07.26.15.37.05;	author mcalabre;	state Exp;
branches
	5.19.1.1;
next	5.18;

5.18
date	2018.01.10.08.32.14;	author mcalabre;	state Exp;
branches
	5.18.1.1;
next	5.17;

5.17
date	2017.09.18.08.44.24;	author mcalabre;	state Exp;
branches
	5.17.1.1;
next	5.16;

5.16
date	2017.01.15.04.25.02;	author mcalabre;	state Exp;
branches
	5.16.1.1;
next	5.15;

5.15
date	2016.04.05.12.55.12;	author mcalabre;	state Exp;
branches
	5.15.1.1;
next	5.14;

5.14
date	2016.02.07.10.49.32;	author mcalabre;	state Exp;
branches
	5.14.1.1;
next	5.13;

5.13
date	2016.01.26.08.51.15;	author mcalabre;	state Exp;
branches
	5.13.1.1;
next	5.12;

5.12
date	2015.11.15.02.13.02;	author mcalabre;	state Exp;
branches
	5.12.1.1;
next	5.11;

5.11
date	2015.10.18.09.13.07;	author mcalabre;	state Exp;
branches
	5.11.1.1;
next	5.10;

5.10
date	2015.10.09.08.19.17;	author mcalabre;	state Exp;
branches
	5.10.1.1;
next	5.9;

5.9
date	2015.07.21.09.20.03;	author mcalabre;	state Exp;
branches
	5.9.1.1;
next	5.8;

5.8
date	2015.07.08.11.04.01;	author mcalabre;	state Exp;
branches
	5.8.1.1;
next	5.7;

5.7
date	2015.06.29.02.44.17;	author mcalabre;	state Exp;
branches
	5.7.1.1;
next	5.6;

5.6
date	2015.06.14.07.11.25;	author mcalabre;	state Exp;
branches
	5.6.1.1;
next	5.5;

5.5
date	2015.05.05.13.16.33;	author mcalabre;	state Exp;
branches
	5.5.1.1;
next	5.4;

5.4
date	2015.04.21.14.41.07;	author mcalabre;	state Exp;
branches
	5.4.1.1;
next	5.3;

5.3
date	2015.04.21.02.50.53;	author mcalabre;	state Exp;
branches
	5.3.1.1;
next	5.2;

5.2
date	2015.04.15.12.35.08;	author mcalabre;	state Exp;
branches
	5.2.1.1;
next	5.1;

5.1
date	2015.04.07.10.56.38;	author mcalabre;	state Exp;
branches
	5.1.1.1;
next	5.0;

5.0
date	2015.04.05.12.25.02;	author mcalabre;	state Exp;
branches
	5.0.1.1;
next	4.25;

4.25
date	2014.12.14.14.29.37;	author mcalabre;	state Exp;
branches
	4.25.1.1;
next	4.24;

4.24
date	2014.09.18.15.25.01;	author mcalabre;	state Exp;
branches
	4.24.1.1;
next	4.23;

4.23
date	2014.05.13.05.50.52;	author mcalabre;	state Exp;
branches
	4.23.1.1;
next	4.22;

4.22
date	2014.04.12.15.03.53;	author mcalabre;	state Exp;
branches
	4.22.1.1;
next	4.21;

4.21
date	2014.03.24.05.12.28;	author mcalabre;	state Exp;
branches
	4.21.1.1;
next	4.20;

4.20
date	2013.12.18.05.42.50;	author mcalabre;	state Exp;
branches
	4.20.1.1;
next	4.19;

4.19
date	2013.09.29.14.17.53;	author mcalabre;	state Exp;
branches
	4.19.1.1;
next	4.18;

4.18
date	2013.07.13.10.00.05;	author mcalabre;	state Exp;
branches
	4.18.1.1;
next	4.17;

4.17
date	2013.01.29.05.29.21;	author cal103;	state Exp;
branches
	4.17.1.1;
next	4.16;

4.16
date	2012.11.07.04.42.45;	author cal103;	state Exp;
branches
	4.16.1.1;
next	4.15;

4.15
date	2012.09.26.14.26.06;	author cal103;	state Exp;
branches
	4.15.1.1;
next	4.14;

4.14
date	2012.07.13.10.02.35;	author cal103;	state Exp;
branches
	4.14.1.1;
next	4.13;

4.13
date	2012.03.14.07.39.31;	author cal103;	state Exp;
branches
	4.13.1.1;
next	4.12;

4.12
date	2012.02.29.07.57.57;	author cal103;	state Exp;
branches
	4.12.1.1;
next	4.11;

4.11
date	2012.02.20.23.30.02;	author cal103;	state Exp;
branches
	4.11.1.1;
next	4.10;

4.10
date	2012.02.05.23.41.44;	author cal103;	state Exp;
branches
	4.10.1.1;
next	4.9;

4.9
date	2012.01.24.05.40.29;	author cal103;	state Exp;
branches
	4.9.1.1;
next	4.8;

4.8
date	2011.08.15.08.05.54;	author cal103;	state Exp;
branches
	4.8.1.1;
next	4.7;

4.7
date	2011.02.07.07.03.42;	author cal103;	state Exp;
branches
	4.7.1.1;
next	4.6;

4.6
date	2010.11.16.06.15.32;	author cal103;	state Exp;
branches
	4.6.1.1;
next	4.5;

4.5
date	2010.07.16.07.01.26;	author cal103;	state Exp;
branches
	4.5.1.1;
next	4.4;

4.4
date	2009.08.06.07.51.45;	author cal103;	state Exp;
branches
	4.4.1.1;
next	4.3;

4.3
date	2007.12.27.05.48.07;	author cal103;	state Exp;
branches
	4.3.1.1;
next	4.2;

4.2
date	2005.09.21.13.25.32;	author cal103;	state Exp;
branches
	4.2.1.1;
next	4.1;

4.1
date	2005.08.27.01.31.38;	author cal103;	state Exp;
branches;
next	4.0;

4.0
date	2005.02.04.12.37.24;	author cal103;	state Exp;
branches;
next	3.6;

3.6
date	2004.08.24.08.31.49;	author cal103;	state Exp;
branches;
next	3.5;

3.5
date	2004.06.28.05.01.04;	author mcalabre;	state Exp;
branches;
next	3.4;

3.4
date	2004.02.11.00.01.47;	author mcalabre;	state Exp;
branches;
next	3.3;

3.3
date	2003.10.21.08.44.04;	author mcalabre;	state Exp;
branches;
next	3.2;

3.2
date	2003.09.09.03.56.19;	author mcalabre;	state Exp;
branches;
next	3.1;

3.1
date	2003.04.28.04.37.01;	author mcalabre;	state Exp;
branches;
next	3.0;

3.0
date	2003.04.01.05.19.47;	author mcalabre;	state Exp;
branches;
next	;

4.2.1.1
date	2005.12.05.01.43.47;	author cal103;	state Exp;
branches;
next	4.2.1.2;

4.2.1.2
date	2007.07.09.08.48.47;	author cal103;	state Exp;
branches;
next	4.2.1.3;

4.2.1.3
date	2007.07.12.01.41.04;	author cal103;	state Exp;
branches;
next	4.2.1.4;

4.2.1.4
date	2007.08.08.04.41.08;	author cal103;	state Exp;
branches;
next	4.2.1.5;

4.2.1.5
date	2007.12.03.05.36.01;	author cal103;	state Exp;
branches;
next	;

4.3.1.1
date	2007.12.27.13.25.03;	author cal103;	state Exp;
branches;
next	4.3.1.2;

4.3.1.2
date	2009.07.22.07.18.23;	author cal103;	state Exp;
branches;
next	;

4.4.1.1
date	2009.08.10.08.54.51;	author cal103;	state Exp;
branches;
next	4.4.1.2;

4.4.1.2
date	2010.01.19.03.44.35;	author cal103;	state Exp;
branches;
next	4.4.1.3;

4.4.1.3
date	2010.07.07.07.02.50;	author cal103;	state Exp;
branches;
next	;

4.5.1.1
date	2010.07.16.07.05.32;	author cal103;	state Exp;
branches;
next	4.5.1.2;

4.5.1.2
date	2010.11.15.07.19.41;	author cal103;	state Exp;
branches;
next	;

4.6.1.1
date	2010.11.16.06.16.19;	author cal103;	state Exp;
branches;
next	4.6.1.2;

4.6.1.2
date	2011.01.14.06.34.01;	author cal103;	state Exp;
branches;
next	;

4.7.1.1
date	2011.02.07.07.04.23;	author cal103;	state Exp;
branches;
next	4.7.1.2;

4.7.1.2
date	2011.08.09.03.00.46;	author cal103;	state Exp;
branches;
next	4.7.1.3;

4.7.1.3
date	2011.08.12.08.38.32;	author cal103;	state Exp;
branches;
next	4.7.1.4;

4.7.1.4
date	2011.08.13.03.14.11;	author cal103;	state Exp;
branches;
next	;

4.8.1.1
date	2011.08.15.08.07.07;	author cal103;	state Exp;
branches;
next	4.8.1.2;

4.8.1.2
date	2012.01.24.05.23.50;	author cal103;	state Exp;
branches;
next	;

4.9.1.1
date	2012.01.24.05.41.46;	author cal103;	state Exp;
branches;
next	;

4.10.1.1
date	2012.02.05.23.42.47;	author cal103;	state Exp;
branches;
next	4.10.1.2;

4.10.1.2
date	2012.02.20.23.23.24;	author cal103;	state Exp;
branches;
next	;

4.11.1.1
date	2012.02.20.23.31.14;	author cal103;	state Exp;
branches;
next	;

4.12.1.1
date	2012.02.29.07.59.11;	author cal103;	state Exp;
branches;
next	;

4.13.1.1
date	2012.03.14.07.40.38;	author cal103;	state Exp;
branches;
next	4.13.1.2;

4.13.1.2
date	2012.07.13.03.40.02;	author cal103;	state Exp;
branches;
next	;

4.14.1.1
date	2012.07.13.10.04.54;	author cal103;	state Exp;
branches;
next	;

4.15.1.1
date	2012.09.26.14.27.52;	author cal103;	state Exp;
branches;
next	;

4.16.1.1
date	2012.11.07.04.45.57;	author cal103;	state Exp;
branches;
next	4.16.1.2;

4.16.1.2
date	2013.01.29.05.10.59;	author cal103;	state Exp;
branches;
next	;

4.17.1.1
date	2013.01.29.05.32.33;	author cal103;	state Exp;
branches;
next	;

4.18.1.1
date	2013.07.13.10.02.39;	author mcalabre;	state Exp;
branches;
next	;

4.19.1.1
date	2013.09.29.14.20.40;	author mcalabre;	state Exp;
branches;
next	;

4.20.1.1
date	2013.12.18.05.46.56;	author mcalabre;	state Exp;
branches;
next	4.20.1.2;

4.20.1.2
date	2014.03.21.06.39.02;	author mcalabre;	state Exp;
branches;
next	;

4.21.1.1
date	2014.03.24.05.15.30;	author mcalabre;	state Exp;
branches;
next	;

4.22.1.1
date	2014.04.12.15.06.33;	author mcalabre;	state Exp;
branches;
next	;

4.23.1.1
date	2014.05.13.05.53.51;	author mcalabre;	state Exp;
branches;
next	;

4.24.1.1
date	2014.09.18.15.28.11;	author mcalabre;	state Exp;
branches;
next	;

4.25.1.1
date	2014.12.14.14.32.47;	author mcalabre;	state Exp;
branches;
next	4.25.1.2;

4.25.1.2
date	2015.01.06.01.02.17;	author mcalabre;	state Exp;
branches;
next	4.25.1.3;

4.25.1.3
date	2015.04.05.06.51.36;	author mcalabre;	state Exp;
branches;
next	;

5.0.1.1
date	2015.04.05.12.28.03;	author mcalabre;	state Exp;
branches;
next	;

5.1.1.1
date	2015.04.07.11.01.12;	author mcalabre;	state Exp;
branches;
next	5.1.1.2;

5.1.1.2
date	2015.04.13.11.39.28;	author mcalabre;	state Exp;
branches;
next	;

5.2.1.1
date	2015.04.15.12.39.17;	author mcalabre;	state Exp;
branches;
next	;

5.3.1.1
date	2015.04.21.02.54.04;	author mcalabre;	state Exp;
branches;
next	;

5.4.1.1
date	2015.04.21.14.44.30;	author mcalabre;	state Exp;
branches;
next	;

5.5.1.1
date	2015.05.05.13.21.03;	author mcalabre;	state Exp;
branches;
next	;

5.6.1.1
date	2015.06.14.07.14.47;	author mcalabre;	state Exp;
branches;
next	;

5.7.1.1
date	2015.06.29.02.47.26;	author mcalabre;	state Exp;
branches;
next	;

5.8.1.1
date	2015.07.08.11.07.21;	author mcalabre;	state Exp;
branches;
next	;

5.9.1.1
date	2015.07.21.09.28.10;	author mcalabre;	state Exp;
branches;
next	;

5.10.1.1
date	2015.10.09.08.22.38;	author mcalabre;	state Exp;
branches;
next	;

5.11.1.1
date	2015.10.18.09.16.29;	author mcalabre;	state Exp;
branches;
next	;

5.12.1.1
date	2015.11.15.02.16.17;	author mcalabre;	state Exp;
branches;
next	5.12.1.2;

5.12.1.2
date	2016.01.25.05.21.06;	author mcalabre;	state Exp;
branches;
next	;

5.13.1.1
date	2016.01.26.08.54.35;	author mcalabre;	state Exp;
branches;
next	;

5.14.1.1
date	2016.02.07.10.52.47;	author mcalabre;	state Exp;
branches;
next	;

5.15.1.1
date	2016.04.05.12.58.37;	author mcalabre;	state Exp;
branches;
next	5.15.1.2;

5.15.1.2
date	2017.01.15.04.08.22;	author mcalabre;	state Exp;
branches;
next	;

5.16.1.1
date	2017.01.15.04.29.02;	author mcalabre;	state Exp;
branches;
next	5.16.1.2;

5.16.1.2
date	2017.09.13.00.26.00;	author mcalabre;	state Exp;
branches;
next	;

5.17.1.1
date	2017.09.18.08.46.00;	author mcalabre;	state Exp;
branches;
next	5.17.1.2;

5.17.1.2
date	2018.01.10.08.26.33;	author mcalabre;	state Exp;
branches;
next	;

5.18.1.1
date	2018.01.10.08.33.04;	author mcalabre;	state Exp;
branches;
next	;

5.19.1.1
date	2018.07.26.15.41.42;	author mcalabre;	state Exp;
branches;
next	;

5.20.1.1
date	2018.10.05.05.33.33;	author mcalabre;	state Exp;
branches;
next	5.20.1.2;

5.20.1.2
date	2018.10.19.04.27.49;	author mcalabre;	state Exp;
branches;
next	;

6.1.1.1
date	2018.10.19.08.36.15;	author mcalabre;	state Exp;
branches;
next	;

6.2.1.1
date	2018.10.20.10.04.15;	author mcalabre;	state Exp;
branches;
next	6.2.1.2;

6.2.1.2
date	2019.05.10.02.05.36;	author mcalabre;	state Exp;
branches;
next	;

6.3.1.1
date	2019.07.12.07.34.37;	author mcalabre;	state Exp;
branches;
next	;

6.4.1.1
date	2019.08.15.09.31.29;	author mcalabre;	state Exp;
branches;
next	6.4.1.2;

6.4.1.2
date	2019.12.14.02.39.00;	author mcalabre;	state Exp;
branches;
next	6.4.1.3;

6.4.1.3
date	2019.12.31.03.28.57;	author mcalabre;	state Exp;
branches;
next	;

7.1.1.1
date	2019.12.31.13.28.19;	author mcalabre;	state Exp;
branches;
next	;

7.2.1.1
date	2020.03.09.07.34.50;	author mcalabre;	state Exp;
branches;
next	;

7.3.1.1
date	2020.06.03.03.38.11;	author mcalabre;	state Exp;
branches;
next	7.3.1.2;

7.3.1.2
date	2020.08.17.11.21.34;	author mcalabre;	state Exp;
branches;
next	7.3.1.3;

7.3.1.3
date	2021.01.19.14.10.41;	author mcalabre;	state Exp;
branches;
next	7.3.1.4;

7.3.1.4
date	2021.01.28.12.31.46;	author mcalabre;	state Exp;
branches;
next	;

7.4.1.1
date	2021.01.31.02.26.24;	author mcalabre;	state Exp;
branches;
next	7.4.1.2;

7.4.1.2
date	2021.02.22.07.38.08;	author mcalabre;	state Exp;
branches;
next	;

7.5.1.1
date	2021.03.20.05.56.42;	author mcalabre;	state Exp;
branches;
next	7.5.1.2;

7.5.1.2
date	2021.04.13.08.45.58;	author mcalabre;	state Exp;
branches;
next	;

7.6.1.1
date	2021.04.13.13.00.36;	author mcalabre;	state Exp;
branches;
next	;

7.7.1.1
date	2021.07.12.06.38.28;	author mcalabre;	state Exp;
branches;
next	7.7.1.2;

7.7.1.2
date	2022.03.25.06.06.00;	author mcalabre;	state Exp;
branches;
next	;

7.8.1.1
date	2022.03.25.06.14.15;	author mcalabre;	state Exp;
branches;
next	;

7.9.1.1
date	2022.03.25.15.16.40;	author mcalabre;	state Exp;
branches;
next	;

7.10.1.1
date	2022.04.23.14.26.54;	author mcalabre;	state Exp;
branches;
next	;

7.11.1.1
date	2022.04.26.06.15.32;	author mcalabre;	state Exp;
branches;
next	;

7.12.1.1
date	2022.09.09.05.00.36;	author mcalabre;	state Exp;
branches;
next	;

7.13.1.1
date	2022.10.07.03.45.47;	author mcalabre;	state Exp;
branches;
next	7.13.1.2;

7.13.1.2
date	2023.06.15.04.17.21;	author mcalabre;	state Exp;
branches;
next	;

8.0.1.1
date	2023.07.01.06.22.44;	author mcalabre;	state Exp;
branches;
next	;

8.1.1.1
date	2023.07.05.17.15.01;	author mcalabre;	state Exp;
branches;
next	;

8.2.1.1
date	2023.11.16.10.05.58;	author mcalabre;	state Exp;
branches;
next	8.2.1.2;

8.2.1.2
date	2024.04.02.14.06.11;	author mcalabre;	state Exp;
branches;
next	8.2.1.3;

8.2.1.3
date	2024.05.06.15.17.33;	author mcalabre;	state Exp;
branches;
next	8.2.1.4;

8.2.1.4
date	2024.05.10.15.03.53;	author mcalabre;	state Exp;
branches;
next	;

8.3.1.1
date	2024.05.13.16.35.40;	author mcalabre;	state Exp;
branches;
next	;

8.4.1.1
date	2024.10.28.13.58.42;	author mcalabre;	state Exp;
branches;
next	8.4.1.2;

8.4.1.2
date	2025.12.06.13.37.18;	author mcalabre;	state Exp;
branches;
next	;

8.5.1.1
date	2025.12.06.14.05.16;	author mcalabre;	state Exp;
branches;
next	8.5.1.2;

8.5.1.2
date	2026.03.29.13.36.18;	author mcalabre;	state Exp;
branches;
next	;

8.6.1.1
date	2026.03.29.14.19.27;	author mcalabre;	state Exp;
branches;
next	;


desc
@FORTRAN wrappers for the WCSLIB C routines in spc.c.
@


8.7
log
@WCSLIB 8.7
@
text
@/*============================================================================
  WCSLIB 8.7 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2026, Mark Calabretta

  This file is part of WCSLIB.

  WCSLIB is free software: you can redistribute it and/or modify it under the
  terms of the GNU Lesser General Public License as published by the Free
  Software Foundation, either version 3 of the License, or (at your option)
  any later version.

  WCSLIB 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 Lesser General Public License for
  more details.

  You should have received a copy of the GNU Lesser General Public License
  along with WCSLIB.  If not, see http://www.gnu.org/licenses.

  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
  http://www.atnf.csiro.au/computing/software/wcs
  $Id: spc_f.c,v 8.6.1.1 2026/03/29 14:19:27 mcalabre Exp mcalabre $
*===========================================================================*/

#include <stdio.h>
#include <string.h>

#include <wcserr.h>
#include <wcsutil.h>
#include <spc.h>

// Fortran name mangling.
#include <wcsconfig_f77.h>
#define spcput_  F77_FUNC(spcput,  SPCPUT)
#define spcptc_  F77_FUNC(spcptc,  SPCPTC)
#define spcptd_  F77_FUNC(spcptd,  SPCPTD)
#define spcpti_  F77_FUNC(spcpti,  SPCPTI)
#define spcget_  F77_FUNC(spcget,  SPCGET)
#define spcgtc_  F77_FUNC(spcgtc,  SPCGTC)
#define spcgtd_  F77_FUNC(spcgtd,  SPCGTD)
#define spcgti_  F77_FUNC(spcgti,  SPCGTI)

#define spcini_  F77_FUNC(spcini,  SPCINI)
#define spcfree_ F77_FUNC(spcfree, SPCFREE)
#define spcsize_ F77_FUNC(spcsize, SPCSIZE)
#define spcenq_  F77_FUNC(spcenq,  SPCENQ)
#define spcprt_  F77_FUNC(spcprt,  SPCPRT)
#define spcperr_ F77_FUNC(spcperr, SPCPERR)
#define spcset_  F77_FUNC(spcset,  SPCSET)
#define spcx2s_  F77_FUNC(spcx2s,  SPCX2S)
#define spcs2x_  F77_FUNC(spcs2x,  SPCS2X)
#define spctype_ F77_FUNC(spctype, SPCTYPE)
#define spcspxe_ F77_FUNC(spcspxe, SPCSPXE)
#define spcxpse_ F77_FUNC(spcxpse, SPCXPSE)
#define spctrne_ F77_FUNC(spctrne, SPCTRNE)
#define spcaips_ F77_FUNC(spcaips, SPCAIPS)

// Deprecated.
#define spctyp_  F77_FUNC(spctyp,  SPCTYP)
#define spcspx_  F77_FUNC(spcspx,  SPCSPX)
#define spcxps_  F77_FUNC(spcxps,  SPCXPS)
#define spctrn_  F77_FUNC(spctrn,  SPCTRN)

#ifdef BINDC
  #undef  spcptc_
  #define spcptc_ spcptc_c

  #undef  spcgtc_
  #define spcgtc_ spcgtc_c

  #undef  spcperr_
  #define spcperr_ spcperr_c

  #undef  spctype_ 
  #define spctype_ spctype_c
  #undef  spctyp_ 
  #define spctyp_  spctyp_c

  #undef  spcspxe_ 
  #define spcspxe_ spcspxe_c
  #undef  spcspx_ 
  #define spcspx_  spcspx_c

  #undef  spcxpse_ 
  #define spcxpse_ spcxpse_c
  #undef  spcxps_ 
  #define spcxps_  spcxps_c

  #undef  spctrne_ 
  #define spctrne_ spctrne_c
  #undef  spctrn_ 
  #define spctrn_  spctrn_c

  #undef  spcaips_ 
  #define spcaips_ spcaips_c
#endif

// Must match the values set in spc.inc.
#define SPC_FLAG    100
#define SPC_TYPE    101
#define SPC_CODE    102
#define SPC_CRVAL   103
#define SPC_RESTFRQ 104
#define SPC_RESTWAV 105
#define SPC_PV      106

#define SPC_W       200
#define SPC_ISGRISM 201
#define SPC_ERR     202

//----------------------------------------------------------------------------

int spcput_(int *spc, const int *what, const void *value, const int *m)

{
  // Cast pointers.
  struct spcprm *spcp = (struct spcprm *)spc;
  const char   *cvalp = (const char *)value;
  const int    *ivalp = (const int *)value;
  const double *dvalp = (const double *)value;

  if (spcp->flag == 1 || spcp->flag < 0) {
    // Preserve bypass mode.
    spcp->flag = 1;
  } else {
    spcp->flag = 0;
  }

  switch (*what) {
  case SPC_FLAG:
    spcp->flag = *ivalp;
    break;
  case SPC_TYPE:
    // Only four characters need be given.
    wcsutil_strcvt(4, ' ', 1, cvalp, spcp->type);
    wcsutil_null_fill(8, spcp->type);
    break;
  case SPC_CODE:
    // Only three characters need be given.
    wcsutil_strcvt(3, ' ', 1, cvalp, spcp->code);
    wcsutil_null_fill(4, spcp->code);
    break;
  case SPC_CRVAL:
    spcp->crval = *dvalp;
    break;
  case SPC_RESTFRQ:
    spcp->restfrq = *dvalp;
    break;
  case SPC_RESTWAV:
    spcp->restwav = *dvalp;
    break;
  case SPC_PV:
    spcp->pv[*m] = *dvalp;
    break;
  default:
    return 1;
  }

  return 0;
}

int spcptc_(int *spc, const int *what, const char *value, const int *m)
{
  return spcput_(spc, what, value, m);
}

int spcptd_(int *spc, const int *what, const double *value, const int *m)
{
  return spcput_(spc, what, value, m);
}

int spcpti_(int *spc, const int *what, const int *value, const int *m)
{
  return spcput_(spc, what, value, m);
}

//----------------------------------------------------------------------------

int spcget_(const int *spc, const int *what, void *value)

{
  // Cast pointers.
  const struct spcprm *spcp = (const struct spcprm *)spc;
  char   *cvalp = (char *)value;
  int    *ivalp = (int *)value;
  double *dvalp = (double *)value;

  switch (*what) {
  case SPC_FLAG:
    *ivalp = spcp->flag;
    break;
  case SPC_TYPE:
    wcsutil_strcvt(8, ' ', 0, spcp->type, cvalp);
    break;
  case SPC_CODE:
    wcsutil_strcvt(4, ' ', 0, spcp->code, cvalp);
    break;
  case SPC_CRVAL:
    *dvalp = spcp->crval;
    break;
  case SPC_RESTFRQ:
    *dvalp = spcp->restfrq;
    break;
  case SPC_RESTWAV:
    *dvalp = spcp->restwav;
    break;
  case SPC_PV:
    for (int m = 0; m < 7; m++) {
      *(dvalp++) = spcp->pv[m];
    }
    break;
  case SPC_W:
    for (int m = 0; m < 6; m++) {
      *(dvalp++) = spcp->w[m];
    }
    break;
  case SPC_ISGRISM:
    *ivalp = spcp->isGrism;
    break;
  case SPC_ERR:
    // Copy the contents of the wcserr struct.
    if (spcp->err) {
      const int *ispcp = (int *)(spcp->err);
      for (size_t l = 0; l < ERRLEN; l++) {
        *(ivalp++) = *(ispcp++);
      }
    } else {
      for (size_t l = 0; l < ERRLEN; l++) {
        *(ivalp++) = 0;
      }
    }
    break;
  default:
    return 1;
  }

  return 0;
}

int spcgtc_(const int *spc, const int *what, char *value)
{
  return spcget_(spc, what, value);
}

int spcgtd_(const int *spc, const int *what, double *value)
{
  return spcget_(spc, what, value);
}

int spcgti_(const int *spc, const int *what, int *value)
{
  return spcget_(spc, what, value);
}

//----------------------------------------------------------------------------

int spcini_(int *spc)

{
  return spcini((struct spcprm *)spc);
}

//----------------------------------------------------------------------------

int spcfree_(int *spc)

{
  return spcfree((struct spcprm *)spc);
}

//----------------------------------------------------------------------------

int spcsize_(const int *spc, int sizes[2])

{
  return spcsize((const struct spcprm *)spc, sizes);
}

//----------------------------------------------------------------------------

int spcenq_(const int *spc, int *enquiry)

{
  return spcenq((const struct spcprm *)spc, *enquiry);
}

//----------------------------------------------------------------------------

int spcprt_(const int *spc)

{
  // This may or may not force the Fortran I/O buffers to be flushed.  If
  // not, try CALL FLUSH(6) before calling SPCPRT in the Fortran code.
  fflush(NULL);

  return spcprt((const struct spcprm *)spc);
}

//----------------------------------------------------------------------------

// If null-terminated (using the Fortran CHAR(0) intrinsic), prefix may be of
// length less than but not exceeding 72 and trailing blanks are preserved.
// Otherwise, it must be of length 72 and trailing blanks are stripped off.

int spcperr_(int *spc, const char prefix[72])

{
  // This may or may not force the Fortran I/O buffers to be flushed.
  // If not, try CALL FLUSH(6) before calling SPCPERR in the Fortran code.
  fflush(NULL);

  char prefix_[73];
  wcsutil_strcvt(72, '\0', 1, prefix, prefix_);
  return wcserr_prt(((struct spcprm *)spc)->err, prefix_);
}

//----------------------------------------------------------------------------

int spcset_(int *spc)

{
  return spcset((struct spcprm *)spc);
}

//----------------------------------------------------------------------------

int spcx2s_(
  int *spc,
  const int *nx,
  const int *sspec,
  const int *sx,
  const double x[],
  double spec[],
  int stat[])

{
  return spcx2s((struct spcprm *)spc, *nx, *sx, *sspec, x, spec, stat);
}

//----------------------------------------------------------------------------

int spcs2x_(
  int *spc,
  const int *nspec,
  const int *sspec,
  const int *sx,
  const double spec[],
  double x[],
  int stat[])

{
  return spcs2x((struct spcprm *)spc, *nspec, *sspec, *sx, spec, x, stat);
}

//----------------------------------------------------------------------------

int spctype_(
  const char ctypei[8],
  char stype[4],
  char scode[3],
  char sname[21],
  char units[7],
  char ptype[1],
  char xtype[1],
  int *restreq,
  iptr err)

{
  char ctypei_[9];
  wcsutil_strcvt(8, ' ', 1, ctypei, ctypei_);

  char stype_[5], scode_[4], sname_[22], units_[8];
  int status = spctype(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                       restreq, (struct wcserr **)err);

  wcsutil_strcvt( 4, ' ', 0, stype_, stype);
  wcsutil_strcvt( 3, ' ', 0, scode_, scode);
  wcsutil_strcvt(21, ' ', 0, sname_, sname);
  wcsutil_strcvt( 7, ' ', 0, units_, units);

  return status;
}

// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

int spctyp_(
  const char ctypei[8],
  char stype[4],
  char scode[3],
  char sname[21],
  char units[7],
  char ptype[1],
  char xtype[1],
  int *restreq)

{
  return spctype_(ctypei, stype, scode, sname, units, ptype, xtype, restreq,
                  0x0);
}

//----------------------------------------------------------------------------

int spcspxe_(
  const char ctypeS[8],
  const double *crvalS,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalX,
  double *dXdS,
  iptr err)

{
  char ctypeS_[9];
  wcsutil_strcvt(8, ' ', 1, ctypeS, ctypeS_);

  return spcspxe(ctypeS_, *crvalS, *restfrq, *restwav, ptype, xtype, restreq,
                 crvalX, dXdS, (struct wcserr **)err);
}

// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

int spcspx_(
  const char ctypeS[8],
  const double *crvalS,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalX,
  double *dXdS)

{
  return spcspxe_(ctypeS, crvalS, restfrq, restwav, ptype, xtype, restreq,
                  crvalX, dXdS, 0x0);
}

//----------------------------------------------------------------------------

int spcxpse_(
  const char ctypeS[8],
  const double *crvalX,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalS,
  double *dSdX,
  iptr err)

{
  char ctypeS_[9];
  wcsutil_strcvt(8, ' ', 1, ctypeS, ctypeS_);

  return spcxpse(ctypeS_, *crvalX, *restfrq, *restwav, ptype, xtype, restreq,
                 crvalS, dSdX, (struct wcserr **)err);
}

// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

int spcxps_(
  const char ctypeS[8],
  const double *crvalX,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalS,
  double *dSdX)

{
  return spcxpse_(ctypeS, crvalX, restfrq, restwav, ptype, xtype, restreq,
                  crvalS, dSdX, 0x0);
}

//----------------------------------------------------------------------------

int spctrne_(
  const char ctypeS1[8],
  const double *crvalS1,
  const double *cdeltS1,
  const double *restfrq,
  const double *restwav,
  char   ctypeS2[8],
  double *crvalS2,
  double *cdeltS2,
  iptr err)

{
  char ctypeS1_[9], ctypeS2_[9];
  wcsutil_strcvt(8, ' ', 1, ctypeS1, ctypeS1_);
  wcsutil_strcvt(8, ' ', 1, ctypeS2, ctypeS2_);

  int status = spctrne(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                       ctypeS2_,  crvalS2,  cdeltS2, (struct wcserr **)err);

  wcsutil_strcvt(8, ' ', 0, ctypeS2_, ctypeS2);

  return status;
}

// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

int spctrn_(
  const char ctypeS1[8],
  const double *crvalS1,
  const double *cdeltS1,
  const double *restfrq,
  const double *restwav,
  char   ctypeS2[8],
  double *crvalS2,
  double *cdeltS2)

{
  return spctrne_(ctypeS1, crvalS1, cdeltS1, restfrq, restwav, ctypeS2,
                  crvalS2, cdeltS2, 0x0);
}

//----------------------------------------------------------------------------

int spcaips_(
  const char ctypeA[8],
  int *velref,
  char ctype[8],
  char specsys[8])

{
  char ctypeA_[9];
  wcsutil_strcvt(8, ' ', 1, ctypeA, ctypeA_);

  char ctype_[9], specsys_[9];
  int status = spcaips(ctypeA_, *velref, ctype_, specsys_);

  wcsutil_strcvt(8, ' ', 0, ctype_,   ctype);
  wcsutil_strcvt(8, ' ', 0, specsys_, specsys);

  return status;
}
@


8.6
log
@WCSLIB 8.6
@
text
@d2 1
a2 1
  WCSLIB 8.6 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 8.5.1.2 2026/03/29 13:36:18 mcalabre Exp mcalabre $
@


8.6.1.1
log
@WCSLIB 8.6 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.6 2026/03/29 13:53:56 mcalabre Exp $
@


8.5
log
@WCSLIB 8.5
@
text
@d2 2
a3 2
  WCSLIB 8.5 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2025, Mark Calabretta
d21 2
a22 2
  http://www.atnf.csiro.au/people/Mark.Calabretta
  $Id: spc_f.c,v 8.4.1.2 2025/12/06 13:37:18 mcalabre Exp mcalabre $
@


8.5.1.1
log
@WCSLIB 8.5 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.5 2025/12/06 13:47:41 mcalabre Exp $
@


8.5.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2026, Mark Calabretta
d21 2
a22 2
  http://www.atnf.csiro.au/computing/software/wcs
  $Id: spc_f.c,v 8.5.1.1 2025/12/06 14:05:16 mcalabre Exp mcalabre $
@


8.4
log
@WCSLIB 8.4
@
text
@d2 2
a3 2
  WCSLIB 8.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2024, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 8.3.1.1 2024/05/13 16:35:40 mcalabre Exp mcalabre $
@


8.4.1.1
log
@WCSLIB 8.4 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.4 2024/10/28 13:56:17 mcalabre Exp $
@


8.4.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2025, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 8.4.1.1 2024/10/28 13:58:42 mcalabre Exp mcalabre $
@


8.3
log
@WCSLIB 8.3
@
text
@d2 1
a2 1
  WCSLIB 8.3 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 8.2.1.4 2024/05/10 15:03:53 mcalabre Exp mcalabre $
@


8.3.1.1
log
@WCSLIB 8.3 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.3 2024/05/13 16:33:01 mcalabre Exp $
@


8.2
log
@WCSLIB 8.2
@
text
@d2 2
a3 2
  WCSLIB 8.2 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2023, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 8.1.1.1 2023/07/05 17:15:01 mcalabre Exp mcalabre $
d46 1
d64 34
a115 5
  const char *cvalp;
  const int  *ivalp;
  const double *dvalp;
  struct spcprm *spcp;

d117 11
a127 6
  spcp  = (struct spcprm *)spc;
  cvalp = (const char *)value;
  ivalp = (const int *)value;
  dvalp = (const double *)value;

  spcp->flag = 0;
a181 8
  unsigned int l;
  int  m;
  char *cvalp;
  int  *ivalp;
  double *dvalp;
  const int *ispcp;
  const struct spcprm *spcp;

d183 4
a186 4
  spcp  = (const struct spcprm *)spc;
  cvalp = (char *)value;
  ivalp = (int *)value;
  dvalp = (double *)value;
d208 1
a208 1
    for (m = 0; m < 7; m++) {
d213 1
a213 1
    for (m = 0; m < 6; m++) {
d223 2
a224 2
      ispcp = (int *)(spcp->err);
      for (l = 0; l < ERRLEN; l++) {
d228 1
a228 1
      for (l = 0; l < ERRLEN; l++) {
d281 8
a307 3
  char prefix_[73];
  wcsutil_strcvt(72, '\0', 1, prefix, prefix_);

d312 2
@


8.2.1.1
log
@WCSLIB 8.2 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.2 2023/11/16 10:00:30 mcalabre Exp $
@


8.2.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2024, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 8.2.1.1 2023/11/16 10:05:58 mcalabre Exp mcalabre $
@


8.2.1.3
log
@Changes required to support the new Fortran 2003 BIND(C) wrappers.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.2.1.2 2024/04/02 14:06:11 mcalabre Exp mcalabre $
a61 34

#ifdef BINDC
  #undef  spcptc_
  #define spcptc_ spcptc_c

  #undef  spcgtc_
  #define spcgtc_ spcgtc_c

  #undef  spcperr_
  #define spcperr_ spcperr_c

  #undef  spctype_ 
  #define spctype_ spctype_c
  #undef  spctyp_ 
  #define spctyp_  spctyp_c

  #undef  spcspxe_ 
  #define spcspxe_ spcspxe_c
  #undef  spcspx_ 
  #define spcspx_  spcspx_c

  #undef  spcxpse_ 
  #define spcxpse_ spcxpse_c
  #undef  spcxps_ 
  #define spcxps_  spcxps_c

  #undef  spctrne_ 
  #define spctrne_ spctrne_c
  #undef  spctrn_ 
  #define spctrn_  spctrn_c

  #undef  spcaips_ 
  #define spcaips_ spcaips_c
#endif
@


8.2.1.4
log
@Changes in spcput_() to support bypass mode in spcset().
Added spcenq_().
Converted to C99-style intermingled variable declarations.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.2.1.3 2024/05/06 15:17:33 mcalabre Exp mcalabre $
a45 1
#define spcenq_  F77_FUNC(spcenq,  SPCENQ)
d115 5
d121 6
a126 11
  struct spcprm *spcp = (struct spcprm *)spc;
  const char   *cvalp = (const char *)value;
  const int    *ivalp = (const int *)value;
  const double *dvalp = (const double *)value;

  if (spcp->flag == 1 || spcp->flag < 0) {
    // Preserve bypass mode.
    spcp->flag = 1;
  } else {
    spcp->flag = 0;
  }
d181 8
d190 4
a193 4
  const struct spcprm *spcp = (const struct spcprm *)spc;
  char   *cvalp = (char *)value;
  int    *ivalp = (int *)value;
  double *dvalp = (double *)value;
d215 1
a215 1
    for (int m = 0; m < 7; m++) {
d220 1
a220 1
    for (int m = 0; m < 6; m++) {
d230 2
a231 2
      const int *ispcp = (int *)(spcp->err);
      for (size_t l = 0; l < ERRLEN; l++) {
d235 1
a235 1
      for (size_t l = 0; l < ERRLEN; l++) {
a287 8
int spcenq_(const int *spc, int *enquiry)

{
  return spcenq((const struct spcprm *)spc, *enquiry);
}

//----------------------------------------------------------------------------

d307 3
a313 2
  char prefix_[73];
  wcsutil_strcvt(72, '\0', 1, prefix, prefix_);
@


8.1
log
@WCSLIB 8.1
@
text
@d2 1
a2 1
  WCSLIB 8.1 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 8.0.1.1 2023/07/01 06:22:44 mcalabre Exp mcalabre $
@


8.1.1.1
log
@WCSLIB 8.1 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
@


8.0
log
@WCSLIB 8.0
@
text
@d2 1
a2 1
  WCSLIB 8.0 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.13.1.2 2023/06/15 04:17:21 mcalabre Exp mcalabre $
@


8.0.1.1
log
@WCSLIB 8.0 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 8.0 2023/07/01 06:15:05 mcalabre Exp $
@


7.13
log
@WCSLIB 7.13
@
text
@d2 2
a3 2
  WCSLIB 7.13 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2022, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 7.12.1.1 2022/09/09 05:00:36 mcalabre Exp mcalabre $
@


7.13.1.1
log
@WCSLIB 7.13 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.13 2022/10/07 03:43:35 mcalabre Exp $
@


7.13.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2023, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 7.13.1.1 2022/10/07 03:45:47 mcalabre Exp mcalabre $
@


7.12
log
@WCSLIB 7.12
@
text
@d2 1
a2 1
  WCSLIB 7.12 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.11.1.1 2022/04/26 06:15:32 mcalabre Exp mcalabre $
@


7.12.1.1
log
@WCSLIB 7.12 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.12 2022/09/09 04:57:58 mcalabre Exp $
@


7.11
log
@WCSLIB 7.11
@
text
@d2 1
a2 1
  WCSLIB 7.11 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.10.1.1 2022/04/23 14:26:54 mcalabre Exp mcalabre $
@


7.11.1.1
log
@WCSLIB 7.11 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.11 2022/04/26 06:13:52 mcalabre Exp $
@


7.10
log
@WCSLIB 7.10
@
text
@d2 1
a2 1
  WCSLIB 7.10 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.9.1.1 2022/03/25 15:16:40 mcalabre Exp mcalabre $
@


7.10.1.1
log
@WCSLIB 7.10 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.10 2022/04/23 14:25:15 mcalabre Exp $
@


7.9
log
@WCSLIB 7.9
@
text
@d2 1
a2 1
  WCSLIB 7.9 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.8.1.1 2022/03/25 06:14:15 mcalabre Exp mcalabre $
@


7.9.1.1
log
@WCSLIB 7.9 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.9 2022/03/25 15:14:49 mcalabre Exp $
@


7.8
log
@WCSLIB 7.8
@
text
@d2 1
a2 1
  WCSLIB 7.8 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.7.1.2 2022/03/25 06:06:00 mcalabre Exp mcalabre $
@


7.8.1.1
log
@WCSLIB 7.8 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.8 2022/03/25 06:11:49 mcalabre Exp $
@


7.7
log
@WCSLIB 7.7
@
text
@d2 2
a3 2
  WCSLIB 7.7 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2021, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 7.6.1.1 2021/04/13 13:00:36 mcalabre Exp mcalabre $
@


7.7.1.1
log
@WCSLIB 7.7 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.7 2021/07/12 06:36:49 mcalabre Exp $
@


7.7.1.2
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2022, Mark Calabretta
d22 1
a22 1
  $Id: spc_f.c,v 7.7.1.1 2021/07/12 06:38:28 mcalabre Exp mcalabre $
@


7.6
log
@WCSLIB 7.6
@
text
@d2 1
a2 1
  WCSLIB 7.6 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.5.1.2 2021/04/13 08:45:58 mcalabre Exp mcalabre $
@


7.6.1.1
log
@WCSLIB 7.6 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.6 2021/04/13 12:57:01 mcalabre Exp $
@


7.5
log
@WCSLIB 7.5
@
text
@d2 1
a2 1
  WCSLIB 7.5 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.4.1.2 2021/02/22 07:38:08 mcalabre Exp mcalabre $
d45 1
d242 8
@


7.5.1.1
log
@WCSLIB 7.5 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.5 2021/03/20 05:54:58 mcalabre Exp $
@


7.5.1.2
log
@Wrapper for spcsize().
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.5.1.1 2021/03/20 05:56:42 mcalabre Exp mcalabre $
a44 1
#define spcsize_ F77_FUNC(spcsize, SPCSIZE)
a240 8
}

//----------------------------------------------------------------------------

int spcsize_(const int *spc, int sizes[2])

{
  return spcsize((const struct spcprm *)spc, sizes);
@


7.4
log
@WCSLIB 7.4
@
text
@d2 1
a2 1
  WCSLIB 7.4 - an implementation of the FITS WCS standard.
d22 1
a22 1
  $Id: spc_f.c,v 7.3.1.4 2021/01/28 12:31:46 mcalabre Exp mcalabre $
d99 1
a99 2
    wcsutil_strcvt(4, ' ', cvalp, spcp->type);
    spcp->type[4] = '\0';
d104 1
a104 2
    wcsutil_strcvt(3, ' ', cvalp, spcp->code);
    spcp->code[3] = '\0';
d165 1
a165 1
    wcsutil_strcvt(8, ' ', spcp->type, cvalp);
d168 1
a168 1
    wcsutil_strcvt(4, ' ', spcp->code, cvalp);
d265 1
a265 3

  wcsutil_strcvt(72, '\0', prefix, prefix_);
  prefix_[72] = '\0';
d326 2
a327 5
  char ctypei_[9], scode_[4], sname_[22], stype_[5], units_[8];
  int status;

  wcsutil_strcvt(8, ' ', ctypei, ctypei_);
  ctypei_[8] = '\0';
d329 8
a336 7
  status = spctype(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                   restreq, (struct wcserr **)err);

  wcsutil_strcvt( 4, ' ', stype_, stype);
  wcsutil_strcvt( 3, ' ', scode_, scode);
  wcsutil_strcvt(21, ' ', sname_, sname);
  wcsutil_strcvt( 7, ' ', units_, units);
d374 1
a374 3

  wcsutil_strcvt(8, ' ', ctypeS, ctypeS_);
  ctypeS_[8] = '\0';
d414 1
a414 3

  wcsutil_strcvt(8, ' ', ctypeS, ctypeS_);
  ctypeS_[8] = '\0';
a451 1
  int status;
d453 2
d456 2
a457 5
  wcsutil_strcvt(8, ' ', ctypeS1, ctypeS1_);
  ctypeS1_[8] = '\0';

  wcsutil_strcvt(8, ' ', ctypeS2, ctypeS2_);
  ctypeS2_[8] = '\0';
d459 1
a459 4
  status = spctrne(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                   ctypeS2_,  crvalS2,  cdeltS2, (struct wcserr **)err);

  wcsutil_strcvt(8, ' ', ctypeS2_, ctypeS2);
d490 2
a491 5
  int status;
  char ctypeA_[9], ctype_[9], specsys_[9];

  wcsutil_strcvt(8, ' ', ctypeA, ctypeA_);
  ctypeA_[8] = '\0';
d493 2
a494 1
  status = spcaips(ctypeA_, *velref, ctype_, specsys_);
d496 2
a497 2
  wcsutil_strcvt(8, ' ', ctype_,   ctype);
  wcsutil_strcvt(8, ' ', specsys_, specsys);
@


7.4.1.1
log
@WCSLIB 7.4 development branch.
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.4 2021/01/31 02:24:52 mcalabre Exp $
@


7.4.1.2
log
@Revised API to wcsutil_strcvt().
@
text
@d22 1
a22 1
  $Id: spc_f.c,v 7.4.1.1 2021/01/31 02:26:24 mcalabre Exp mcalabre $
d99 2
a100 1
    wcsutil_strcvt(4, ' ', 1, cvalp, spcp->type);
d105 2
a106 1
    wcsutil_strcvt(3, ' ', 1, cvalp, spcp->code);
d167 1
a167 1
    wcsutil_strcvt(8, ' ', 0, spcp->type, cvalp);
d170 1
a170 1
    wcsutil_strcvt(4, ' ', 0, spcp->code, cvalp);
d267 3
a269 1
  wcsutil_strcvt(72, '\0', 1, prefix, prefix_);
d330 5
a334 2
  char ctypei_[9];
  wcsutil_strcvt(8, ' ', 1, ctypei, ctypei_);
d336 7
a342 8
  char stype_[5], scode_[4], sname_[22], units_[8];
  int status = spctype(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                       restreq, (struct wcserr **)err);

  wcsutil_strcvt( 4, ' ', 0, stype_, stype);
  wcsutil_strcvt( 3, ' ', 0, scode_, scode);
  wcsutil_strcvt(21, ' ', 0, sname_, sname);
  wcsutil_strcvt( 7, ' ', 0, units_, units);
d380 3
a382 1
  wcsutil_strcvt(8, ' ', 1, ctypeS, ctypeS_);
d422 3
a424 1
  wcsutil_strcvt(8, ' ', 1, ctypeS, ctypeS_);
d462 1
a463 2
  wcsutil_strcvt(8, ' ', 1, ctypeS1, ctypeS1_);
  wcsutil_strcvt(8, ' ', 1, ctypeS2, ctypeS2_);
d465 5
a469 2
  int status = spctrne(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                       ctypeS2_,  crvalS2,  cdeltS2, (struct wcserr **)err);
d471 4
a474 1
  wcsutil_strcvt(8, ' ', 0, ctypeS2_, ctypeS2);
d505 5
a509 2
  char ctypeA_[9];
  wcsutil_strcvt(8, ' ', 1, ctypeA, ctypeA_);
d511 1
a511 2
  char ctype_[9], specsys_[9];
  int status = spcaips(ctypeA_, *velref, ctype_, specsys_);
d513 2
a514 2
  wcsutil_strcvt(8, ' ', 0, ctype_,   ctype);
  wcsutil_strcvt(8, ' ', 0, specsys_, specsys);
@


7.3
log
@WCSLIB 7.3
@
text
@d2 2
a3 3

  WCSLIB 7.3 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2020, Mark Calabretta
a19 2
  Direct correspondence concerning WCSLIB to mark@@calabretta.id.au

d22 1
a22 1
  $Id: spc_f.c,v 7.2.1.1 2020/03/09 07:34:50 mcalabre Exp mcalabre $
d32 1
a32 1
/* Fortran name mangling. */
d56 1
a56 1
/* Deprecated. */
d62 1
a62 1
/* Must match the values set in spc.inc. */
d75 1
a75 1
/*--------------------------------------------------------------------------*/
d85 1
a85 1
  /* Cast pointers. */
d98 1
a98 1
    /* Only four characters need be given. */
d104 1
a104 1
    /* Only three characters need be given. */
d143 1
a143 1
/*--------------------------------------------------------------------------*/
d156 1
a156 1
  /* Cast pointers. */
d195 1
a195 1
    /* Copy the contents of the wcserr struct. */
d229 1
a229 1
/*--------------------------------------------------------------------------*/
d237 1
a237 1
/*--------------------------------------------------------------------------*/
d245 1
a245 1
/*--------------------------------------------------------------------------*/
d250 2
a251 2
  /* This may or may not force the Fortran I/O buffers to be flushed.  If
   * not, try CALL FLUSH(6) before calling SPCPRT in the Fortran code. */
d257 1
a257 1
/*--------------------------------------------------------------------------*/
d259 3
a261 3
/* If null-terminated (using the Fortran CHAR(0) intrinsic), prefix may be of
 * length less than but not exceeding 72 and trailing blanks are preserved.
 * Otherwise, it must be of length 72 and trailing blanks are stripped off. */
d271 2
a272 2
  /* This may or may not force the Fortran I/O buffers to be flushed. */
  /* If not, try CALL FLUSH(6) before calling SPCPERR in the Fortran code. */
d278 1
a278 1
/*--------------------------------------------------------------------------*/
d286 1
a286 1
/*--------------------------------------------------------------------------*/
d301 1
a301 1
/*--------------------------------------------------------------------------*/
d316 1
a316 1
/*--------------------------------------------------------------------------*/
d347 1
a347 1
/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */
d364 1
a364 1
/*--------------------------------------------------------------------------*/
d388 1
a388 1
/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */
d406 1
a406 1
/*--------------------------------------------------------------------------*/
d430 1
a430 1
/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */
d448 1
a448 1
/*--------------------------------------------------------------------------*/
d479 1
a479 1
/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */
d496 1
a496 1
/*--------------------------------------------------------------------------*/
@


7.3.1.1
log
@WCSLIB 7.3 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 7.3 2020/06/03 03:37:03 mcalabre Exp $
@


7.3.1.2
log
@Switched to C99 style commenting (i.e. using //) within the code.
@
text
@d2 1
d25 1
a25 1
  $Id: spc_f.c,v 7.3.1.1 2020/06/03 03:38:11 mcalabre Exp mcalabre $
d35 1
a35 1
// Fortran name mangling.
d59 1
a59 1
// Deprecated.
d65 1
a65 1
// Must match the values set in spc.inc.
d78 1
a78 1
//----------------------------------------------------------------------------
d88 1
a88 1
  // Cast pointers.
d101 1
a101 1
    // Only four characters need be given.
d107 1
a107 1
    // Only three characters need be given.
d146 1
a146 1
//----------------------------------------------------------------------------
d159 1
a159 1
  // Cast pointers.
d198 1
a198 1
    // Copy the contents of the wcserr struct.
d232 1
a232 1
//----------------------------------------------------------------------------
d240 1
a240 1
//----------------------------------------------------------------------------
d248 1
a248 1
//----------------------------------------------------------------------------
d253 2
a254 2
  // This may or may not force the Fortran I/O buffers to be flushed.  If
  // not, try CALL FLUSH(6) before calling SPCPRT in the Fortran code.
d260 1
a260 1
//----------------------------------------------------------------------------
d262 3
a264 3
// If null-terminated (using the Fortran CHAR(0) intrinsic), prefix may be of
// length less than but not exceeding 72 and trailing blanks are preserved.
// Otherwise, it must be of length 72 and trailing blanks are stripped off.
d274 2
a275 2
  // This may or may not force the Fortran I/O buffers to be flushed.
  // If not, try CALL FLUSH(6) before calling SPCPERR in the Fortran code.
d281 1
a281 1
//----------------------------------------------------------------------------
d289 1
a289 1
//----------------------------------------------------------------------------
d304 1
a304 1
//----------------------------------------------------------------------------
d319 1
a319 1
//----------------------------------------------------------------------------
d350 1
a350 1
// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
d367 1
a367 1
//----------------------------------------------------------------------------
d391 1
a391 1
// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
d409 1
a409 1
//----------------------------------------------------------------------------
d433 1
a433 1
// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
d451 1
a451 1
//----------------------------------------------------------------------------
d482 1
a482 1
// : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
d499 1
a499 1
//----------------------------------------------------------------------------
@


7.3.1.3
log
@Updated date in copyright notice.
@
text
@d3 1
a3 1
  Copyright (C) 1995-2021, Mark Calabretta
d24 1
a24 1
  $Id: spc_f.c,v 7.3.1.2 2020/08/17 11:21:34 mcalabre Exp mcalabre $
@


7.3.1.4
log
@Removed my email address from the copyright notice.
@
text
@d20 2
d24 1
a24 1
  $Id: spc_f.c,v 7.3.1.3 2021/01/19 14:10:41 mcalabre Exp mcalabre $
@


7.2
log
@WCSLIB 7.2
@
text
@d3 1
a3 1
  WCSLIB 7.2 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 7.1.1.1 2019/12/31 13:28:19 mcalabre Exp mcalabre $
@


7.2.1.1
log
@WCSLIB 7.2 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 7.2 2020/03/09 07:31:23 mcalabre Exp $
@


7.1
log
@WCSLIB 7.1
@
text
@d3 1
a3 1
  WCSLIB 7.1 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 6.4.1.3 2019/12/31 03:28:57 mcalabre Exp mcalabre $
@


7.1.1.1
log
@WCSLIB 7.1 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 7.1 2019/12/31 13:25:19 mcalabre Exp $
@


6.4
log
@WCSLIB 6.4
@
text
@d3 2
a4 2
  WCSLIB 6.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2019, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 6.3.1.1 2019/07/12 07:34:37 mcalabre Exp mcalabre $
d101 2
a102 1
    strncpy(spcp->type, cvalp, 4);
d104 1
d107 2
a108 1
    strncpy(spcp->code, cvalp, 3);
d110 1
d170 1
a170 1
    strncpy(cvalp, spcp->type, 4);
d173 1
a173 1
    strncpy(cvalp, spcp->code, 3);
d262 3
a264 2
/* prefix should be null-terminated, or else of length 72 in which case
 * trailing blanks are not significant. */
d269 1
a269 1
  char prefix_[72];
d271 2
a272 2
  strncpy(prefix_, prefix, 72);
  wcsutil_null_fill(72, prefix_);
d336 1
a336 1
  strncpy(ctypei_, ctypei, 8);
d342 4
a345 9
  wcsutil_blank_fill( 5, stype_);
  wcsutil_blank_fill( 4, scode_);
  wcsutil_blank_fill(22, sname_);
  wcsutil_blank_fill( 8, units_);

  strncpy(stype, stype_, 4);
  strncpy(scode, scode_, 3);
  strncpy(sname, sname_, 21);
  strncpy(units, units_, 7);
d383 2
a384 1
  strncpy(ctypeS_, ctypeS, 8);
d425 2
a426 1
  strncpy(ctypeS_, ctypeS, 8);
d468 1
a468 2
  strncpy(ctypeS1_, ctypeS1, 8);
  strncpy(ctypeS2_, ctypeS2, 8);
d470 2
d477 1
a477 2
  strncpy(ctypeS2, ctypeS2_, 8);
  wcsutil_blank_fill(8, ctypeS2);
d511 1
a511 1
  strncpy(ctypeA_, ctypeA, 8);
d516 2
a517 5
  wcsutil_blank_fill(9, ctype_);
  strncpy(ctype, ctype_, 8);

  wcsutil_blank_fill(9, specsys_);
  strncpy(specsys, specsys_, 8);
@


6.4.1.1
log
@WCSLIB 6.4 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 6.4 2019/08/15 09:30:18 mcalabre Exp $
@


6.4.1.2
log
@Reworked Fortran <-> C string translation using wcsutil_strcvt().
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 6.4.1.2 2019/12/14 02:21:38 mcalabre Exp mcalabre $
d101 1
a101 2
    /* Only four characters need be given. */
    wcsutil_strcvt(4, ' ', cvalp, spcp->type);
a102 1
    wcsutil_null_fill(8, spcp->type);
d105 1
a105 2
    /* Only three characters need be given. */
    wcsutil_strcvt(3, ' ', cvalp, spcp->code);
a106 1
    wcsutil_null_fill(4, spcp->code);
d166 1
a166 1
    wcsutil_strcvt(8, ' ', spcp->type, cvalp);
d169 1
a169 1
    wcsutil_strcvt(4, ' ', spcp->code, cvalp);
d258 2
a259 3
/* If null-terminated (using the Fortran CHAR(0) intrinsic), prefix may be of
 * length less than but not exceeding 72 and trailing blanks are preserved.
 * Otherwise, it must be of length 72 and trailing blanks are stripped off. */
d264 1
a264 1
  char prefix_[73];
d266 2
a267 2
  wcsutil_strcvt(72, '\0', prefix, prefix_);
  prefix_[72] = '\0';
d331 1
a331 1
  wcsutil_strcvt(8, ' ', ctypei, ctypei_);
d337 9
a345 4
  wcsutil_strcvt( 4, ' ', stype_, stype);
  wcsutil_strcvt( 3, ' ', scode_, scode);
  wcsutil_strcvt(21, ' ', sname_, sname);
  wcsutil_strcvt( 7, ' ', units_, units);
d383 1
a383 2

  wcsutil_strcvt(8, ' ', ctypeS, ctypeS_);
d424 1
a424 2

  wcsutil_strcvt(8, ' ', ctypeS, ctypeS_);
d466 2
a467 1
  wcsutil_strcvt(8, ' ', ctypeS1, ctypeS1_);
a468 2

  wcsutil_strcvt(8, ' ', ctypeS2, ctypeS2_);
d474 2
a475 1
  wcsutil_strcvt(8, ' ', ctypeS2_, ctypeS2);
d509 1
a509 1
  wcsutil_strcvt(8, ' ', ctypeA, ctypeA_);
d514 5
a518 2
  wcsutil_strcvt(8, ' ', ctype_,   ctype);
  wcsutil_strcvt(8, ' ', specsys_, specsys);
@


6.4.1.3
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2020, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 6.4.1.2 2019/12/14 02:39:00 mcalabre Exp mcalabre $
@


6.3
log
@WCSLIB 6.3
@
text
@d3 1
a3 1
  WCSLIB 6.3 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 6.2.1.2 2019/05/10 02:05:36 mcalabre Exp mcalabre $
@


6.3.1.1
log
@WCSLIB 6.3 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 6.3 2019/07/12 07:33:39 mcalabre Exp $
@


6.2
log
@WCSLIB 6.2
@
text
@d3 2
a4 2
  WCSLIB 6.2 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2018, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 6.1.1.1 2018/10/19 08:36:15 mcalabre Exp mcalabre $
@


6.2.1.1
log
@WCSLIB 6.2 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 6.2 2018/10/20 10:03:14 mcalabre Exp $
@


6.2.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2019, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 6.2.1.1 2018/10/20 10:04:15 mcalabre Exp mcalabre $
@


6.1
log
@WCSLIB 6.1
@
text
@d3 1
a3 1
  WCSLIB 6.1 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.20.1.2 2018/10/19 04:27:49 mcalabre Exp mcalabre $
@


6.1.1.1
log
@WCSLIB 6.1 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 6.1 2018/10/19 08:35:17 mcalabre Exp $
@


5.20
log
@WCSLIB 5.20
@
text
@d3 1
a3 1
  WCSLIB 5.20 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.19.1.1 2018/07/26 15:41:42 mcalabre Exp mcalabre $
d65 1
@


5.20.1.1
log
@WCSLIB 5.20 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.20 2018/10/05 05:32:41 mcalabre Exp $
@


5.20.1.2
log
@Added a reminder that the the codes for accessing the data structure must
match the parameters set in the Fortran include file.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.20.1.1 2018/10/05 05:33:33 mcalabre Exp mcalabre $
a64 1
/* Must match the values set in spc.inc. */
@


5.19
log
@WCSLIB 5.19
@
text
@d3 1
a3 1
  WCSLIB 5.19 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.18.1.1 2018/01/10 08:33:04 mcalabre Exp mcalabre $
@


5.19.1.1
log
@WCSLIB 5.19 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.19 2018/07/26 15:37:05 mcalabre Exp $
@


5.18
log
@WCSLIB 5.18
@
text
@d3 1
a3 1
  WCSLIB 5.18 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.17.1.2 2018/01/10 08:26:33 mcalabre Exp mcalabre $
@


5.18.1.1
log
@WCSLIB 5.18 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.18 2018/01/10 08:32:14 mcalabre Exp $
@


5.17
log
@WCSLIB 5.17
@
text
@d3 2
a4 2
  WCSLIB 5.17 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2017, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 5.16.1.2 2017/09/13 00:26:00 mcalabre Exp mcalabre $
@


5.17.1.1
log
@WCSLIB 5.17 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.17 2017/09/18 08:44:24 mcalabre Exp $
@


5.17.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2018, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 5.17.1.1 2017/09/18 08:46:00 mcalabre Exp mcalabre $
@


5.16
log
@WCSLIB 5.16
@
text
@d3 1
a3 1
  WCSLIB 5.16 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.15.1.2 2017/01/15 04:08:22 mcalabre Exp mcalabre $
d146 2
a147 1
  int  k, m;
d196 1
a196 1
      for (k = 0; k < ERRLEN; k++) {
d200 1
a200 1
      for (k = 0; k < ERRLEN; k++) {
@


5.16.1.1
log
@WCSLIB 5.16 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.16 2017/01/15 04:25:02 mcalabre Exp $
@


5.16.1.2
log
@Fixed compiler warnings about comparison between signed and unsigned ints.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.16.1.1 2017/01/15 04:29:02 mcalabre Exp mcalabre $
d146 1
a146 2
  unsigned int l;
  int  m;
d195 1
a195 1
      for (l = 0; l < ERRLEN; l++) {
d199 1
a199 1
      for (l = 0; l < ERRLEN; l++) {
@


5.15
log
@WCSLIB 5.15
@
text
@d3 2
a4 2
  WCSLIB 5.15 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2016, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 5.14.1.1 2016/02/07 10:52:47 mcalabre Exp mcalabre $
@


5.15.1.1
log
@WCSLIB 5.15 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.15 2016/04/05 12:55:12 mcalabre Exp $
@


5.15.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2017, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 5.15.1.1 2016/04/05 12:58:37 mcalabre Exp mcalabre $
@


5.14
log
@WCSLIB 5.14
@
text
@d3 1
a3 1
  WCSLIB 5.14 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.13.1.1 2016/01/26 08:54:35 mcalabre Exp mcalabre $
@


5.14.1.1
log
@WCSLIB 5.14 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.14 2016/02/07 10:49:32 mcalabre Exp $
@


5.13
log
@WCSLIB 5.13
@
text
@d3 1
a3 1
  WCSLIB 5.13 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.12.1.2 2016/01/25 05:21:06 mcalabre Exp mcalabre $
@


5.13.1.1
log
@WCSLIB 5.13 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.13 2016/01/26 08:51:15 mcalabre Exp $
@


5.12
log
@WCSLIB 5.12
@
text
@d3 2
a4 2
  WCSLIB 5.12 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2015, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 5.11.1.1 2015/10/18 09:16:29 mcalabre Exp mcalabre $
@


5.12.1.1
log
@WCSLIB 5.12 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.12 2015/11/15 02:13:02 mcalabre Exp $
@


5.12.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2016, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 5.12.1.1 2015/11/15 02:16:17 mcalabre Exp mcalabre $
@


5.11
log
@WCSLIB 5.11
@
text
@d3 1
a3 1
  WCSLIB 5.11 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.10.1.1 2015/10/09 08:22:38 mcalabre Exp mcalabre $
@


5.11.1.1
log
@WCSLIB 5.11 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.11 2015/10/18 09:13:07 mcalabre Exp $
@


5.10
log
@WCSLIB 5.10
@
text
@d3 1
a3 1
  WCSLIB 5.10 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.9.1.1 2015/07/21 09:28:10 mcalabre Exp mcalabre $
@


5.10.1.1
log
@WCSLIB 5.10 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.10 2015/10/09 08:19:17 mcalabre Exp $
@


5.9
log
@WCSLIB 5.9
@
text
@d3 1
a3 1
  WCSLIB 5.9 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.8.1.1 2015/07/08 11:07:21 mcalabre Exp mcalabre $
@


5.9.1.1
log
@WCSLIB 5.9 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.9 2015/07/21 09:20:03 mcalabre Exp $
@


5.8
log
@WCSLIB 5.8
@
text
@d3 1
a3 1
  WCSLIB 5.8 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.7.1.1 2015/06/29 02:47:26 mcalabre Exp mcalabre $
@


5.8.1.1
log
@WCSLIB 5.8 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.8 2015/07/08 11:04:01 mcalabre Exp $
@


5.7
log
@WCSLIB 5.7
@
text
@d3 1
a3 1
  WCSLIB 5.7 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.6.1.1 2015/06/14 07:14:47 mcalabre Exp mcalabre $
@


5.7.1.1
log
@WCSLIB 5.7 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.7 2015/06/29 02:44:17 mcalabre Exp $
@


5.6
log
@WCSLIB 5.6
@
text
@d3 1
a3 1
  WCSLIB 5.6 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.5.1.1 2015/05/05 13:21:03 mcalabre Exp mcalabre $
@


5.6.1.1
log
@WCSLIB 5.6 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.6 2015/06/14 07:11:25 mcalabre Exp $
@


5.5
log
@WCSLIB 5.5
@
text
@d3 1
a3 1
  WCSLIB 5.5 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.4.1.1 2015/04/21 14:44:30 mcalabre Exp mcalabre $
@


5.5.1.1
log
@WCSLIB 5.5 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.5 2015/05/05 13:16:33 mcalabre Exp $
@


5.4
log
@WCSLIB 5.4
@
text
@d3 1
a3 1
  WCSLIB 5.4 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.3.1.1 2015/04/21 02:54:04 mcalabre Exp mcalabre $
@


5.4.1.1
log
@WCSLIB 5.4 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.4 2015/04/21 14:41:07 mcalabre Exp $
@


5.3
log
@WCSLIB 5.3
@
text
@d3 1
a3 1
  WCSLIB 5.3 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.2.1.1 2015/04/15 12:39:17 mcalabre Exp mcalabre $
@


5.3.1.1
log
@WCSLIB 5.3 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.3 2015/04/21 02:50:53 mcalabre Exp $
@


5.2
log
@WCSLIB 5.2
@
text
@d3 1
a3 1
  WCSLIB 5.2 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.1.1.2 2015/04/13 11:39:28 mcalabre Exp mcalabre $
@


5.2.1.1
log
@WCSLIB 5.2 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.2 2015/04/15 12:35:08 mcalabre Exp $
@


5.1
log
@WCSLIB 5.1
@
text
@d3 1
a3 1
  WCSLIB 5.1 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 5.0.1.1 2015/04/05 12:28:03 mcalabre Exp mcalabre $
a262 1
  int  i;
d265 1
a265 8
  if (prefix_[71] == ' ') {
    for (i = 70; i >= 0; i--) {
      if (prefix_[i] != ' ') break;
      prefix_[i] = '\0';
    }
  } else {
    prefix_[71] = '\0';
  }
@


5.1.1.1
log
@WCSLIB 5.1 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
@


5.1.1.2
log
@In spcperr_(), use wcsutuil_null_fill().
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.1.1.1 2015/04/07 11:01:12 mcalabre Exp mcalabre $
d263 1
d266 8
a273 1
  wcsutil_null_fill(72, prefix_);
@


5.0
log
@WCSLIB 5.0
@
text
@d3 1
a3 1
  WCSLIB 5.0 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.25.1.3 2015/04/05 06:51:36 mcalabre Exp mcalabre $
@


5.0.1.1
log
@WCSLIB 5.0 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 5.0 2015/04/05 12:25:02 mcalabre Exp $
@


4.25
log
@WCSLIB 4.25
@
text
@d3 2
a4 2
  WCSLIB 4.25 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2014, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 4.24.1.1 2014/09/18 15:28:11 mcalabre Exp mcalabre $
a36 1
#define spcini_  F77_FUNC(spcini,  SPCINI)
d38 3
d42 5
d49 1
a58 7
#define spcptc_  F77_FUNC(spcptc,  SPCPTC)
#define spcptd_  F77_FUNC(spcptd,  SPCPTD)
#define spcpti_  F77_FUNC(spcpti,  SPCPTI)
#define spcgtc_  F77_FUNC(spcgtc,  SPCGTC)
#define spcgtd_  F77_FUNC(spcgtd,  SPCGTD)
#define spcgti_  F77_FUNC(spcgti,  SPCGTI)

a78 8
int spcini_(int *spc)

{
  return spcini((struct spcprm *)spc);
}

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

d228 8
d244 1
a244 1
int spcprt_(int *spc)
d251 29
a279 1
  return spcprt((struct spcprm *)spc);
@


4.25.1.1
log
@WCSLIB 4.25 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.25 2014/12/14 14:29:37 mcalabre Exp $
@


4.25.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2015, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 4.25.1.1 2014/12/14 14:32:47 mcalabre Exp mcalabre $
@


4.25.1.3
log
@Added spcperr_() as a wrapper on wcserr_prt().  Changed the order of
function definitions to put spcprm manipulation routines first.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.25.1.2 2015/01/06 01:02:17 mcalabre Exp mcalabre $
d37 1
a38 3
#define spcptc_  F77_FUNC(spcptc,  SPCPTC)
#define spcptd_  F77_FUNC(spcptd,  SPCPTD)
#define spcpti_  F77_FUNC(spcpti,  SPCPTI)
a39 5
#define spcgtc_  F77_FUNC(spcgtc,  SPCGTC)
#define spcgtd_  F77_FUNC(spcgtd,  SPCGTD)
#define spcgti_  F77_FUNC(spcgti,  SPCGTI)

#define spcini_  F77_FUNC(spcini,  SPCINI)
a41 1
#define spcperr_ F77_FUNC(spcperr, SPCPERR)
d51 7
d78 8
a234 8
int spcini_(int *spc)

{
  return spcini((struct spcprm *)spc);
}

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

d243 1
a243 1
int spcprt_(const int *spc)
d250 1
a250 29
  return spcprt((const struct spcprm *)spc);
}

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

/* prefix should be null-terminated, or else of length 72 in which case
 * trailing blanks are not significant. */

int spcperr_(int *spc, const char prefix[72])

{
  char prefix_[72];
  int  i;

  strncpy(prefix_, prefix, 72);
  if (prefix_[71] == ' ') {
    for (i = 70; i >= 0; i--) {
      if (prefix_[i] != ' ') break;
      prefix_[i] = '\0';
    }
  } else {
    prefix_[71] = '\0';
  }

  /* This may or may not force the Fortran I/O buffers to be flushed. */
  /* If not, try CALL FLUSH(6) before calling SPCPERR in the Fortran code. */
  fflush(NULL);

  return wcserr_prt(((struct spcprm *)spc)->err, prefix_);
@


4.24
log
@WCSLIB 4.24
@
text
@d3 1
a3 1
  WCSLIB 4.24 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.23.1.1 2014/05/13 05:53:51 mcalabre Exp mcalabre $
@


4.24.1.1
log
@WCSLIB 4.24 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.24 2014/09/18 15:25:01 mcalabre Exp $
@


4.23
log
@WCSLIB 4.23
@
text
@d3 1
a3 1
  WCSLIB 4.23 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.22.1.1 2014/04/12 15:06:33 mcalabre Exp mcalabre $
@


4.23.1.1
log
@WCSLIB 4.23 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.23 2014/05/13 05:50:52 mcalabre Exp $
@


4.22
log
@WCSLIB 4.22
@
text
@d3 1
a3 1
  WCSLIB 4.22 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.21.1.1 2014/03/24 05:15:30 mcalabre Exp mcalabre $
@


4.22.1.1
log
@WCSLIB 4.22 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.22 2014/04/12 15:03:53 mcalabre Exp $
@


4.21
log
@WCSLIB 4.21
@
text
@d3 1
a3 1
  WCSLIB 4.21 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.20.1.2 2014/03/21 06:39:02 mcalabre Exp mcalabre $
@


4.21.1.1
log
@WCSLIB 4.21 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.21 2014/03/24 05:12:28 mcalabre Exp $
@


4.20
log
@WCSLIB 4.20
@
text
@d3 2
a4 2
  WCSLIB 4.20 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2013, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 4.19.1.1 2013/09/29 14:20:40 mcalabre Exp mcalabre $
@


4.20.1.1
log
@WCSLIB 4.20 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.20 2013/12/18 05:42:50 mcalabre Exp $
@


4.20.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2014, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 4.20.1.1 2013/12/18 05:46:56 mcalabre Exp mcalabre $
@


4.19
log
@WCSLIB 4.19
@
text
@d3 1
a3 1
  WCSLIB 4.19 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.18.1.1 2013/07/13 10:02:39 mcalabre Exp mcalabre $
@


4.19.1.1
log
@WCSLIB 4.19 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.19 2013/09/29 14:17:53 mcalabre Exp $
@


4.18
log
@WCSLIB 4.18
@
text
@d3 1
a3 1
  WCSLIB 4.18 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.17.1.1 2013/01/29 05:32:33 cal103 Exp cal103 $
@


4.18.1.1
log
@WCSLIB 4.18 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.18 2013/07/13 10:00:05 mcalabre Exp $
@


4.17
log
@WCSLIB 4.17
@
text
@d3 1
a3 1
  WCSLIB 4.17 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.16.1.2 2013/01/29 05:10:59 cal103 Exp cal103 $
@


4.17.1.1
log
@WCSLIB 4.17 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.17 2013/01/29 05:29:21 cal103 Exp $
@


4.16
log
@WCSLIB 4.16
@
text
@d3 2
a4 2
  WCSLIB 4.16 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2012, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 4.15.1.1 2012/09/26 14:27:52 cal103 Exp cal103 $
@


4.16.1.1
log
@WCSLIB 4.16 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.16 2012/11/07 04:42:45 cal103 Exp $
@


4.16.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2013, Mark Calabretta
d25 1
a25 1
  $Id: spc_f.c,v 4.16.1.1 2012/11/07 04:45:57 cal103 Exp cal103 $
@


4.15
log
@WCSLIB 4.15
@
text
@d3 1
a3 1
  WCSLIB 4.15 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.14.1.1 2012/07/13 10:04:54 cal103 Exp cal103 $
@


4.15.1.1
log
@WCSLIB 4.15 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.15 2012/09/26 14:26:06 cal103 Exp $
@


4.14
log
@WCSLIB 4.14
@
text
@d3 1
a3 1
  WCSLIB 4.14 - an implementation of the FITS WCS standard.
d25 1
a25 1
  $Id: spc_f.c,v 4.13.1.2 2012/07/13 03:40:02 cal103 Exp cal103 $
@


4.14.1.1
log
@WCSLIB 4.14 development branch.
@
text
@d25 1
a25 1
  $Id: spc_f.c,v 4.14 2012/07/13 10:02:35 cal103 Exp $
@


4.13
log
@WCSLIB 4.13
@
text
@d3 1
a3 1
  WCSLIB 4.13 - an implementation of the FITS WCS standard.
d19 1
a19 1
  along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.
d21 5
a25 11
  Correspondence concerning WCSLIB may be directed to:
    Internet email: mcalabre@@atnf.csiro.au
    Postal address: Dr. Mark Calabretta
                    Australia Telescope National Facility, CSIRO
                    PO Box 76
                    Epping NSW 1710
                    AUSTRALIA

  Author: Mark Calabretta, Australia Telescope National Facility
  http://www.atnf.csiro.au/~mcalabre/index.html
  $Id: spc_f.c,v 4.12.1.1 2012/02/29 07:59:11 cal103 Exp cal103 $
@


4.13.1.1
log
@WCSLIB 4.13 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.13 2012/03/14 07:39:31 cal103 Exp $
@


4.13.1.2
log
@Changed contact details.
@
text
@d19 1
a19 1
  along with WCSLIB.  If not, see http://www.gnu.org/licenses.
d21 11
a31 5
  Direct correspondence concerning WCSLIB to mark@@calabretta.id.au

  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
  http://www.atnf.csiro.au/people/Mark.Calabretta
  $Id: spc_f.c,v 4.13.1.1 2012/03/14 07:40:38 cal103 Exp cal103 $
@


4.12
log
@WCSLIB 4.12
@
text
@d3 1
a3 1
  WCSLIB 4.12 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: spc_f.c,v 4.11.1.1 2012/02/20 23:31:14 cal103 Exp cal103 $
@


4.12.1.1
log
@WCSLIB 4.12 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.12 2012/02/29 07:57:57 cal103 Exp $
@


4.11
log
@WCSLIB 4.11
@
text
@d3 1
a3 1
  WCSLIB 4.11 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: spc_f.c,v 4.10.1.2 2012/02/20 23:23:24 cal103 Exp cal103 $
@


4.11.1.1
log
@WCSLIB 4.11 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.11 2012/02/20 23:30:02 cal103 Exp $
@


4.10
log
@WCSLIB 4.10
@
text
@d3 1
a3 1
  WCSLIB 4.10 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: spc_f.c,v 4.9.1.1 2012/01/24 05:41:46 cal103 Exp cal103 $
d450 1
d452 1
a456 1
  wcsutil_blank_fill(9, ctypeS2_);
d458 1
@


4.10.1.1
log
@WCSLIB 4.10 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.10 2012/02/05 23:41:44 cal103 Exp $
@


4.10.1.2
log
@Bug fix in spctrne_() for handling ctypeS2.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.10.1.1 2012/02/05 23:42:47 cal103 Exp cal103 $
a449 1
  strncpy(ctypeS2_, ctypeS2, 8);
a450 1
  ctypeS2_[8] = '\0';
d455 1
a456 1
  wcsutil_blank_fill(8, ctypeS2);
@


4.9
log
@WCSLIB 4.9
@
text
@d3 1
a3 1
  WCSLIB 4.9 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: spc_f.c,v 4.8.1.2 2012/01/24 05:23:50 cal103 Exp cal103 $
@


4.9.1.1
log
@WCSLIB 4.9 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.9 2012/01/24 05:40:29 cal103 Exp $
@


4.8
log
@WCSLIB 4.8
@
text
@d3 2
a4 2
  WCSLIB 4.8 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2011, Mark Calabretta
d31 1
a31 1
  $Id: spc_f.c,v 4.7.1.4 2011/08/13 03:14:11 cal103 Exp cal103 $
@


4.8.1.1
log
@WCSLIB 4.8 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
@


4.8.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2012, Mark Calabretta
d31 1
a31 1
  $Id: spc_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
@


4.7
log
@WCSLIB 4.7
@
text
@d3 1
a3 1
  WCSLIB 4.7 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: spc_f.c,v 4.6.1.2 2011/01/14 06:34:01 cal103 Exp cal103 $
d34 1
d37 1
d43 12
a54 11
#define spcini_ F77_FUNC(spcini, SPCINI)
#define spcput_ F77_FUNC(spcput, SPCPUT)
#define spcget_ F77_FUNC(spcget, SPCGET)
#define spcprt_ F77_FUNC(spcprt, SPCPRT)
#define spcset_ F77_FUNC(spcset, SPCSET)
#define spcx2s_ F77_FUNC(spcx2s, SPCX2S)
#define spcs2x_ F77_FUNC(spcs2x, SPCS2X)
#define spctyp_ F77_FUNC(spctyp, SPCTYP)
#define spcspx_ F77_FUNC(spcspx, SPCSPX)
#define spcxps_ F77_FUNC(spcxps, SPCXPS)
#define spctrn_ F77_FUNC(spctrn, SPCTRN)
d57 12
a68 6
#define spcptc_ F77_FUNC(spcptc, SPCPTC)
#define spcptd_ F77_FUNC(spcptd, SPCPTD)
#define spcpti_ F77_FUNC(spcpti, SPCPTI)
#define spcgtc_ F77_FUNC(spcgtc, SPCGTC)
#define spcgtd_ F77_FUNC(spcgtd, SPCGTD)
#define spcgti_ F77_FUNC(spcgti, SPCGTI)
d80 1
d159 1
a159 1
  int m;
d163 1
d204 13
d241 8
d252 4
d299 1
a299 1
int spctyp_(
d307 2
a308 1
  int *restreq)
d317 2
a318 2
  status = spctyp(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                  restreq);
d333 17
d352 1
a352 1
int spcspx_(
d361 2
a362 1
  double *dXdS)
d369 20
a388 2
  return spcspx(ctypeS_, *crvalS, *restfrq, *restwav, ptype, xtype, restreq,
                crvalX, dXdS);
d393 1
a393 1
int spcxps_(
d402 2
a403 1
  double *dSdX)
d410 20
a429 2
  return spcxps(ctypeS_, *crvalX, *restfrq, *restwav, ptype, xtype, restreq,
                crvalS, dSdX);
d434 1
a434 1
int spctrn_(
d442 2
a443 1
  double *cdeltS2)
d452 2
a453 2
  status = spctrn(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                  ctypeS2_,  crvalS2,  cdeltS2);
d461 17
@


4.7.1.1
log
@WCSLIB 4.7 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.7 2011/02/07 07:03:42 cal103 Exp $
@


4.7.1.2
log
@Added support for the new error messaging system based on wcserr.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.7.1.1 2011/02/07 07:04:23 cal103 Exp cal103 $
a35 1
#include <wcserr.h>
d41 11
a51 12
#define spcini_  F77_FUNC(spcini,  SPCINI)
#define spcput_  F77_FUNC(spcput,  SPCPUT)
#define spcget_  F77_FUNC(spcget,  SPCGET)
#define spcfree_ F77_FUNC(spcfree, SPCFREE)
#define spcprt_  F77_FUNC(spcprt,  SPCPRT)
#define spcset_  F77_FUNC(spcset,  SPCSET)
#define spcx2s_  F77_FUNC(spcx2s,  SPCX2S)
#define spcs2x_  F77_FUNC(spcs2x,  SPCS2X)
#define spctype_ F77_FUNC(spctype, SPCTYPE)
#define spcspxe_ F77_FUNC(spcspxe, SPCSPXE)
#define spcxpse_ F77_FUNC(spcxpse, SPCXPSE)
#define spctrne_ F77_FUNC(spctrne, SPCTRNE)
d54 6
a59 12
#define spcptc_  F77_FUNC(spcptc,  SPCPTC)
#define spcptd_  F77_FUNC(spcptd,  SPCPTD)
#define spcpti_  F77_FUNC(spcpti,  SPCPTI)
#define spcgtc_  F77_FUNC(spcgtc,  SPCGTC)
#define spcgtd_  F77_FUNC(spcgtd,  SPCGTD)
#define spcgti_  F77_FUNC(spcgti,  SPCGTI)

/* Deprecated. */
#define spctyp_  F77_FUNC(spctyp,  SPCTYP)
#define spcspx_  F77_FUNC(spcspx,  SPCSPX)
#define spcxps_  F77_FUNC(spcxps,  SPCXPS)
#define spctrn_  F77_FUNC(spctrn,  SPCTRN)
a70 1
#define SPC_ERR     202
a192 3
  case SPC_ERR:
    *(void **)value = spcp->err;
    break;
a216 8
int spcfree_(int *spc)

{
  return spcfree((struct spcprm *)spc);
}

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

d263 1
a263 1
int spctype_(
d271 1
a271 2
  int *restreq,
  iptr err)
d280 2
a281 2
  status = spctype(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                   restreq, (struct wcserr **)err);
a295 17
/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */

int spctyp_(
  const char ctypei[8],
  char stype[4],
  char scode[3],
  char sname[21],
  char units[7],
  char ptype[1],
  char xtype[1],
  int *restreq)

{
  return spctype_(ctypei, stype, scode, sname, units, ptype, xtype, restreq,
                  0x0);
}

d298 1
a298 1
int spcspxe_(
d307 1
a307 2
  double *dXdS,
  iptr err)
d314 2
a315 20
  return spcspxe(ctypeS_, *crvalS, *restfrq, *restwav, ptype, xtype, restreq,
                 crvalX, dXdS, (struct wcserr **)err);
}

/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */

int spcspx_(
  const char ctypeS[8],
  const double *crvalS,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalX,
  double *dXdS)

{
  return spcspxe_(ctypeS, crvalS, restfrq, restwav, ptype, xtype, restreq,
                  crvalX, dXdS, 0x0);
d320 1
a320 1
int spcxpse_(
d329 1
a329 2
  double *dSdX,
  iptr err)
d336 2
a337 20
  return spcxpse(ctypeS_, *crvalX, *restfrq, *restwav, ptype, xtype, restreq,
                 crvalS, dSdX, (struct wcserr **)err);
}

/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */

int spcxps_(
  const char ctypeS[8],
  const double *crvalX,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalS,
  double *dSdX)

{
  return spcxpse_(ctypeS, crvalX, restfrq, restwav, ptype, xtype, restreq,
                  crvalS, dSdX, 0x0);
d342 1
a342 1
int spctrne_(
d350 1
a350 2
  double *cdeltS2,
  iptr err)
d359 2
a360 2
  status = spctrne(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                   ctypeS2_,  crvalS2,  cdeltS2, (struct wcserr **)err);
a367 17
/* : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :  */

int spctrn_(
  const char ctypeS1[8],
  const double *crvalS1,
  const double *cdeltS1,
  const double *restfrq,
  const double *restwav,
  char   ctypeS2[8],
  double *crvalS2,
  double *cdeltS2)

{
  return spctrne_(ctypeS1, crvalS1, cdeltS1, restfrq, restwav, ctypeS2,
                  crvalS2, cdeltS2, 0x0);
}

@


4.7.1.3
log
@In spcprt_(), try calling fflush() to flush the Fortran I/O buffers
before calling spcprt().
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.7.1.2 2011/08/09 03:00:46 cal103 Exp cal103 $
a33 1
#include <stdio.h>
a239 4
  /* This may or may not force the Fortran I/O buffers to be flushed.  If
   * not, try CALL FLUSH(6) before calling SPCPRT in the Fortran code. */
  fflush(NULL);

@


4.7.1.4
log
@In spcget_(): for SPC_ERR, copy the contents of the wcserr struct rather
than just returning the address.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.7.1.3 2011/08/12 08:38:32 cal103 Exp cal103 $
d159 1
a159 1
  int  k, m;
a162 1
  const int *ispcp;
d204 1
a204 11
    /* Copy the contents of the wcserr struct. */
    if (spcp->err) {
      ispcp = (int *)(spcp->err);
      for (k = 0; k < ERRLEN; k++) {
        *(ivalp++) = *(ispcp++);
      }
    } else {
      for (k = 0; k < ERRLEN; k++) {
        *(ivalp++) = 0;
      }
    }
@


4.6
log
@WCSLIB 4.6
@
text
@d3 2
a4 2
  WCSLIB 4.6 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2010, Mark Calabretta
d31 1
a31 1
  $Id: spc_f.c,v 4.5.1.2 2010/11/15 07:19:41 cal103 Exp cal103 $
@


4.6.1.1
log
@WCSLIB 4.6 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.6 2010/11/16 06:15:32 cal103 Exp $
@


4.6.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2011, Mark Calabretta
d31 1
a31 1
  $Id: spc_f.c,v 4.6.1.1 2010/11/16 06:16:19 cal103 Exp cal103 $
@


4.5
log
@WCSLIB 4.5
@
text
@d3 1
a3 1
  WCSLIB 4.5 - an implementation of the FITS WCS standard.
d31 1
a31 1
  $Id: spc_f.c,v 4.4.1.3 2010/07/07 07:02:50 cal103 Exp cal103 $
d54 7
d129 15
d200 15
@


4.5.1.1
log
@WCSLIB 4.5 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.5 2010/07/16 07:01:26 cal103 Exp $
@


4.5.1.2
log
@Added new type-specific variants of SPCPUT and SPCGET.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.5.1.1 2010/07/16 07:05:32 cal103 Exp cal103 $
a53 7
#define spcptc_ F77_FUNC(spcptc, SPCPTC)
#define spcptd_ F77_FUNC(spcptd, SPCPTD)
#define spcpti_ F77_FUNC(spcpti, SPCPTI)
#define spcgtc_ F77_FUNC(spcgtc, SPCGTC)
#define spcgtd_ F77_FUNC(spcgtd, SPCGTD)
#define spcgti_ F77_FUNC(spcgti, SPCGTI)

a121 15
int spcptc_(int *spc, const int *what, const char *value, const int *m)
{
  return spcput_(spc, what, value, m);
}

int spcptd_(int *spc, const int *what, const double *value, const int *m)
{
  return spcput_(spc, what, value, m);
}

int spcpti_(int *spc, const int *what, const int *value, const int *m)
{
  return spcput_(spc, what, value, m);
}

a177 15
int spcgtc_(const int *spc, const int *what, char *value)
{
  return spcget_(spc, what, value);
}

int spcgtd_(const int *spc, const int *what, double *value)
{
  return spcget_(spc, what, value);
}

int spcgti_(const int *spc, const int *what, int *value)
{
  return spcget_(spc, what, value);
}

@


4.4
log
@WCSLIB 4.4
@
text
@d3 2
a4 2
  WCSLIB 4.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2009, Mark Calabretta
d31 1
a31 1
  $Id: spc_f.c,v 4.3.1.2 2009/07/22 07:18:23 cal103 Exp cal103 $
d52 1
d330 26
@


4.4.1.1
log
@WCSLIB 4.4 development branch.
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.4 2009/08/06 07:51:45 cal103 Exp $
@


4.4.1.2
log
@Updated date in copyright notice.
@
text
@d4 1
a4 1
  Copyright (C) 1995-2010, Mark Calabretta
d31 1
a31 1
  $Id: spc_f.c,v 4.4.1.1 2009/08/10 08:54:51 cal103 Exp cal103 $
@


4.4.1.3
log
@Added spcaips_().
@
text
@d31 1
a31 1
  $Id: spc_f.c,v 4.4.1.2 2010/01/19 03:44:35 cal103 Exp cal103 $
a51 1
#define spcaips_ F77_FUNC(spcaips, SPCAIPS)
a328 26

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

int spcaips_(
  const char ctypeA[8],
  int *velref,
  char ctype[8],
  char specsys[8])

{
  int status;
  char ctypeA_[9], ctype_[9], specsys_[9];

  strncpy(ctypeA_, ctypeA, 8);
  ctypeA_[8] = '\0';

  status = spcaips(ctypeA_, *velref, ctype_, specsys_);

  wcsutil_blank_fill(9, ctype_);
  strncpy(ctype, ctype_, 8);

  wcsutil_blank_fill(9, specsys_);
  strncpy(specsys, specsys_, 8);

  return status;
}
@


4.3
log
@WCSLIB 4.3
@
text
@d3 2
a4 2
    WCSLIB 4.3 - an implementation of the FITS WCS standard.
    Copyright (C) 1995-2007, Mark Calabretta
d6 1
a6 1
    This file is part of WCSLIB.
d8 24
a31 24
    WCSLIB is free software: you can redistribute it and/or modify it under
    the terms of the GNU Lesser General Public License as published by the
    Free Software Foundation, either version 3 of the License, or (at your
    option) any later version.

    WCSLIB 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 Lesser General Public License for
    more details.

    You should have received a copy of the GNU Lesser General Public License
    along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.

    Correspondence concerning WCSLIB may be directed to:
       Internet email: mcalabre@@atnf.csiro.au
       Postal address: Dr. Mark Calabretta
                       Australia Telescope National Facility, CSIRO
                       PO Box 76
                       Epping NSW 1710
                       AUSTRALIA

    Author: Mark Calabretta, Australia Telescope National Facility
    http://www.atnf.csiro.au/~mcalabre/index.html
    $Id: spc_f.c,v 4.2.1.5 2007/12/03 05:36:01 cal103 Exp cal103 $
d69 1
a69 1
   return spcini((struct spcprm *)spc);
d77 40
a116 40
   const char *cvalp;
   const int  *ivalp;
   const double *dvalp;
   struct spcprm *spcp;

   /* Cast pointers. */
   spcp  = (struct spcprm *)spc;
   cvalp = (const char *)value;
   ivalp = (const int *)value;
   dvalp = (const double *)value;

   spcp->flag = 0;

   switch (*what) {
   case SPC_FLAG:
      spcp->flag = *ivalp;
      break;
   case SPC_TYPE:
      strncpy(spcp->type, cvalp, 4);
      spcp->type[4] = '\0';
      break;
   case SPC_CODE:
      strncpy(spcp->code, cvalp, 3);
      spcp->code[3] = '\0';
      break;
   case SPC_CRVAL:
      spcp->crval = *dvalp;
      break;
   case SPC_RESTFRQ:
      spcp->restfrq = *dvalp;
      break;
   case SPC_RESTWAV:
      spcp->restwav = *dvalp;
      break;
   case SPC_PV:
      spcp->pv[*m] = *dvalp;
      break;
   default:
      return 1;
   }
d118 1
a118 1
   return 0;
d126 47
a172 47
   int m;
   char *cvalp;
   int  *ivalp;
   double *dvalp;
   const struct spcprm *spcp;

   /* Cast pointers. */
   spcp  = (const struct spcprm *)spc;
   cvalp = (char *)value;
   ivalp = (int *)value;
   dvalp = (double *)value;

   switch (*what) {
   case SPC_FLAG:
      *ivalp = spcp->flag;
      break;
   case SPC_TYPE:
      strncpy(cvalp, spcp->type, 4);
      break;
   case SPC_CODE:
      strncpy(cvalp, spcp->code, 3);
      break;
   case SPC_CRVAL:
      *dvalp = spcp->crval;
      break;
   case SPC_RESTFRQ:
      *dvalp = spcp->restfrq;
      break;
   case SPC_RESTWAV:
      *dvalp = spcp->restwav;
      break;
   case SPC_PV:
      for (m = 0; m < 7; m++) {
         *(dvalp++) = spcp->pv[m];
      }
      break;
   case SPC_W:
      for (m = 0; m < 6; m++) {
         *(dvalp++) = spcp->w[m];
      }
      break;
   case SPC_ISGRISM:
      *ivalp = spcp->isGrism;
      break;
   default:
      return 1;
   }
d174 1
a174 1
   return 0;
d182 1
a182 1
   return spcprt((struct spcprm *)spc);
d190 1
a190 1
   return spcset((struct spcprm *)spc);
d196 7
a202 7
   int *spc,
   const int *nx,
   const int *sspec,
   const int *sx,
   const double x[],
   double spec[],
   int stat[])
d205 1
a205 1
   return spcx2s((struct spcprm *)spc, *nx, *sx, *sspec, x, spec, stat);
d211 7
a217 7
   int *spc,
   const int *nspec,
   const int *sspec,
   const int *sx,
   const double spec[],
   double x[],
   int stat[])
d220 1
a220 1
   return spcs2x((struct spcprm *)spc, *nspec, *sspec, *sx, spec, x, stat);
d226 28
a253 28
   const char ctypei[8],
   char stype[4],
   char scode[3],
   char sname[21],
   char units[7],
   char ptype[1],
   char xtype[1],
   int *restreq)

{
   char ctypei_[9], scode_[4], sname_[22], stype_[5], units_[8];
   int status;

   strncpy(ctypei_, ctypei, 8);
   ctypei_[8] = '\0';

   status = spctyp(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                   restreq);

   wcsutil_blank_fill( 5, stype_);
   wcsutil_blank_fill( 4, scode_);
   wcsutil_blank_fill(22, sname_);
   wcsutil_blank_fill( 8, units_);

   strncpy(stype, stype_, 4);
   strncpy(scode, scode_, 3);
   strncpy(sname, sname_, 21);
   strncpy(units, units_, 7);
d255 1
a255 1
   return status;
d261 14
a274 14
   const char ctypeS[8],
   const double *crvalS,
   const double *restfrq,
   const double *restwav,
   char ptype[1],
   char xtype[1],
   int *restreq,
   double *crvalX,
   double *dXdS)

{
   char ctypeS_[9];
   strncpy(ctypeS_, ctypeS, 8);
   ctypeS_[8] = '\0';
d276 2
a277 2
   return spcspx(ctypeS_, *crvalS, *restfrq, *restwav, ptype, xtype, restreq,
                 crvalX, dXdS);
d283 14
a296 14
   const char ctypeS[8],
   const double *crvalX,
   const double *restfrq,
   const double *restwav,
   char ptype[1],
   char xtype[1],
   int *restreq,
   double *crvalS,
   double *dSdX)

{
   char ctypeS_[9];
   strncpy(ctypeS_, ctypeS, 8);
   ctypeS_[8] = '\0';
d298 2
a299 2
   return spcxps(ctypeS_, *crvalX, *restfrq, *restwav, ptype, xtype, restreq,
                 crvalS, dSdX);
d305 8
a312 8
   const char ctypeS1[8],
   const double *crvalS1,
   const double *cdeltS1,
   const double *restfrq,
   const double *restwav,
   char   ctypeS2[8],
   double *crvalS2,
   double *cdeltS2)
d315 2
a316 2
   int status;
   char ctypeS1_[9], ctypeS2_[9];
d318 2
a319 2
   strncpy(ctypeS1_, ctypeS1, 8);
   ctypeS1_[8] = '\0';
d321 2
a322 2
   status = spctrn(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                   ctypeS2_,  crvalS2,  cdeltS2);
d324 2
a325 2
   wcsutil_blank_fill(9, ctypeS2_);
   strncpy(ctypeS2, ctypeS2_, 8);
d327 1
a327 1
   return status;
@


4.3.1.1
log
@WCSLIB 4.3 development branch.
@
text
@d3 2
a4 2
    WCSLIB 4.4 - an implementation of the FITS WCS standard.
    Copyright (C) 1995-2008, Mark Calabretta
d31 1
a31 1
    $Id: spc_f.c,v 4.3 2007/12/27 05:48:07 cal103 Exp cal103 $
@


4.3.1.2
log
@Changed indentation.
@
text
@d3 2
a4 2
  WCSLIB 4.4 - an implementation of the FITS WCS standard.
  Copyright (C) 1995-2009, Mark Calabretta
d6 1
a6 1
  This file is part of WCSLIB.
d8 24
a31 24
  WCSLIB is free software: you can redistribute it and/or modify it under the
  terms of the GNU Lesser General Public License as published by the Free
  Software Foundation, either version 3 of the License, or (at your option)
  any later version.

  WCSLIB 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 Lesser General Public License for
  more details.

  You should have received a copy of the GNU Lesser General Public License
  along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.

  Correspondence concerning WCSLIB may be directed to:
    Internet email: mcalabre@@atnf.csiro.au
    Postal address: Dr. Mark Calabretta
                    Australia Telescope National Facility, CSIRO
                    PO Box 76
                    Epping NSW 1710
                    AUSTRALIA

  Author: Mark Calabretta, Australia Telescope National Facility
  http://www.atnf.csiro.au/~mcalabre/index.html
  $Id: spc_f.c,v 4.3.1.1 2007/12/27 13:25:03 cal103 Exp cal103 $
d69 1
a69 1
  return spcini((struct spcprm *)spc);
d77 40
a116 40
  const char *cvalp;
  const int  *ivalp;
  const double *dvalp;
  struct spcprm *spcp;

  /* Cast pointers. */
  spcp  = (struct spcprm *)spc;
  cvalp = (const char *)value;
  ivalp = (const int *)value;
  dvalp = (const double *)value;

  spcp->flag = 0;

  switch (*what) {
  case SPC_FLAG:
    spcp->flag = *ivalp;
    break;
  case SPC_TYPE:
    strncpy(spcp->type, cvalp, 4);
    spcp->type[4] = '\0';
    break;
  case SPC_CODE:
    strncpy(spcp->code, cvalp, 3);
    spcp->code[3] = '\0';
    break;
  case SPC_CRVAL:
    spcp->crval = *dvalp;
    break;
  case SPC_RESTFRQ:
    spcp->restfrq = *dvalp;
    break;
  case SPC_RESTWAV:
    spcp->restwav = *dvalp;
    break;
  case SPC_PV:
    spcp->pv[*m] = *dvalp;
    break;
  default:
    return 1;
  }
d118 1
a118 1
  return 0;
d126 47
a172 47
  int m;
  char *cvalp;
  int  *ivalp;
  double *dvalp;
  const struct spcprm *spcp;

  /* Cast pointers. */
  spcp  = (const struct spcprm *)spc;
  cvalp = (char *)value;
  ivalp = (int *)value;
  dvalp = (double *)value;

  switch (*what) {
  case SPC_FLAG:
    *ivalp = spcp->flag;
    break;
  case SPC_TYPE:
    strncpy(cvalp, spcp->type, 4);
    break;
  case SPC_CODE:
    strncpy(cvalp, spcp->code, 3);
    break;
  case SPC_CRVAL:
    *dvalp = spcp->crval;
    break;
  case SPC_RESTFRQ:
    *dvalp = spcp->restfrq;
    break;
  case SPC_RESTWAV:
    *dvalp = spcp->restwav;
    break;
  case SPC_PV:
    for (m = 0; m < 7; m++) {
      *(dvalp++) = spcp->pv[m];
    }
    break;
  case SPC_W:
    for (m = 0; m < 6; m++) {
      *(dvalp++) = spcp->w[m];
    }
    break;
  case SPC_ISGRISM:
    *ivalp = spcp->isGrism;
    break;
  default:
    return 1;
  }
d174 1
a174 1
  return 0;
d182 1
a182 1
  return spcprt((struct spcprm *)spc);
d190 1
a190 1
  return spcset((struct spcprm *)spc);
d196 7
a202 7
  int *spc,
  const int *nx,
  const int *sspec,
  const int *sx,
  const double x[],
  double spec[],
  int stat[])
d205 1
a205 1
  return spcx2s((struct spcprm *)spc, *nx, *sx, *sspec, x, spec, stat);
d211 7
a217 7
  int *spc,
  const int *nspec,
  const int *sspec,
  const int *sx,
  const double spec[],
  double x[],
  int stat[])
d220 1
a220 1
  return spcs2x((struct spcprm *)spc, *nspec, *sspec, *sx, spec, x, stat);
d226 28
a253 28
  const char ctypei[8],
  char stype[4],
  char scode[3],
  char sname[21],
  char units[7],
  char ptype[1],
  char xtype[1],
  int *restreq)

{
  char ctypei_[9], scode_[4], sname_[22], stype_[5], units_[8];
  int status;

  strncpy(ctypei_, ctypei, 8);
  ctypei_[8] = '\0';

  status = spctyp(ctypei_, stype_, scode_, sname_, units_, ptype, xtype,
                  restreq);

  wcsutil_blank_fill( 5, stype_);
  wcsutil_blank_fill( 4, scode_);
  wcsutil_blank_fill(22, sname_);
  wcsutil_blank_fill( 8, units_);

  strncpy(stype, stype_, 4);
  strncpy(scode, scode_, 3);
  strncpy(sname, sname_, 21);
  strncpy(units, units_, 7);
d255 1
a255 1
  return status;
d261 14
a274 14
  const char ctypeS[8],
  const double *crvalS,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalX,
  double *dXdS)

{
  char ctypeS_[9];
  strncpy(ctypeS_, ctypeS, 8);
  ctypeS_[8] = '\0';
d276 2
a277 2
  return spcspx(ctypeS_, *crvalS, *restfrq, *restwav, ptype, xtype, restreq,
                crvalX, dXdS);
d283 14
a296 14
  const char ctypeS[8],
  const double *crvalX,
  const double *restfrq,
  const double *restwav,
  char ptype[1],
  char xtype[1],
  int *restreq,
  double *crvalS,
  double *dSdX)

{
  char ctypeS_[9];
  strncpy(ctypeS_, ctypeS, 8);
  ctypeS_[8] = '\0';
d298 2
a299 2
  return spcxps(ctypeS_, *crvalX, *restfrq, *restwav, ptype, xtype, restreq,
                crvalS, dSdX);
d305 8
a312 8
  const char ctypeS1[8],
  const double *crvalS1,
  const double *cdeltS1,
  const double *restfrq,
  const double *restwav,
  char   ctypeS2[8],
  double *crvalS2,
  double *cdeltS2)
d315 2
a316 2
  int status;
  char ctypeS1_[9], ctypeS2_[9];
d318 2
a319 2
  strncpy(ctypeS1_, ctypeS1, 8);
  ctypeS1_[8] = '\0';
d321 2
a322 2
  status = spctrn(ctypeS1_, *crvalS1, *cdeltS1, *restfrq, *restwav,
                  ctypeS2_,  crvalS2,  cdeltS2);
d324 2
a325 2
  wcsutil_blank_fill(9, ctypeS2_);
  strncpy(ctypeS2, ctypeS2_, 8);
d327 1
a327 1
  return status;
@


4.2
log
@WCSLIB 4.2
@
text
@d2 30
a31 29
*
*   WCSLIB 4.2 - an implementation of the FITS WCS convention.
*   Copyright (C) 1995-2005, Mark Calabretta
*
*   WCSLIB is free software; you can redistribute it and/or modify it under
*   the terms of the GNU General Public License as published by the Free
*   Software Foundation; either version 2 of the License, or (at your option)
*   any later version.
*
*   WCSLIB 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 General Public License for more
*   details.
*
*   You should have received a copy of the GNU General Public License along
*   with WCSLIB; if not, write to the Free Software Foundation, Inc.,
*   59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
*
*   Correspondence concerning WCSLIB may be directed to:
*      Internet email: mcalabre@@atnf.csiro.au
*      Postal address: Dr. Mark Calabretta
*                      Australia Telescope National Facility, CSIRO
*                      PO Box 76
*                      Epping NSW 1710
*                      AUSTRALIA
*
*   Author: Mark Calabretta, Australia Telescope National Facility
*   http://www.atnf.csiro.au/~mcalabre/index.html
*   $Id: spc_f.c,v 4.1 2005/08/27 01:31:38 cal103 Exp cal103 $
d39 14
@


4.2.1.1
log
@WCSLIB 4.2 development branch.
@
text
@d3 1
a3 1
*   WCSLIB 4.3 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   $Id: spc_f.c,v 4.2 2005/09/21 13:25:32 cal103 Exp cal103 $
@


4.2.1.2
log
@Do Fortran name mangling using the F77_FUNC(name, NAME) macro defined in
config.h by 'configure'.
@
text
@d4 1
a4 1
*   Copyright (C) 1995-2007, Mark Calabretta
d30 1
a30 1
*   $Id: spc_f.c,v 4.2.1.1 2005/12/05 01:43:47 cal103 Exp cal103 $
a37 14
/* Fortran name mangling. */
#include <config.h>
#define spcini_ F77_FUNC(spcini, SPCINI)
#define spcput_ F77_FUNC(spcput, SPCPUT)
#define spcget_ F77_FUNC(spcget, SPCGET)
#define spcprt_ F77_FUNC(spcprt, SPCPRT)
#define spcset_ F77_FUNC(spcset, SPCSET)
#define spcx2s_ F77_FUNC(spcx2s, SPCX2S)
#define spcs2x_ F77_FUNC(spcs2x, SPCS2X)
#define spctyp_ F77_FUNC(spctyp, SPCTYP)
#define spcspx_ F77_FUNC(spcspx, SPCSPX)
#define spcxps_ F77_FUNC(spcxps, SPCXPS)
#define spctrn_ F77_FUNC(spctrn, SPCTRN)

@


4.2.1.3
log
@Include config_f77.h (which itself includes config.h) rather than config.h.
@
text
@d30 1
a30 1
*   $Id: spc_f.c,v 4.2.1.2 2007/07/09 08:48:47 cal103 Exp cal103 $
d39 1
a39 1
#include <config_f77.h>
@


4.2.1.4
log
@Renamed config_f77.h -> wcsconfig_f77.h.
@
text
@d30 1
a30 1
*   $Id: spc_f.c,v 4.2.1.3 2007/07/12 01:41:04 cal103 Exp cal103 $
d39 1
a39 1
#include <wcsconfig_f77.h>
@


4.2.1.5
log
@Switched to LGPL 3.0.
@
text
@d2 29
a30 30

    WCSLIB 4.3 - an implementation of the FITS WCS standard.
    Copyright (C) 1995-2007, Mark Calabretta

    This file is part of WCSLIB.

    WCSLIB is free software: you can redistribute it and/or modify it under
    the terms of the GNU Lesser General Public License as published by the
    Free Software Foundation, either version 3 of the License, or (at your
    option) any later version.

    WCSLIB 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 Lesser General Public License for
    more details.

    You should have received a copy of the GNU Lesser General Public License
    along with WCSLIB.  If not, see <http://www.gnu.org/licenses/>.

    Correspondence concerning WCSLIB may be directed to:
       Internet email: mcalabre@@atnf.csiro.au
       Postal address: Dr. Mark Calabretta
                       Australia Telescope National Facility, CSIRO
                       PO Box 76
                       Epping NSW 1710
                       AUSTRALIA

    Author: Mark Calabretta, Australia Telescope National Facility
    http://www.atnf.csiro.au/~mcalabre/index.html
    $Id: spc_f.c,v 4.2.1.4 2007/08/08 04:41:08 cal103 Exp cal103 $
@


4.1
log
@WCSLIB 4.1: added wrappers for spctyp(), spcspx(), spcxps() and spctrn();
removed support for K&R C.
@
text
@d3 1
a3 1
*   WCSLIB 4.1 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   $Id: spc_f.c,v 4.0 2005/02/04 12:37:24 cal103 Exp cal103 $
@


4.0
log
@WCSLIB 4.0: changed from LGPL to GPL.
@
text
@d3 1
a3 1
*   WCSLIB 4.0 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   $Id: spc_f.c,v 3.6 2004/08/24 08:31:49 cal103 Exp cal103 $
d34 2
d51 1
a51 3
int spcini_(spc)

int *spc;
d59 1
a59 6
int spcput_(spc, what, value, m)

int *spc;
const int *what;
const void *value;
const int *m;
d108 1
a108 5
int spcget_(spc, what, value)

const int *spc;
const int *what;
void *value;
d164 1
a164 1
int spcprt_(spc)
d166 7
a172 1
int *spc;
d175 1
a175 1
   return spcprt((struct spcprm *)spc);
d180 14
a193 1
int spcset_(spc)
d195 8
a202 1
int *spc;
d205 1
a205 1
   return spcset((struct spcprm *)spc);
d210 19
a228 1
int spcx2s_(spc, nx, sx, sspec, x, spec, stat)
d230 25
a254 5
int *spc;
const int *nx, *sspec, *sx;
const double x[];
double spec[];
int stat[];
d257 6
a262 1
   return spcx2s((struct spcprm *)spc, *nx, *sx, *sspec, x, spec, stat);
d267 10
a276 1
int spcs2x_(spc, nspec, sspec, sx, spec, x, stat)
d278 20
a297 5
int *spc;
const int *nspec, *sspec, *sx;
const double spec[];
double x[];
int stat[];
d300 13
a312 1
   return spcs2x((struct spcprm *)spc, *nspec, *sspec, *sx, spec, x, stat);
@


3.6
log
@WCSLIB 3.6
@
text
@d3 2
a4 2
*   WCSLIB 3.6 - an implementation of the FITS WCS convention.
*   Copyright (C) 1995-2004, Mark Calabretta
d6 4
a9 4
*   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.
d11 4
a14 4
*   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.
d16 3
a18 3
*   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.
d30 1
a30 1
*   $Id: spc_f.c,v 3.5 2004/06/28 05:01:04 mcalabre Exp mcalabre $
@


3.5
log
@WCSLIB 3.5
@
text
@d3 1
a3 1
*   WCSLIB 3.5 - an implementation of the FITS WCS convention.
d30 1
a30 1
*   $Id: spc_f.c,v 3.4 2004/02/11 00:01:47 mcalabre Exp mcalabre $
@


3.4
log
@WCSLIB 3.4
@
text
@d3 1
a3 1
*   WCSLIB 3.4 - an implementation of the FITS WCS convention.
d29 2
a30 1
*   $Id: spc_f.c,v 3.3 2003/10/21 08:44:04 mcalabre Exp mcalabre $
@


3.3
log
@WCSLIB 3.3
@
text
@d3 2
a4 2
*   WCSLIB 3.3 - an implementation of the FITS WCS convention.
*   Copyright (C) 1995-2003, Mark Calabretta
d29 1
a29 1
*   $Id: spc_f.c,v 3.2 2003/09/09 03:56:19 mcalabre Exp mcalabre $
@


3.2
log
@WCSLIB 3.2
@
text
@d3 1
a3 1
*   WCSLIB 3.2 - an implementation of the FITS WCS convention.
d29 1
a29 1
*   $Id: spc_f.c,v 3.1 2003/04/28 04:37:01 mcalabre Exp mcalabre $
@


3.1
log
@WCSLIB 3.1
In spcput_(), set spc.flag = 0.
@
text
@d3 1
a3 1
*   WCSLIB 3.1 - an implementation of the FITS WCS convention.
d29 1
a29 1
*   $Id: spc_f.c,v 3.0 2003/04/01 05:19:47 mcalabre Exp mcalabre $
@


3.0
log
@WCSLIB 3.0
@
text
@d3 1
a3 1
*   WCSLIB 3.0 - an implementation of the FITS WCS convention.
d29 1
a29 1
*   $Id$
d76 2
@
