🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
1 messages
1 total messages Started by R. Scott Youmans Tue, 13 Mar 1990 01:11
Trouble with MSC, FileIO, & 10Net (whew!)
#1552
Author: R. Scott Youmans
Date: Tue, 13 Mar 1990 01:11
47 lines
2612 bytes
I am using 2 386 IBM-PC clones with DOS 3.3, 10NET Lan software,
Metawindows & Island Graphics software and Microsoft C5.1 ... and I
have a problem.  The overview of the task is simple: pressing a key on
PC-A pulls up a graphics screen on both PC-A and PC-B. PC-B should not
display its screen until it receives a signal from A. This is done for
20 screens.

To do this quickly, I decided to use a shared file ovcer the network.
PC-A creates it whenever a key is pressed. PC-B loops on fopen()!=NULL
until the file exists. Then it closes the file, deletes it, and
displays its image. So, what`s the problem?

PC-A runs fine all the way through. PC-B only runs through about half (13)
of the screens! Here is the main loop on PC-B:

	while (!kbhit() && current < 19) {
	   if (next = fopen (SYNC, "r") != NULL) {
		fclose(next);
  		readstatus = ReadPaint (image_list[current++], thePort);
		remove (SYNC);
	   }
	}

So, while it is not interrupted with a keypress, or current is < 19, it checks
for the existance of the SYNC file. If present, it closes it, read in the image
and removes the file. 

I have tracked down the problen to the fopen in ReadPaint. It is unable to 
open the file even though it is in the current directory. Then, on subsequent
attempts the fopen(SYNC) command fails, even though the file is present. It is
as if I ran out of files to open, or some buffer got screwed.

Oh, in config.sys, files=40 buffers=20.

If one of you recognises the problem, or wishes to help, I would like 
your assistance. I've put too many hours on this already.

Also, if you know of an alternative (Interprocess Communication or other)
on 10Net or with shared files, please speak up!

This is my first big experience with MSC and DOS (from a UNIX environment),
so don't hesitate to state the obvious.

Much thanks, (the weary...)
Scott Youmans....................................youmans@cs.odu.edu
Computer Science
Old Dominion University..............................Save The Earth
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads