Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade to wcslib-4.15

  • Loading branch information...
commit 1710ea1bf59e50e03a0f19d4db69813f077730e0 1 parent 488b940
@mdboom mdboom authored
Showing with 397 additions and 346 deletions.
  1. +3 −3 cextern/wcslib/C/GNUmakefile
  2. +2 −2 cextern/wcslib/C/cel.c
  3. +3 −3 cextern/wcslib/C/cel.h
  4. +2 −2 cextern/wcslib/C/fitshdr.h
  5. +2 −2 cextern/wcslib/C/fitshdr.l
  6. +2 −2 cextern/wcslib/C/flexed/fitshdr.c
  7. +2 −2 cextern/wcslib/C/flexed/wcsbth.c
  8. +2 −2 cextern/wcslib/C/flexed/wcspih.c
  9. +128 −126 cextern/wcslib/C/flexed/wcsulex.c
  10. +46 −44 cextern/wcslib/C/flexed/wcsutrn.c
  11. +2 −2 cextern/wcslib/C/getwcstab.c
  12. +2 −2 cextern/wcslib/C/getwcstab.h
  13. +2 −2 cextern/wcslib/C/lin.c
  14. +3 −3 cextern/wcslib/C/lin.h
  15. +2 −2 cextern/wcslib/C/log.c
  16. +3 −3 cextern/wcslib/C/log.h
  17. +2 −2 cextern/wcslib/C/prj.c
  18. +3 −3 cextern/wcslib/C/prj.h
  19. +13 −9 cextern/wcslib/C/spc.c
  20. +23 −15 cextern/wcslib/C/spc.h
  21. +2 −2 cextern/wcslib/C/sph.c
  22. +3 −3 cextern/wcslib/C/sph.h
  23. +2 −2 cextern/wcslib/C/spx.c
  24. +3 −3 cextern/wcslib/C/spx.h
  25. +2 −2 cextern/wcslib/C/tab.c
  26. +3 −3 cextern/wcslib/C/tab.h
  27. +2 −2 cextern/wcslib/C/wcs.c
  28. +3 −3 cextern/wcslib/C/wcs.h
  29. +2 −2 cextern/wcslib/C/wcsbth.l
  30. +2 −2 cextern/wcslib/C/wcserr.c
  31. +2 −2 cextern/wcslib/C/wcserr.h
  32. +2 −2 cextern/wcslib/C/wcsfix.c
  33. +3 −3 cextern/wcslib/C/wcsfix.h
  34. +2 −2 cextern/wcslib/C/wcshdr.c
  35. +3 −3 cextern/wcslib/C/wcshdr.h
  36. +3 −3 cextern/wcslib/C/wcslib.h
  37. +2 −2 cextern/wcslib/C/wcsmath.h
  38. +2 −2 cextern/wcslib/C/wcspih.l
  39. +2 −2 cextern/wcslib/C/wcsprintf.c
  40. +3 −3 cextern/wcslib/C/wcsprintf.h
  41. +2 −2 cextern/wcslib/C/wcstrig.c
  42. +2 −2 cextern/wcslib/C/wcstrig.h
  43. +6 −4 cextern/wcslib/C/wcsulex.l
  44. +2 −2 cextern/wcslib/C/wcsunits.c
  45. +9 −6 cextern/wcslib/C/wcsunits.h
  46. +2 −2 cextern/wcslib/C/wcsutil.c
  47. +2 −2 cextern/wcslib/C/wcsutil.h
  48. +5 −3 cextern/wcslib/C/wcsutrn.l
  49. +19 −1 cextern/wcslib/CHANGES
  50. +5 −5 cextern/wcslib/GNUmakefile
  51. +4 −4 cextern/wcslib/INSTALL
  52. +3 −3 cextern/wcslib/README
  53. +3 −2 cextern/wcslib/THANKS
  54. +10 −1 cextern/wcslib/VALIDATION
  55. +12 −12 cextern/wcslib/configure
  56. +3 −3 cextern/wcslib/configure.ac
  57. +1 −1  cextern/wcslib/flavours
  58. +4 −4 cextern/wcslib/makedefs.in
  59. +2 −2 cextern/wcslib/wcsconfig.h.in
  60. +2 −2 cextern/wcslib/wcsconfig_f77.h.in
  61. +2 −2 cextern/wcslib/wcsconfig_tests.h.in
  62. +2 −2 cextern/wcslib/wcsconfig_utils.h.in
View
6 cextern/wcslib/C/GNUmakefile
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
-# GNU makefile for building WCSLIB 4.14 and its test suite.
+# GNU makefile for building WCSLIB 4.15 and its test suite.
#
# Summary of the main targets
# ---------------------------
@@ -31,7 +31,7 @@
#
# Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
# http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+# $Id: GNUmakefile,v 4.15 2012/09/26 14:26:05 cal103 Exp $
#-----------------------------------------------------------------------------
# Get configure settings.
include ../makedefs
@@ -72,7 +72,7 @@ TEST_N := tlin tlog tprj1 tsph tsphdpa tspx ttab1 twcs twcssub tpih1 tbth1 \
tfitshdr tunits twcsfix
# ...and unofficial test programs.
-TEST_n := tspcaips tspctrne twcs_locale
+TEST_n := tspcaips tspcspxe tspctrne twcs_locale
# Test programs that require CFITSIO (they don't need PGPLOT).
TEST_C := twcstab twcshdr
View
4 cextern/wcslib/C/cel.c
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: cel.c,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: cel.c,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*===========================================================================*/
#include <math.h>
View
6 cextern/wcslib/C/cel.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,10 +22,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: cel.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: cel.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
-* WCSLIB 4.14 - C routines that implement the FITS World Coordinate System
+* WCSLIB 4.15 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to
*
* "Representations of world coordinates in FITS",
View
4 cextern/wcslib/C/fitshdr.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: fitshdr.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: fitshdr.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
* The Flexible Image Transport System (FITS), a data format widely used in
View
4 cextern/wcslib/C/fitshdr.l
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: fitshdr.l,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: fitshdr.l,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
* fitshdr.l is a Flex description file containing a lexical scanner
View
4 cextern/wcslib/C/flexed/fitshdr.c
@@ -10083,7 +10083,7 @@ char *fitshdrtext;
#line 1 "fitshdr.l"
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -10105,7 +10105,7 @@ char *fitshdrtext;
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: fitshdr.c,v 4.14 2012/07/13 10:02:31 cal103 Exp $
+ $Id: fitshdr.c,v 4.15 2012/09/26 14:26:06 cal103 Exp $
*=============================================================================
*
* fitshdr.l is a Flex description file containing a lexical scanner
View
4 cextern/wcslib/C/flexed/wcsbth.c
@@ -16669,7 +16669,7 @@ char *wcsbthtext;
#line 1 "wcsbth.l"
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -16691,7 +16691,7 @@ char *wcsbthtext;
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: wcsbth.c,v 4.14 2012/07/13 10:02:31 cal103 Exp $
+ $Id: wcsbth.c,v 4.15 2012/09/26 14:26:06 cal103 Exp $
*=============================================================================
*
* wcsbth.l is a Flex description file containing the definition of a lexical
View
4 cextern/wcslib/C/flexed/wcspih.c
@@ -8153,7 +8153,7 @@ char *wcspihtext;
#line 1 "wcspih.l"
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -8175,7 +8175,7 @@ char *wcspihtext;
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: wcspih.c,v 4.14 2012/07/13 10:02:31 cal103 Exp $
+ $Id: wcspih.c,v 4.15 2012/09/26 14:26:06 cal103 Exp $
*=============================================================================
*
* wcspih.l is a Flex description file containing the definition of a lexical
View
254 cextern/wcslib/C/flexed/wcsulex.c
@@ -6860,7 +6860,7 @@ char *wcsulextext;
#line 1 "wcsulex.l"
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -6882,7 +6882,7 @@ char *wcsulextext;
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: wcsulex.c,v 4.14 2012/07/13 10:02:31 cal103 Exp $
+ $Id: wcsulex.c,v 4.15 2012/09/26 14:26:06 cal103 Exp $
*=============================================================================
*
* wcsulex.l is a Flex description file containing the definition of a
@@ -7110,8 +7110,8 @@ YY_DECL
#line 108 "wcsulex.l"
static const char *function = "wcsulexe";
-
- char ctmp[72];
+
+ char ctmp[72];
int bracket = 0;
int operator = 0;
int paren = 0;
@@ -7123,6 +7123,8 @@ YY_DECL
double units[]);
int wcsulexlex_destroy(void);
+ if (err) *err = 0x0;
+
*func = 0;
for (i = 0; i < WCSUNITS_NTYPE; i++) {
units[i] = 0.0;
@@ -7146,7 +7148,7 @@ YY_DECL
fprintf(stderr, "\n%s ->\n", unitstr);
#endif
-#line 7150 "wcsulex.c"
+#line 7152 "wcsulex.c"
if ( !(yy_init) )
{
@@ -7226,7 +7228,7 @@ YY_DECL
case 1:
YY_RULE_SETUP
-#line 146 "wcsulex.l"
+#line 148 "wcsulex.l"
{
/* Pretend initial whitespace doesn't exist. */
yy_set_bol(1);
@@ -7234,7 +7236,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 151 "wcsulex.l"
+#line 153 "wcsulex.l"
{
if (bracket++) {
BEGIN(FLUSH);
@@ -7245,7 +7247,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 159 "wcsulex.l"
+#line 161 "wcsulex.l"
{
status = wcserr_set(WCSERR_SET(UNITSERR_BAD_NUM_MULTIPLIER),
"Invalid exponent in '%s'", unitstr);
@@ -7254,7 +7256,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 165 "wcsulex.l"
+#line 167 "wcsulex.l"
{
factor = 10.0;
BEGIN(EXPON);
@@ -7262,7 +7264,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 170 "wcsulex.l"
+#line 172 "wcsulex.l"
{
*func = 1;
unput('(');
@@ -7271,7 +7273,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 176 "wcsulex.l"
+#line 178 "wcsulex.l"
{
*func = 2;
unput('(');
@@ -7280,7 +7282,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 182 "wcsulex.l"
+#line 184 "wcsulex.l"
{
*func = 3;
unput('(');
@@ -7289,7 +7291,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 188 "wcsulex.l"
+#line 190 "wcsulex.l"
{
/* Leading binary multiply. */
status = wcserr_set(WCSERR_SET(UNITSERR_DANGLING_BINOP),
@@ -7299,12 +7301,12 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 195 "wcsulex.l"
+#line 197 "wcsulex.l"
/* Discard whitespace in INITIAL context. */
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 197 "wcsulex.l"
+#line 199 "wcsulex.l"
{
expon /= 2.0;
unput('(');
@@ -7313,7 +7315,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 203 "wcsulex.l"
+#line 205 "wcsulex.l"
{
/* Gather terms in parentheses. */
yyless(0);
@@ -7322,7 +7324,7 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 209 "wcsulex.l"
+#line 211 "wcsulex.l"
{
if (operator++) {
BEGIN(FLUSH);
@@ -7330,10 +7332,10 @@ YY_RULE_SETUP
}
YY_BREAK
case 13:
-#line 216 "wcsulex.l"
+#line 218 "wcsulex.l"
case 14:
YY_RULE_SETUP
-#line 216 "wcsulex.l"
+#line 218 "wcsulex.l"
{
if (operator++) {
BEGIN(FLUSH);
@@ -7344,7 +7346,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 224 "wcsulex.l"
+#line 226 "wcsulex.l"
{
operator = 0;
yyless(0);
@@ -7352,12 +7354,12 @@ YY_RULE_SETUP
}
YY_BREAK
case 16:
-#line 231 "wcsulex.l"
+#line 233 "wcsulex.l"
case 17:
-#line 232 "wcsulex.l"
+#line 234 "wcsulex.l"
case 18:
YY_RULE_SETUP
-#line 232 "wcsulex.l"
+#line 234 "wcsulex.l"
{
operator = 0;
yyless(0);
@@ -7366,7 +7368,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 238 "wcsulex.l"
+#line 240 "wcsulex.l"
{
bracket = !bracket;
BEGIN(FLUSH);
@@ -7374,7 +7376,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 243 "wcsulex.l"
+#line 245 "wcsulex.l"
{
status = wcserr_set(WCSERR_SET(UNITSERR_BAD_INITIAL_SYMBOL),
"Invalid symbol in INITIAL context in '%s'", unitstr);
@@ -7383,7 +7385,7 @@ YY_RULE_SETUP
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 249 "wcsulex.l"
+#line 251 "wcsulex.l"
{
paren++;
operator = 0;
@@ -7392,7 +7394,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 255 "wcsulex.l"
+#line 257 "wcsulex.l"
{
paren--;
if (paren) {
@@ -7424,14 +7426,14 @@ YY_RULE_SETUP
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 283 "wcsulex.l"
+#line 285 "wcsulex.l"
{
yymore();
}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 287 "wcsulex.l"
+#line 289 "wcsulex.l"
{
factor = 1e-1;
BEGIN(UNITS);
@@ -7439,7 +7441,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 292 "wcsulex.l"
+#line 294 "wcsulex.l"
{
factor = 1e-2;
BEGIN(UNITS);
@@ -7447,7 +7449,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 297 "wcsulex.l"
+#line 299 "wcsulex.l"
{
factor = 1e-3;
BEGIN(UNITS);
@@ -7455,7 +7457,7 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 302 "wcsulex.l"
+#line 304 "wcsulex.l"
{
factor = 1e-6;
BEGIN(UNITS);
@@ -7463,7 +7465,7 @@ YY_RULE_SETUP
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 307 "wcsulex.l"
+#line 309 "wcsulex.l"
{
factor = 1e-9;
BEGIN(UNITS);
@@ -7471,7 +7473,7 @@ YY_RULE_SETUP
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 312 "wcsulex.l"
+#line 314 "wcsulex.l"
{
factor = 1e-12;
BEGIN(UNITS);
@@ -7479,7 +7481,7 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 317 "wcsulex.l"
+#line 319 "wcsulex.l"
{
factor = 1e-15;
BEGIN(UNITS);
@@ -7487,7 +7489,7 @@ YY_RULE_SETUP
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 322 "wcsulex.l"
+#line 324 "wcsulex.l"
{
factor = 1e-18;
BEGIN(UNITS);
@@ -7495,7 +7497,7 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 327 "wcsulex.l"
+#line 329 "wcsulex.l"
{
factor = 1e-21;
BEGIN(UNITS);
@@ -7503,7 +7505,7 @@ YY_RULE_SETUP
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 332 "wcsulex.l"
+#line 334 "wcsulex.l"
{
factor = 1e-24;
BEGIN(UNITS);
@@ -7511,7 +7513,7 @@ YY_RULE_SETUP
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 337 "wcsulex.l"
+#line 339 "wcsulex.l"
{
factor = 1e+1;
BEGIN(UNITS);
@@ -7519,7 +7521,7 @@ YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 342 "wcsulex.l"
+#line 344 "wcsulex.l"
{
factor = 1e+2;
BEGIN(UNITS);
@@ -7527,7 +7529,7 @@ YY_RULE_SETUP
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 347 "wcsulex.l"
+#line 349 "wcsulex.l"
{
factor = 1e+3;
BEGIN(UNITS);
@@ -7535,7 +7537,7 @@ YY_RULE_SETUP
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 352 "wcsulex.l"
+#line 354 "wcsulex.l"
{
factor = 1e+6;
BEGIN(UNITS);
@@ -7543,7 +7545,7 @@ YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 357 "wcsulex.l"
+#line 359 "wcsulex.l"
{
factor = 1e+9;
BEGIN(UNITS);
@@ -7551,7 +7553,7 @@ YY_RULE_SETUP
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 362 "wcsulex.l"
+#line 364 "wcsulex.l"
{
factor = 1e+12;
BEGIN(UNITS);
@@ -7559,7 +7561,7 @@ YY_RULE_SETUP
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 367 "wcsulex.l"
+#line 369 "wcsulex.l"
{
factor = 1e+15;
BEGIN(UNITS);
@@ -7567,7 +7569,7 @@ YY_RULE_SETUP
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 372 "wcsulex.l"
+#line 374 "wcsulex.l"
{
factor = 1e+18;
BEGIN(UNITS);
@@ -7575,7 +7577,7 @@ YY_RULE_SETUP
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 377 "wcsulex.l"
+#line 379 "wcsulex.l"
{
factor = 1e+21;
BEGIN(UNITS);
@@ -7583,7 +7585,7 @@ YY_RULE_SETUP
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 382 "wcsulex.l"
+#line 384 "wcsulex.l"
{
factor = 1e+24;
BEGIN(UNITS);
@@ -7591,7 +7593,7 @@ YY_RULE_SETUP
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 387 "wcsulex.l"
+#line 389 "wcsulex.l"
{
/* Internal parser error. */
status = wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR),
@@ -7601,7 +7603,7 @@ YY_RULE_SETUP
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 394 "wcsulex.l"
+#line 396 "wcsulex.l"
{
/* Ampere. */
types[WCSUNITS_CHARGE] += 1.0;
@@ -7611,7 +7613,7 @@ YY_RULE_SETUP
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 401 "wcsulex.l"
+#line 403 "wcsulex.l"
{
/* Year (annum). */
factor *= 31557600.0;
@@ -7621,7 +7623,7 @@ YY_RULE_SETUP
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 408 "wcsulex.l"
+#line 410 "wcsulex.l"
{
/* Analogue-to-digital converter units. */
types[WCSUNITS_COUNT] += 1.0;
@@ -7630,7 +7632,7 @@ YY_RULE_SETUP
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 414 "wcsulex.l"
+#line 416 "wcsulex.l"
{
/* Angstrom. */
factor *= 1e-10;
@@ -7640,7 +7642,7 @@ YY_RULE_SETUP
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 421 "wcsulex.l"
+#line 423 "wcsulex.l"
{
/* Minute of arc. */
factor /= 60.0;
@@ -7650,7 +7652,7 @@ YY_RULE_SETUP
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 428 "wcsulex.l"
+#line 430 "wcsulex.l"
{
/* Second of arc. */
factor /= 3600.0;
@@ -7660,7 +7662,7 @@ YY_RULE_SETUP
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 435 "wcsulex.l"
+#line 437 "wcsulex.l"
{
/* Astronomical unit. */
factor *= 1.49598e+11;
@@ -7670,7 +7672,7 @@ YY_RULE_SETUP
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 442 "wcsulex.l"
+#line 444 "wcsulex.l"
{
/* Barn. */
factor *= 1e-28;
@@ -7680,7 +7682,7 @@ YY_RULE_SETUP
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 449 "wcsulex.l"
+#line 451 "wcsulex.l"
{
/* Beam, as in Jy/beam. */
types[WCSUNITS_BEAM] += 1.0;
@@ -7689,7 +7691,7 @@ YY_RULE_SETUP
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 455 "wcsulex.l"
+#line 457 "wcsulex.l"
{
/* Bin (e.g. histogram). */
types[WCSUNITS_BIN] += 1.0;
@@ -7698,7 +7700,7 @@ YY_RULE_SETUP
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 461 "wcsulex.l"
+#line 463 "wcsulex.l"
{
/* Bit. */
types[WCSUNITS_BIT] += 1.0;
@@ -7707,7 +7709,7 @@ YY_RULE_SETUP
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 467 "wcsulex.l"
+#line 469 "wcsulex.l"
{
/* Byte. */
factor *= 8.0;
@@ -7717,7 +7719,7 @@ YY_RULE_SETUP
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 474 "wcsulex.l"
+#line 476 "wcsulex.l"
{
/* Coulomb. */
types[WCSUNITS_CHARGE] += 1.0;
@@ -7726,7 +7728,7 @@ YY_RULE_SETUP
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 480 "wcsulex.l"
+#line 482 "wcsulex.l"
{
/* Candela. */
types[WCSUNITS_LUMINTEN] += 1.0;
@@ -7735,7 +7737,7 @@ YY_RULE_SETUP
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 486 "wcsulex.l"
+#line 488 "wcsulex.l"
{
/* Channel. */
types[WCSUNITS_BIN] += 1.0;
@@ -7744,7 +7746,7 @@ YY_RULE_SETUP
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 492 "wcsulex.l"
+#line 494 "wcsulex.l"
{
/* Count. */
types[WCSUNITS_COUNT] += 1.0;
@@ -7753,7 +7755,7 @@ YY_RULE_SETUP
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 498 "wcsulex.l"
+#line 500 "wcsulex.l"
{
/* Debye. */
factor *= 1e-29 / 3.0;
@@ -7764,7 +7766,7 @@ YY_RULE_SETUP
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 506 "wcsulex.l"
+#line 508 "wcsulex.l"
{
/* Day. */
factor *= 86400.0;
@@ -7774,7 +7776,7 @@ YY_RULE_SETUP
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 513 "wcsulex.l"
+#line 515 "wcsulex.l"
{
/* Degree. */
types[WCSUNITS_PLANE_ANGLE] += 1.0;
@@ -7783,7 +7785,7 @@ YY_RULE_SETUP
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 519 "wcsulex.l"
+#line 521 "wcsulex.l"
{
/* Erg. */
factor *= 1e-7;
@@ -7795,7 +7797,7 @@ YY_RULE_SETUP
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 528 "wcsulex.l"
+#line 530 "wcsulex.l"
{
/* Electron volt. */
factor *= 1.6021765e-19;
@@ -7807,7 +7809,7 @@ YY_RULE_SETUP
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 537 "wcsulex.l"
+#line 539 "wcsulex.l"
{
/* Farad. */
types[WCSUNITS_MASS] -= 1.0;
@@ -7819,7 +7821,7 @@ YY_RULE_SETUP
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 546 "wcsulex.l"
+#line 548 "wcsulex.l"
{
/* Gauss. */
factor *= 1e-4;
@@ -7831,7 +7833,7 @@ YY_RULE_SETUP
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 555 "wcsulex.l"
+#line 557 "wcsulex.l"
{
/* Gram. */
factor *= 1e-3;
@@ -7841,7 +7843,7 @@ YY_RULE_SETUP
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 562 "wcsulex.l"
+#line 564 "wcsulex.l"
{
/* Henry. */
types[WCSUNITS_MASS] += 1.0;
@@ -7853,7 +7855,7 @@ YY_RULE_SETUP
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 571 "wcsulex.l"
+#line 573 "wcsulex.l"
{
/* Hour. */
factor *= 3600.0;
@@ -7863,7 +7865,7 @@ YY_RULE_SETUP
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 578 "wcsulex.l"
+#line 580 "wcsulex.l"
{
/* Hertz. */
types[WCSUNITS_TIME] -= 1.0;
@@ -7872,7 +7874,7 @@ YY_RULE_SETUP
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 584 "wcsulex.l"
+#line 586 "wcsulex.l"
{
/* Joule. */
types[WCSUNITS_MASS] += 1.0;
@@ -7883,7 +7885,7 @@ YY_RULE_SETUP
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 592 "wcsulex.l"
+#line 594 "wcsulex.l"
{
/* Jansky. */
factor *= 1e-26;
@@ -7894,7 +7896,7 @@ YY_RULE_SETUP
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 600 "wcsulex.l"
+#line 602 "wcsulex.l"
{
/* Kelvin. */
types[WCSUNITS_TEMPERATURE] += 1.0;
@@ -7903,7 +7905,7 @@ YY_RULE_SETUP
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 606 "wcsulex.l"
+#line 608 "wcsulex.l"
{
/* Lumen. */
types[WCSUNITS_LUMINTEN] += 1.0;
@@ -7913,7 +7915,7 @@ YY_RULE_SETUP
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 613 "wcsulex.l"
+#line 615 "wcsulex.l"
{
/* Lux. */
types[WCSUNITS_LUMINTEN] += 1.0;
@@ -7924,7 +7926,7 @@ YY_RULE_SETUP
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 621 "wcsulex.l"
+#line 623 "wcsulex.l"
{
/* Light year. */
factor *= 2.99792458e8 * 31557600.0;
@@ -7934,7 +7936,7 @@ YY_RULE_SETUP
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 628 "wcsulex.l"
+#line 630 "wcsulex.l"
{
/* Metre. */
types[WCSUNITS_LENGTH] += 1.0;
@@ -7943,7 +7945,7 @@ YY_RULE_SETUP
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 634 "wcsulex.l"
+#line 636 "wcsulex.l"
{
/* Stellar magnitude. */
types[WCSUNITS_MAGNITUDE] += 1.0;
@@ -7952,7 +7954,7 @@ YY_RULE_SETUP
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 640 "wcsulex.l"
+#line 642 "wcsulex.l"
{
/* Milli-arcsec. */
factor /= 3600e+3;
@@ -7962,7 +7964,7 @@ YY_RULE_SETUP
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 647 "wcsulex.l"
+#line 649 "wcsulex.l"
{
/* Minute. */
factor *= 60.0;
@@ -7972,7 +7974,7 @@ YY_RULE_SETUP
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 654 "wcsulex.l"
+#line 656 "wcsulex.l"
{
/* Mole. */
types[WCSUNITS_MOLE] += 1.0;
@@ -7981,7 +7983,7 @@ YY_RULE_SETUP
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 660 "wcsulex.l"
+#line 662 "wcsulex.l"
{
/* Newton. */
types[WCSUNITS_MASS] += 1.0;
@@ -7992,7 +7994,7 @@ YY_RULE_SETUP
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 668 "wcsulex.l"
+#line 670 "wcsulex.l"
{
/* Ohm. */
types[WCSUNITS_MASS] += 1.0;
@@ -8004,7 +8006,7 @@ YY_RULE_SETUP
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 677 "wcsulex.l"
+#line 679 "wcsulex.l"
{
/* Pascal. */
types[WCSUNITS_MASS] += 1.0;
@@ -8015,7 +8017,7 @@ YY_RULE_SETUP
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 685 "wcsulex.l"
+#line 687 "wcsulex.l"
{
/* Parsec. */
factor *= 3.0857e16;
@@ -8025,7 +8027,7 @@ YY_RULE_SETUP
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 692 "wcsulex.l"
+#line 694 "wcsulex.l"
{
/* Photon. */
types[WCSUNITS_COUNT] += 1.0;
@@ -8034,7 +8036,7 @@ YY_RULE_SETUP
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 698 "wcsulex.l"
+#line 700 "wcsulex.l"
{
/* Pixel. */
types[WCSUNITS_PIXEL] += 1.0;
@@ -8043,7 +8045,7 @@ YY_RULE_SETUP
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 704 "wcsulex.l"
+#line 706 "wcsulex.l"
{
/* Rayleigh. */
factor *= 1e10 / (4.0 * PI);
@@ -8055,7 +8057,7 @@ YY_RULE_SETUP
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 713 "wcsulex.l"
+#line 715 "wcsulex.l"
{
/* Radian. */
factor *= 180.0 / PI;
@@ -8065,7 +8067,7 @@ YY_RULE_SETUP
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 720 "wcsulex.l"
+#line 722 "wcsulex.l"
{
/* Rydberg. */
factor *= 13.605692 * 1.6021765e-19;
@@ -8077,7 +8079,7 @@ YY_RULE_SETUP
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 729 "wcsulex.l"
+#line 731 "wcsulex.l"
{
/* Siemen. */
types[WCSUNITS_MASS] -= 1.0;
@@ -8089,7 +8091,7 @@ YY_RULE_SETUP
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 738 "wcsulex.l"
+#line 740 "wcsulex.l"
{
/* Second. */
types[WCSUNITS_TIME] += 1.0;
@@ -8098,7 +8100,7 @@ YY_RULE_SETUP
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 744 "wcsulex.l"
+#line 746 "wcsulex.l"
{
/* Solar luminosity. */
factor *= 3.8268e26;
@@ -8110,7 +8112,7 @@ YY_RULE_SETUP
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 753 "wcsulex.l"
+#line 755 "wcsulex.l"
{
/* Solar mass. */
factor *= 1.9891e30;
@@ -8120,7 +8122,7 @@ YY_RULE_SETUP
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 760 "wcsulex.l"
+#line 762 "wcsulex.l"
{
/* Solar radius. */
factor *= 6.9599e8;
@@ -8130,7 +8132,7 @@ YY_RULE_SETUP
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 767 "wcsulex.l"
+#line 769 "wcsulex.l"
{
/* Steradian. */
types[WCSUNITS_SOLID_ANGLE] += 1.0;
@@ -8139,7 +8141,7 @@ YY_RULE_SETUP
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 773 "wcsulex.l"
+#line 775 "wcsulex.l"
{
/* Sun (with respect to). */
types[WCSUNITS_SOLRATIO] += 1.0;
@@ -8148,7 +8150,7 @@ YY_RULE_SETUP
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 779 "wcsulex.l"
+#line 781 "wcsulex.l"
{
/* Tesla. */
types[WCSUNITS_MASS] += 1.0;
@@ -8159,7 +8161,7 @@ YY_RULE_SETUP
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 787 "wcsulex.l"
+#line 789 "wcsulex.l"
{
/* Unified atomic mass unit. */
factor *= 1.6605387e-27;
@@ -8169,7 +8171,7 @@ YY_RULE_SETUP
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 794 "wcsulex.l"
+#line 796 "wcsulex.l"
{
/* Volt. */
types[WCSUNITS_MASS] += 1.0;
@@ -8181,7 +8183,7 @@ YY_RULE_SETUP
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 803 "wcsulex.l"
+#line 805 "wcsulex.l"
{
/* Voxel. */
types[WCSUNITS_VOXEL] += 1.0;
@@ -8190,7 +8192,7 @@ YY_RULE_SETUP
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 809 "wcsulex.l"
+#line 811 "wcsulex.l"
{
/* Watt. */
types[WCSUNITS_MASS] += 1.0;
@@ -8201,7 +8203,7 @@ YY_RULE_SETUP
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 817 "wcsulex.l"
+#line 819 "wcsulex.l"
{
/* Weber. */
types[WCSUNITS_MASS] += 1.0;
@@ -8213,7 +8215,7 @@ YY_RULE_SETUP
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 826 "wcsulex.l"
+#line 828 "wcsulex.l"
{
/* Internal parser error. */
status = wcserr_set(WCSERR_SET(UNITSERR_PARSER_ERROR),
@@ -8223,7 +8225,7 @@ YY_RULE_SETUP
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 833 "wcsulex.l"
+#line 835 "wcsulex.l"
{
/* Exponentiation. */
if (operator++) {
@@ -8233,7 +8235,7 @@ YY_RULE_SETUP
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 840 "wcsulex.l"
+#line 842 "wcsulex.l"
{
sscanf(wcsulextext, " %d", &i);
expon *= (double)i;
@@ -8244,7 +8246,7 @@ YY_RULE_SETUP
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 848 "wcsulex.l"
+#line 850 "wcsulex.l"
{
sscanf(wcsulextext, " (%d)", &i);
expon *= (double)i;
@@ -8255,7 +8257,7 @@ YY_RULE_SETUP
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 856 "wcsulex.l"
+#line 858 "wcsulex.l"
{
sscanf(wcsulextext, " (%d/%d)", &i, &j);
expon *= (double)i / (double)j;
@@ -8266,7 +8268,7 @@ YY_RULE_SETUP
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 864 "wcsulex.l"
+#line 866 "wcsulex.l"
{
sscanf(wcsulextext, " (%s)", ctmp);
wcsutil_str2double(ctmp, "%lf", &dexp);
@@ -8278,7 +8280,7 @@ YY_RULE_SETUP
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 873 "wcsulex.l"
+#line 875 "wcsulex.l"
{
/* Multiply. */
if (operator++) {
@@ -8291,7 +8293,7 @@ YY_RULE_SETUP
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 883 "wcsulex.l"
+#line 885 "wcsulex.l"
{
/* Multiply. */
if (operator) {
@@ -8305,7 +8307,7 @@ YY_RULE_SETUP
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 894 "wcsulex.l"
+#line 896 "wcsulex.l"
{
/* Multiply. */
if (operator) {
@@ -8318,7 +8320,7 @@ YY_RULE_SETUP
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 904 "wcsulex.l"
+#line 906 "wcsulex.l"
{
/* Divide. */
if (operator++) {
@@ -8332,7 +8334,7 @@ YY_RULE_SETUP
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 915 "wcsulex.l"
+#line 917 "wcsulex.l"
{
add(&factor, types, &expon, scale, units);
bracket = !bracket;
@@ -8341,7 +8343,7 @@ YY_RULE_SETUP
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 921 "wcsulex.l"
+#line 923 "wcsulex.l"
{
status = wcserr_set(WCSERR_SET(UNITSERR_BAD_EXPON_SYMBOL),
"Invalid symbol in EXPON context in '%s'", unitstr);
@@ -8350,7 +8352,7 @@ YY_RULE_SETUP
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 927 "wcsulex.l"
+#line 929 "wcsulex.l"
{
/* Discard any remaining input. */
}
@@ -8361,7 +8363,7 @@ case YY_STATE_EOF(PREFIX):
case YY_STATE_EOF(UNITS):
case YY_STATE_EOF(EXPON):
case YY_STATE_EOF(FLUSH):
-#line 931 "wcsulex.l"
+#line 933 "wcsulex.l"
{
/* End-of-string. */
if (YY_START == EXPON) {
@@ -8400,10 +8402,10 @@ case YY_STATE_EOF(FLUSH):
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 967 "wcsulex.l"
+#line 969 "wcsulex.l"
ECHO;
YY_BREAK
-#line 8407 "wcsulex.c"
+#line 8409 "wcsulex.c"
case YY_END_OF_BUFFER:
{
@@ -9393,7 +9395,7 @@ void wcsulexfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 967 "wcsulex.l"
+#line 969 "wcsulex.l"
View
90 cextern/wcslib/C/flexed/wcsutrn.c
@@ -3982,7 +3982,7 @@ char *wcsutrntext;
#line 1 "wcsutrn.l"
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -4004,7 +4004,7 @@ char *wcsutrntext;
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: wcsutrn.c,v 4.14 2012/07/13 10:02:31 cal103 Exp $
+ $Id: wcsutrn.c,v 4.15 2012/09/26 14:26:06 cal103 Exp $
*=============================================================================
*
* wcsutrn.l is a Flex description file containing the definition of a lexical
@@ -4217,7 +4217,7 @@ YY_DECL
#line 69 "wcsutrn.l"
static const char *function = "wcsutrne";
-
+
char orig[80], subs[80];
int bracket = 0;
int unsafe = 0;
@@ -4225,6 +4225,8 @@ YY_DECL
YY_BUFFER_STATE inbuff;
int wcsutrnlex_destroy(void);
+ if (err) *err = 0x0;
+
*orig = '\0';
*subs = '\0';
@@ -4243,7 +4245,7 @@ YY_DECL
fprintf(stderr, "\n%s ->\n", unitstr);
#endif
-#line 4247 "wcsutrn.c"
+#line 4249 "wcsutrn.c"
if ( !(yy_init) )
{
@@ -4302,7 +4304,7 @@ YY_DECL
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 97 "wcsutrn.l"
+#line 99 "wcsutrn.l"
{
/* Looks like a keycomment. */
strcat(unitstr, "[");
@@ -4311,13 +4313,13 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 103 "wcsutrn.l"
+#line 105 "wcsutrn.l"
/* Discard leading whitespace. */
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 105 "wcsutrn.l"
+#line 107 "wcsutrn.l"
{
/* Non-alphabetic character. */
strcat(unitstr, wcsutrntext);
@@ -4328,7 +4330,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 113 "wcsutrn.l"
+#line 115 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "Angstrom");
@@ -4337,7 +4339,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 119 "wcsutrn.l"
+#line 121 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "arcmin");
@@ -4346,7 +4348,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 125 "wcsutrn.l"
+#line 127 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "arcsec");
@@ -4355,7 +4357,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 131 "wcsutrn.l"
+#line 133 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "beam");
@@ -4364,7 +4366,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 137 "wcsutrn.l"
+#line 139 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "byte");
@@ -4373,7 +4375,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 143 "wcsutrn.l"
+#line 145 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "d");
@@ -4382,7 +4384,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 149 "wcsutrn.l"
+#line 151 "wcsutrn.l"
{
unsafe = 1;
strcpy(orig, wcsutrntext);
@@ -4392,7 +4394,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 156 "wcsutrn.l"
+#line 158 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "deg");
@@ -4401,7 +4403,7 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 162 "wcsutrn.l"
+#line 164 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "GHz");
@@ -4410,7 +4412,7 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 168 "wcsutrn.l"
+#line 170 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "h");
@@ -4419,7 +4421,7 @@ YY_RULE_SETUP
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 174 "wcsutrn.l"
+#line 176 "wcsutrn.l"
{
unsafe = 1;
strcpy(orig, wcsutrntext);
@@ -4429,7 +4431,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 181 "wcsutrn.l"
+#line 183 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "Hz");
@@ -4438,7 +4440,7 @@ YY_RULE_SETUP
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 187 "wcsutrn.l"
+#line 189 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "kHz");
@@ -4447,7 +4449,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 193 "wcsutrn.l"
+#line 195 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "Jy");
@@ -4456,7 +4458,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 199 "wcsutrn.l"
+#line 201 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "K");
@@ -4465,7 +4467,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 205 "wcsutrn.l"
+#line 207 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "km");
@@ -4474,7 +4476,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 211 "wcsutrn.l"
+#line 213 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "m");
@@ -4483,7 +4485,7 @@ YY_RULE_SETUP
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 217 "wcsutrn.l"
+#line 219 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "min");
@@ -4492,7 +4494,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 223 "wcsutrn.l"
+#line 225 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "MHz");
@@ -4501,7 +4503,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 229 "wcsutrn.l"
+#line 231 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "ohm");
@@ -4510,7 +4512,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 235 "wcsutrn.l"
+#line 237 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "Pa");
@@ -4519,7 +4521,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 241 "wcsutrn.l"
+#line 243 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "pixel");
@@ -4528,7 +4530,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 247 "wcsutrn.l"
+#line 249 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "rad");
@@ -4537,7 +4539,7 @@ YY_RULE_SETUP
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 253 "wcsutrn.l"
+#line 255 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "s");
@@ -4546,7 +4548,7 @@ YY_RULE_SETUP
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 259 "wcsutrn.l"
+#line 261 "wcsutrn.l"
{
unsafe = 1;
strcpy(orig, wcsutrntext);
@@ -4556,7 +4558,7 @@ YY_RULE_SETUP
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 266 "wcsutrn.l"
+#line 268 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "V");
@@ -4565,7 +4567,7 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 272 "wcsutrn.l"
+#line 274 "wcsutrn.l"
{
strcpy(orig, wcsutrntext);
strcpy(subs, "yr");
@@ -4574,7 +4576,7 @@ YY_RULE_SETUP
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 278 "wcsutrn.l"
+#line 280 "wcsutrn.l"
{
/* Not a recognized alias. */
strcpy(orig, wcsutrntext);
@@ -4584,7 +4586,7 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 285 "wcsutrn.l"
+#line 287 "wcsutrn.l"
{
/* Reject the alias match. */
strcat(orig, wcsutrntext);
@@ -4594,7 +4596,7 @@ YY_RULE_SETUP
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
-#line 291 "wcsutrn.l"
+#line 293 "wcsutrn.l"
{
/* Discard separating whitespace. */
unput(wcsutrntext[wcsutrnleng-1]);
@@ -4602,7 +4604,7 @@ YY_RULE_SETUP
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 296 "wcsutrn.l"
+#line 298 "wcsutrn.l"
{
/* Compress separating whitespace. */
strcat(unitstr, subs);
@@ -4615,7 +4617,7 @@ YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 306 "wcsutrn.l"
+#line 308 "wcsutrn.l"
{
/* Copy anything else unchanged. */
strcat(unitstr, subs);
@@ -4627,7 +4629,7 @@ YY_RULE_SETUP
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 315 "wcsutrn.l"
+#line 317 "wcsutrn.l"
{
/* Copy out remaining input. */
strcat(unitstr, wcsutrntext);
@@ -4636,7 +4638,7 @@ YY_RULE_SETUP
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(NEXT):
case YY_STATE_EOF(FLUSH):
-#line 320 "wcsutrn.l"
+#line 322 "wcsutrn.l"
{
/* End-of-string. */
if (*subs) {
@@ -4654,10 +4656,10 @@ case YY_STATE_EOF(FLUSH):
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 335 "wcsutrn.l"
+#line 337 "wcsutrn.l"
ECHO;
YY_BREAK
-#line 4661 "wcsutrn.c"
+#line 4663 "wcsutrn.c"
case YY_END_OF_BUFFER:
{
@@ -5632,7 +5634,7 @@ void wcsutrnfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 335 "wcsutrn.l"
+#line 337 "wcsutrn.l"
View
4 cextern/wcslib/C/getwcstab.c
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: getwcstab.c,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: getwcstab.c,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*===========================================================================*/
#include <stdlib.h>
View
4 cextern/wcslib/C/getwcstab.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: getwcstab.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: getwcstab.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
* Summary of the getwcstab routines
View
4 cextern/wcslib/C/lin.c
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: lin.c,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: lin.c,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*===========================================================================*/
#include <stdio.h>
View
6 cextern/wcslib/C/lin.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,10 +22,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: lin.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: lin.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
-* WCSLIB 4.14 - C routines that implement the FITS World Coordinate System
+* WCSLIB 4.15 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to
*
* "Representations of world coordinates in FITS",
View
4 cextern/wcslib/C/log.c
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: log.c,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: log.c,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*===========================================================================*/
#include <math.h>
View
6 cextern/wcslib/C/log.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,10 +22,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: log.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: log.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
-* WCSLIB 4.14 - C routines that implement logarithmic coordinate systems as
+* WCSLIB 4.15 - C routines that implement logarithmic coordinate systems as
* defined by the FITS World Coordinate System (WCS) standard. Refer to
*
* "Representations of world coordinates in FITS",
View
4 cextern/wcslib/C/prj.c
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: prj.c,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: prj.c,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*===========================================================================*/
#include <math.h>
View
6 cextern/wcslib/C/prj.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,10 +22,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: prj.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: prj.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
-* WCSLIB 4.14 - C routines that implement the spherical map projections
+* WCSLIB 4.15 - C routines that implement the spherical map projections
* recognized by the FITS World Coordinate System (WCS) standard. Refer to
*
* "Representations of world coordinates in FITS",
View
22 cextern/wcslib/C/spc.c
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,7 +22,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: spc.c,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: spc.c,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*===========================================================================*/
#include <math.h>
@@ -723,6 +723,8 @@ int spctype(
char ctype[9], ptype_t, sname_t[32], units_t[8], xtype_t;
int restreq_t = 0;
+ if (err) *err = 0x0;
+
/* Copy with blank padding. */
sprintf(ctype, "%-8.8s", ctypei);
ctype[8] = '\0';
@@ -930,6 +932,7 @@ int spcspxe(
if ((status = specx(type, crvalS, restfrq, restwav, &spx))) {
status = SPCERR_BAD_SPEC_PARAMS;
if (err) {
+ *err = spx.err;
(*err)->status = status;
} else {
free(spx.err);
@@ -1110,6 +1113,7 @@ int spcxpse(
if (specx(type, crvalX, restfrq, restwav, &spx)) {
status = SPCERR_BAD_SPEC_PARAMS;
if (err) {
+ *err = spx.err;
(*err)->status = status;
} else {
free(spx.err);
@@ -1246,7 +1250,7 @@ int spctrne(
static const char *function = "spctrne";
char *cp, ptype1, ptype2, stype1[5], stype2[5], xtype1, xtype2;
- int restreq;
+ int restreq, status;
double crvalX, dS2dX, dXdS1;
if (restfrq == 0.0 && restwav == 0.0) {
@@ -1262,9 +1266,9 @@ int spctrne(
}
}
- if (spcspxe(ctypeS1, crvalS1, restfrq, restwav, &ptype1, &xtype1,
- &restreq, &crvalX, &dXdS1, err)) {
- return (*err)->status;
+ if ((status = spcspxe(ctypeS1, crvalS1, restfrq, restwav, &ptype1, &xtype1,
+ &restreq, &crvalX, &dXdS1, err))) {
+ return status;
}
/* Pad with blanks. */
@@ -1284,9 +1288,9 @@ int spctrne(
}
}
- if (spcxpse(ctypeS2, crvalX, restfrq, restwav, &ptype2, &xtype2,
- &restreq, crvalS2, &dS2dX, err)) {
- return (*err)->status;
+ if ((status = spcxpse(ctypeS2, crvalX, restfrq, restwav, &ptype2, &xtype2,
+ &restreq, crvalS2, &dS2dX, err))) {
+ return status;
}
/* Are the X-types compatible? */
View
38 cextern/wcslib/C/spc.h
@@ -1,6 +1,6 @@
/*============================================================================
- WCSLIB 4.14 - an implementation of the FITS WCS standard.
+ WCSLIB 4.15 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2012, Mark Calabretta
This file is part of WCSLIB.
@@ -22,10 +22,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
- $Id: spc.h,v 4.14 2012/07/13 10:02:27 cal103 Exp $
+ $Id: spc.h,v 4.15 2012/09/26 14:26:05 cal103 Exp $
*=============================================================================
*
-* WCSLIB 4.14 - C routines that implement the spectral coordinate systems
+* WCSLIB 4.15 - C routines that implement the spectral coordinate systems
* recognized by the FITS World Coordinate System (WCS) standard. Refer to
*
* "Representations of world coordinates in FITS",
@@ -377,9 +377,11 @@
* X-types) only if restreq%3 != 0.
*
* err struct wcserr **
-* For function return values > 1, this struct will
-* contain a detailed error message. May be NULL if an
-* error message is not desired.
+* If enabled, for function return values > 1, this
+*