🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #28001

Help! Fdatime() under Lattice C blows up.

#28001
From: Sheldon Maloff
Date: Sat, 22 Aug 1987 02:28
39 lines
1926 bytes
I'm hoping somebody out there can help me with this. I'm converting a
'make' program to compile and link under Lattice C 3.03. Everything works
except the 'touch' module. I'm having problems with the gemdos call
'Fdatime().'

The program lines looks like:

#define Fdatime(a,b,c)	gemdos(0x57,a,b,c)
		.
		.
		.
	unsigned long time;	/* declarations of variables */
	short fd;		/* file handle */
		.
		.		/* code to open a file via gemdos */
		.		/* and set the time		  */
		.
	Fdatime(fd,&time,1);	/* time stamp the file */
	Fclose(fd);

The program bombs in Fdatime() with 2 bombs (buss error). I've heard the
'Hitchhiker's Guide to the Bios' is wrong and  was recommended to try

	Fdatime(&time,fd,1);	/* first two args switched */

The program now bombs with 3 bombs (address error).
I think I've tried almost every combination of passing in (short) and 
(long) casts within the function call, but I still get the same
two errors. After two days of this, I'm getting rather annoyed. What
am I doing wrong?  The variable fd = 6, and time = valid Dos time format,
and the program always throws up at the Fdatime() function. This isn't
the first time I've had a fight with the Lattice C compiler, but this time
I don't know if its me, Lattice, or the OS. Gemdos calls are new to me.

	Sheldon.

        seismo!calgary!maloff
	maloff@calgary.UUCP
Technical Details
Message-ID: <1053@vaxb.calgary.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!ames!ptsfa!ihnp4!alberta!calgary!maloff

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!ames!ptsfa!ihnp4!alberta!calgary!maloff
From: maloff@calgary.UUCP (Sheldon Maloff)
Newsgroups: comp.sys.atari.st
Subject: Help! Fdatime() under Lattice C blows up.
Message-ID: <1053@vaxb.calgary.UUCP>
Date: Fri, 21-Aug-87 22:28:34 EDT
Article-I.D.: vaxb.1053
Posted: Fri Aug 21 22:28:34 1987
Date-Received: Sun, 23-Aug-87 10:26:30 EDT
Distribution: na
Organization: U. of Calgary, Calgary, Ab.
Lines: 39
Keywords: Lattice Fdatime()