Skip to content

Commit

Permalink
force alignment on 8-bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfitzpatrick authored and olebole committed Jan 28, 2024
1 parent 0c1a3e0 commit 9843155
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions pkg/tbtables/tbbnll.x
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ char output[ARB] # o: same as input, bit for bit
double buf # local copy of input
char cbuf[SZ_DOUBLE] # will be copied to output
int i
#equivalence (buf, cbuf)
equivalence (buf, cbuf)

begin
buf = input
Expand All @@ -89,7 +89,7 @@ char output[ARB] # o: same as input, bit for bit
real buf # local copy of input
char cbuf[SZ_REAL] # will be copied to output
int i
#equivalence (buf, cbuf)
equivalence (buf, cbuf)

begin
buf = input
Expand All @@ -109,7 +109,7 @@ char output[ARB] # o: same as input, bit for bit
int buf # local copy of input
char cbuf[SZ_INT32] # will be copied to output
int i
#equivalence (buf, cbuf)
equivalence (buf, cbuf)

begin
buf = input
Expand All @@ -129,7 +129,7 @@ char output[ARB] # o: same as input, bit for bit
short buf # local copy of input
char cbuf[SZ_SHORT] # will be copied to output
int i
#equivalence (buf, cbuf)
equivalence (buf, cbuf)

begin
if (SZ_SHORT == SZ_CHAR) {
Expand All @@ -153,7 +153,7 @@ char output[ARB] # o: same as input, bit for bit
bool buf # local copy of input
char cbuf[SZ_BOOL] # will be copied to output
int i
#equivalence (buf, cbuf)
equivalence (buf, cbuf)

begin
buf = input
Expand Down
4 changes: 2 additions & 2 deletions pkg/tbtables/tbfnew.x
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ bool simple, extend
int status # zero is OK
int hdu # HDU number (zero is primary header)
int fd[2] # unit number for FITS file; cfitsio pointer
#double dfd # to force alignment of fd
#equivalence (fd, dfd) # to force alignment of fd
double dfd # to force alignment of fd
equivalence (fd, dfd) # to force alignment of fd
int hdutype # type of current HDU
int extver # value of EXTVER from existing header, or -1
int ncols # number of columns, but min of 1 (for allocating space)
Expand Down
4 changes: 2 additions & 2 deletions pkg/tbtables/tbfopn.x
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ int hdu # HDU number
int extver # extension version number
int hdutype # type of HDU
int fd[2] # unit number for FITS file; cfitsio pointer
#double dfd # to force alignment of fd
#equivalence (fd, dfd) # to force alignment of fd
double dfd # to force alignment of fd
equivalence (fd, dfd) # to force alignment of fd
int tbffnd()
bool strne()
errchk tbffnd, tbferr
Expand Down
6 changes: 3 additions & 3 deletions pkg/tbtables/tbfpri.x
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ int ifd[2] # C pointer for input (template) FITS file
int ofd[2] # C pointer for output FITS file
# These variables and equivalence statements are used to force 8-byte
# alignment of ifd and ofd.
#double d_ifd, d_ofd
#equivalence (ifd, d_ifd)
#equivalence (ofd, d_ofd)
double d_ifd, d_ofd
equivalence (ifd, d_ifd)
equivalence (ofd, d_ofd)
int naxis # NAXIS from primary header of input
int status # zero is OK
int itype, otype # file type based on filename extension
Expand Down
4 changes: 2 additions & 2 deletions pkg/utilities/nttools/nttools.par
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Dummy LOCAL package parameter file.
# Dummy NTTOOLS package parameter file.

version,s,h,"10May2000"
version,s,h,"10Oct2023"

0 comments on commit 9843155

Please sign in to comment.