Hi, A program I am debugging has a 'View Readme' button which when clicked attempts to load the readme into write. Just a suggestion, but perhaps when we install the default applications we could have a symbolic link or dummy application which launches the wine version of notepad instead? Regards, Jason
On Sun, 16 Jun 2002, Ann and Jason Edmeades wrote:
Hi,
A program I am debugging has a 'View Readme' button which when clicked attempts to load the readme into write. Just a suggestion, but perhaps when we install the default applications we could have a symbolic link or dummy application which launches the wine version of notepad instead?
The problem is that write will handle RTF and Word documents correctly, while notepad is just a text editor and will only display garbage... (yes, wordpad will probably have problems with complex word documents, but it should work with simple ones) -- Francois Gouget fgouget(a)free.fr http://fgouget.free.fr/ Nouvelle version : les anciens bogues ont été remplacés par de nouveaux.
"Francois Gouget" <fgouget(a)free.fr> wrote:
The problem is that write will handle RTF and Word documents correctly, while notepad is just a text editor and will only display garbage...
(yes, wordpad will probably have problems with complex word documents, but it should work with simple ones)
I believe that Write is able to handle only old Word 5.x/6.x format files (and of course RTFs). RTFs should not produce too much trouble (just feed them to a richedit control). Regarding Word 5.x format here is a snipped from my very old DOS code which handled those files (*.doc,*.wri) well (it completely ignores formatting though): int is_word_doc(char *name, long *text_len) { int fd; unsigned short head[64]; if((fd = _open(name, O_BINARY | O_RDONLY)) == -1) return 0; _read(fd, head, sizeof(head)); _close(fd); if(head[0] != 0137061 || head[2] != 0125400) return 0; *text_len = *(long *)(head + 7) - 128L; if(*text_len > 0) *text_len -= 1; return 1; } I.e. there is a 128 bytes header with signature and text length in it. I think that our notepad could be easy enhanced to deal with that format. Write could be just a symlink to notepad. -- Dmitry.
participants (3)
-
Ann and Jason Edmeades -
Dmitry Timoshkov -
Francois Gouget