[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: list.c /ascii read in
From: |
Pete Wyckoff |
Subject: |
Re: list.c /ascii read in |
Date: |
Fri, 23 Nov 2001 16:34:00 -0500 |
address@hidden said:
> I was intend to use oleo to work with large ascii files formated in
> rows&columns, as usual delimited by one or _more_ spaces (' ') . theese
> files are consists of about 10 columns and large number of rows (up to
> 100000). this is often the cas at scientific research centers or
> institutes they measure time series of any kind of data... you see a
> wide range of use, I know many of such institutes... and I saw that most
> of them use unix hardware but have to transfer the data to excel for
> evaluation because missing of useable software for that task under
> unix...
Most users expect that each separator character is significant, i.e.
foo<space><space>bar
will generate a row with three columns: "foo", "", "bar". If you want
to have multiple whitespace delimit only one column, you might want to
process your data file with "tr -s" first.
> so I looked round the net and found oleo. at first I said "WOW, what a
> nive thing!" and in motif too (second WOW!) 8-)) (I love motif) - but
> then the great disapointment, it could not read simple ascii files.. so
> I browesed the code of version 1.99.16 and changed the necessary lines
> and added one (line 101 and 102).
>
> I tried at first to set the delimiter in the oleo menue to a "single
> space" but nothing happens and oleo crashes while the next trial for
> reading in my file. for this I set ' ' fix for the value of sep in line
> 102. the line above increase the bptr as long as needed until the
> position of a value which is not a ' ' in bptr.
>
> I attach list.c with changes. at least I suggest to implement the
> routine via cin-operator of c++. this is more comfortable I think
> because overloading functions for different types do the job quick and
> save for every row in the file to read. at the moment I'm in hurry (do
> my exams) so I can't do it myself.. next year I can do it.
I don't know about the Motif crash, as I can't stand Motif. :)
But the following things seem to work in the X version:
Meta-x set-option<ret>file<space>list
Meta-x set-option<ret>list<space><space>
Ctrl-x Ctrl-v test<ret>
To set the default file format, set the separator to <space>,
then load the file "test".
I did add some comments to the documentation explaining the thing
about multiple whitespace, though.
-- Pete