iraf-v216 · Code · Issues (50) · Pull requests (81)
iraf.net pull request #88
Fix type of arguments for several procedure calls
olebole merged 8 commits to iraf-community/iraf
olebole commented on 2017-06-14
IRAF_MAIN
is an SPP procedure in sys/etc/main.x
. Some of its arguments are int
:
int procedure iraf_main (a_cmd, a_inchan, a_outchan, a_errchan,
a_driver, a_devtype, prtype, bkgfile, jobcode, sys_runtask, onentry)
char a_cmd[ARB] # command to be executed or null string
int a_inchan # process standard input
int a_outchan # process standard output
int a_errchan # process standard error output
int a_driver # ZLOCPR address of device driver
int a_devtype # device type (text or binary)
int prtype # process type (connected, detached, host)
char bkgfile[ARB] # packed filename of bkg file if detached
int jobcode # jobcode if detached process
extern sys_runtask() # client task execution procedure
extern onentry() # client onentry procedure
This translates into XINT *
as the required argument type in C (and not int *
) when called in sys/os/zmain.c
. Depending on memory structure and endianess (the problem appeared at IBM z Systems, a big endian system), this will give wrong values for the argument.
Commits
- Fix type of arguments for IRAF_MAIN [930c7204]
- Correct the argument type in setjmp/longjmp #defines [221b090f]
- Fix argument type of ZOPNND call in vm_connect() [d36b1ca8]
- Fix argument type of ZGMTCO in ZFUTIM [9e14b0d7]
- Fix pointer type for ZCLSND call [f04d8cae]
- Fix pointer type for ZAWTBF call [4149c75b]
- Fix pointer type for BYTMOV call [5d35a762]
- Use stdarg for dbgmsg in zfioks.c [8a9d2d7b]
Last updated on 2017-09-21