delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/08/13:19:16

Sender: bb AT ife DOT ee DOT ethz DOT ch
Message-ID: <334A793E.69D0@ife.ee.ethz.ch>
Date: Tue, 08 Apr 1997 18:58:38 +0200
From: Bernhard Baeumle <bb AT ife DOT ee DOT ethz DOT ch>
Organization: Electronics Lab
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Desperately need help with "fopen"

Hello DJ,
I looked thru the mail-archives and tried it on the newsgroup but nobody
could help....

fopen("test.txt", "r") returns NULL as long as I have this file
("test.txt") opened with MS Word for Windows. Other programs (emacs,
editor, notepad and DOS' type) have no problem reading the file!!! As
soon as I close the file (it's no longer opened with Word) then
fopen("test.txt", "r") works fine!

It seems there is some file-locking (sharing) mechanism with Win95 but
shouldn't it be possible to open the file for reading?????????

BTW:
- I use djgpp-v2 and run it in a DOS-box under Windows95.
- I use emacs and have no such problems, but some people that use my
program would like to write the input-files (script-files) with Word ;-(
Some users (beginners) need to play around with my program which means
that they'd like to write e.g. 5 characters / save the file / run my
program and then make the next changes to the file. Just imagine the
amount of time it takes to CLOSE and then RE-OPEN the file with Word,
and they also need to find the correct line again...

I'D REALLY APRECHIATE VERY MUCH IF YOU COULD HELP ME!!!!!

Beni.
+-----------------------------------+-------------------------------+
| Bernhard Baeumle                  |                               |
| Swiss Federal Inst. of Technology | Phone: (+41) 1 632 51 53      |
| Electronics Lab, ETZ H60.1        | FAX  : (+41) 1 632 12 10      |
| Gloriastr. 35                     | Email: bb AT ife DOT ee DOT ethz DOT ch      |
| 8092 Zuerich (SWITZERLAND)        | http://www.ife.ee.ethz.ch/~bb |
+-----------------------------------+-------------------------------+

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019