jpn@genrad.com (John P. Nelson) (09/12/90)
I compiled elvis using TC++ 1.0 (after first applying all the fixes that were posted). I've noticed a rather annoying behavior: If I specify a TMP directory, I can only run elvis ONCE: The second invocation fails because elvis ALWAYS uses the same tempfile name. It looks like this is happening because elvis "stat"s the file and uses the device id and inode number to create the tempfile name. While the TC++ library fills in the device id field of "struct stat", the inode number is always zero (the manual specifies that this field is irrelvent to MSDOS operation). So elvis always makes the same temp file name. This is significant to me because I use DesqView, and quite often work with more than one DOS session active at a time. I'm willing to change elvis's tempfile name creation algorithm, but what are the implications of doing this? The "recover" function will no longer work, presumably, because the tempfile name will not be predictable given the name of the file being edited. (I'm not really worried about this because I'm using a ramdisk for the tempfile anyway.) I could even change "recover" to take another command line argument (the name of the tempfile). But what else is likely to break? Alternatively, is there something that could be used as an MSDOS equivalent of an "inode number"? The first FAT entry of the file, perhaps? (Or would this change each time you rewrite the file?). Maybe something related to the directory entry? john nelson uucp: {decvax,mit-eddie}!genrad!jpn domain: jpn@genrad.com