Skip to content

Commit

Permalink
Remove Fortran FRETVAL macros (#518)
Browse files Browse the repository at this point in the history
These are no longer necessary. The FCALLKEYW macro they enable is
not used, the logic makes no sense, and many functions already
omit FRETVAL().
  • Loading branch information
derobins authored Feb 13, 2024
1 parent d84875c commit 156afa5
Show file tree
Hide file tree
Showing 20 changed files with 900 additions and 936 deletions.
36 changes: 18 additions & 18 deletions hdf/src/df24f.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int dimsset = 0;
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2reqil(intf *il)
{
return DFGRIreqil((intn)*il, (intn)IMAGE);
Expand All @@ -73,7 +73,7 @@ nd2reqil(intf *il)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2sdims(intf *xdim, intf *ydim)
{
dimsset = 1;
Expand All @@ -94,7 +94,7 @@ nd2sdims(intf *xdim, intf *ydim)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2igdim(_fcd filename, intf *pxdim, intf *pydim, intf *pil, intf *fnlen)
{
char *fn;
Expand All @@ -121,7 +121,7 @@ nd2igdim(_fcd filename, intf *pxdim, intf *pydim, intf *pil, intf *fnlen)
* Remarks: space is assumed to be xdim * ydim * 3 bytes
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2igimg(_fcd filename, _fcd image, intf *xdim, intf *ydim, intf *fnlen)
{
char *fn;
Expand All @@ -148,7 +148,7 @@ nd2igimg(_fcd filename, _fcd image, intf *xdim, intf *ydim, intf *fnlen)
* Remarks: array image is assumed to be xdim * ydim * ncomps bytes
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2iaimg(_fcd filename, _fcd image, intf *xdim, intf *ydim, intf *fnlen, intf *newfile)
{
char *fn;
Expand Down Expand Up @@ -176,7 +176,7 @@ nd2iaimg(_fcd filename, _fcd image, intf *xdim, intf *ydim, intf *fnlen, intf *n
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2setil(intf *il)
{
return DFGRIsetil((intn)*il, IMAGE);
Expand All @@ -192,7 +192,7 @@ nd2setil(intf *il)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2first(void)
{
return DFGRIrestart();
Expand All @@ -208,7 +208,7 @@ nd2first(void)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2lref(void)
{
return (intf)DFGRIlastref();
Expand All @@ -227,7 +227,7 @@ nd2lref(void)
* must be called.
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2scomp(intf *scheme)
{
comp_info cinfo; /* Structure containing compression parameters */
Expand All @@ -251,7 +251,7 @@ nd2scomp(intf *scheme)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2sjpeg(intf *quality, intf *force_baseline)
{
comp_info cinfo; /* Structure containing compression parameters */
Expand All @@ -271,7 +271,7 @@ nd2sjpeg(intf *quality, intf *force_baseline)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndf24reqil(intf *il)
{
return DFGRIreqil((intn)*il, IMAGE);
Expand All @@ -288,7 +288,7 @@ ndf24reqil(intf *il)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndf24setdims(intf *xdim, intf *ydim)
{
dimsset = 1;
Expand All @@ -305,7 +305,7 @@ ndf24setdims(intf *xdim, intf *ydim)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndf24setil(intf *il)
{
return DFGRIsetil((intn)*il, IMAGE);
Expand All @@ -321,7 +321,7 @@ ndf24setil(intf *il)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndf24restart(void)
{
return DFGRIrestart();
Expand All @@ -340,7 +340,7 @@ ndf24restart(void)
* must be called.
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndf24scompress(intf *scheme)
{
comp_info cinfo; /* Structure containing compression parameters */
Expand All @@ -364,7 +364,7 @@ ndf24scompress(intf *scheme)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndf24sjpeg(intf *quality, intf *force_baseline)
{
comp_info cinfo; /* Structure containing compression parameters */
Expand All @@ -386,7 +386,7 @@ ndf24sjpeg(intf *quality, intf *force_baseline)
* Remarks:
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2irref(_fcd filename, intf *ref, intf *fnlen)
{
char *fn;
Expand All @@ -411,7 +411,7 @@ nd2irref(_fcd filename, intf *ref, intf *fnlen)
* Remarks:
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
nd2inimg(_fcd filename, intf *fnlen)
{
char *fn;
Expand Down
36 changes: 18 additions & 18 deletions hdf/src/dfanf.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
* Invokes: DFSDIclear
*-------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndaclear(void)
{
return DFANIclear();
Expand All @@ -88,7 +88,7 @@ ndaclear(void)
* Invokes: DFANIgetannlen, HDf2cstring, DFIfreespace
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndaiganl(_fcd filename, intf *tag, intf *ref, intf *type, intf *fnlen)
{
char *fn;
Expand Down Expand Up @@ -117,7 +117,7 @@ ndaiganl(_fcd filename, intf *tag, intf *ref, intf *type, intf *fnlen)
* Invokes: DFANIgetann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndaigann(_fcd filename, intf *tag, intf *ref, _fcd annotation, intf *maxlen, intf *type, intf *fnlen)
{
char *fn;
Expand Down Expand Up @@ -147,7 +147,7 @@ ndaigann(_fcd filename, intf *tag, intf *ref, _fcd annotation, intf *maxlen, int
* Invokes: DFANIgetann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndaipann(_fcd filename, intf *tag, intf *ref, _fcd annotation, intf *annlen, intf *type, intf *fnlen)
{
char *fn;
Expand Down Expand Up @@ -181,7 +181,7 @@ ndaipann(_fcd filename, intf *tag, intf *ref, _fcd annotation, intf *annlen, int
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndailist(_fcd filename, intf *tag, intf reflist[], _fcd labellist, intf *listsize, intf *maxlen,
intf *startpos, intf *fnlen)
{
Expand Down Expand Up @@ -225,7 +225,7 @@ ndailist(_fcd filename, intf *tag, intf reflist[], _fcd labellist, intf *listsiz
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndalref(void)
{
return (intf)DFANlastref();
Expand All @@ -242,7 +242,7 @@ ndalref(void)
* Remarks: none
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndfanlastref(void)
{
return (intf)DFANlastref();
Expand All @@ -263,7 +263,7 @@ ndfanlastref(void)
* Invokes: DFANaddfileann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndfanaddfds(intf *dfile, _fcd desc, intf *desclen)
{
return DFANIaddfann(*dfile, _fcdtocp(desc), *desclen, DFAN_DESC);
Expand All @@ -279,7 +279,7 @@ ndfanaddfds(intf *dfile, _fcd desc, intf *desclen)
* Invokes: DFANIgetfannlen
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndfangetfidlen(intf *dfile, intf *isfirst)
{
return DFANIgetfannlen(*dfile, DFAN_LABEL, (intn)*isfirst);
Expand All @@ -295,7 +295,7 @@ ndfangetfidlen(intf *dfile, intf *isfirst)
* Invokes: DFANIgetfannlen
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndfangetfdslen(intf *dfile, intf *isfirst)
{
return DFANIgetfannlen(*dfile, DFAN_DESC, (intn)*isfirst);
Expand All @@ -312,7 +312,7 @@ ndfangetfdslen(intf *dfile, intf *isfirst)
* Invokes: DFANgetfann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndfangetfid(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
{
return DFANIgetfann(*dfile, _fcdtocp(id), *maxlen, DFAN_LABEL, (intn)*isfirst);
Expand All @@ -329,7 +329,7 @@ ndfangetfid(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
* Invokes: DFANgetfann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndfangetfds(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
{
return DFANIgetfann(*dfile, _fcdtocp(id), *maxlen, DFAN_DESC, (intn)*isfirst);
Expand All @@ -350,7 +350,7 @@ ndfangetfds(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
* Invokes: DFANaddfileann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndaafds(intf *dfile, _fcd desc, intf *desclen)
{
return DFANIaddfann(*dfile, _fcdtocp(desc), *desclen, DFAN_DESC);
Expand All @@ -366,7 +366,7 @@ ndaafds(intf *dfile, _fcd desc, intf *desclen)
* Invokes: DFANIgetfannlen
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndagfidl(intf *dfile, intf *isfirst)
{
return DFANIgetfannlen(*dfile, DFAN_LABEL, (intn)*isfirst);
Expand All @@ -382,7 +382,7 @@ ndagfidl(intf *dfile, intf *isfirst)
* Invokes: DFANIgetfannlen
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndagfdsl(intf *dfile, intf *isfirst)
{
return DFANIgetfannlen(*dfile, DFAN_DESC, (intn)*isfirst);
Expand All @@ -399,7 +399,7 @@ ndagfdsl(intf *dfile, intf *isfirst)
* Invokes: DFANIgetfann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndagfid(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
{
return DFANIgetfann(*dfile, _fcdtocp(id), *maxlen, DFAN_LABEL, (intn)*isfirst);
Expand All @@ -417,7 +417,7 @@ ndagfid(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
* Invokes: DFANgetfann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndagfds(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
{
return DFANIgetfann(*dfile, _fcdtocp(id), *maxlen, DFAN_DESC, (intn)*isfirst);
Expand All @@ -438,7 +438,7 @@ ndagfds(intf *dfile, _fcd id, intf *maxlen, intf *isfirst)
* Invokes: DFANaddfann
*---------------------------------------------------------------------------*/

FRETVAL(intf)
intf
ndaiafid(intf *dfile, _fcd id, intf *idlen)
{
return DFANIaddfann(*dfile, _fcdtocp(id), *idlen, DFAN_LABEL);
Expand Down
Loading

0 comments on commit 156afa5

Please sign in to comment.