View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum ↗

iraf-v216 · Code · Issues (50) · Pull requests (81)

iraf.net pull request #88

Fix type of arguments for several procedure calls

merge 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


Last updated on 2017-09-21