bug-oleo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Different file formats


From: Harold W. Baldwin
Subject: Different file formats
Date: Wed, 9 May 2001 22:43:48 -0500 (CDT)

I've been trying to load and save different file formats, but with no
success.  In the process, I think I may have found an error in the code in
the io-utils.c file.  But first let me detail what I think I know so far.

1.  The first question is of course: what are the possible formats?  In
io-utils.c at the entry  file_formats[] , there is the following list: oleo,
sylk, sc, list, csv, dbf, panic, and sylk-noa0.

2.  It seems that oleo determines the format to use to load a file by the
extension (if there is one) on the file, otherwise it is loaded using some
default format.  I say this based on the following: I created a test file,
saved it with no extension, and was able to reload it OK.  I then renamed
it with a  .ol  extension, and when I reloaded it the original contents
were not displayed.  I then renamed it with a  .oleo  extension, and when I
reloaded it, the original contents were displayed.

3.  Next: setting and changing file formats.  (This is where I'm lost.)
Viewing the options by doing  ^h o  shows the following entry:  File
format: oleo.  So apparently one should be able to change this, presumably
by doing M-x set-option, then entering the name of the option to set, and
then entering the value to set it to, e.g., csv.  

So here's the question:  what is the name of the option to set?  I tried a
number of different possibilities (like file-format, file_format,
etc. etc.) with no luck.

4.  In trying to figure out the name of the option, I went hunting through
io-utils.c and found what I think may be an error in the code.  Throughout
the file there are entries spelled  stricmp  which, I'm guessing, does a
string comparison.  But in one place, and one place only, in the entire
file, there is an entry spelled  strcmp  and it occurs at the entry
file_get_pattern .  Now if file_get_pattern is supposed to figure out the
file format and strcmp isn't doing what its should be doing, wouldn't this
mess up the use of non-default file formats?

I hope all this is useful, if not by way to fixing some code, then perhaps
by way of helping with some documentation.

                   Regard,
                      Wes Baldwin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]