[Kst] extragear/graphics/kst/kst/datasources/dirfile

Ted Kisner tskisner.public at gmail.com
Wed Jan 4 23:55:14 CET 2006


Well, GetData (eventually) passes the field name (field_code) as a const char* 
to DoIfRaw(...)

In this function, a blank RawEntryType is allocated and the field name of this 
entry is set to field_code.  A standard binary search (bsearch) is used to go 
through the format struct and search for the corresponding field.  So it is 
comparing RawEntryType structs in the search.

This is the same search code that is still used in libdirfile, where I have 
FIELD_LENGTH set to 50 without any problems...

I don't see any strange casting to long long ints, perhaps I'm missing 
something?

-Ted


On Wednesday 04 January 2006 13:41, Barth Netterfield wrote:
| Ummm....
|
| IIRC, getdata casts the field name into a long long int, in order to avoid
| strncmps in searching for the field names... hence the
| not-actually-arbitrary 16 character max field name length.
|
| Please revert, or verify that I am wrong.
|
| cbn
|
| On January 4, 2006 03:51 pm, Ted Kisner wrote:
| > SVN commit 494364 by tskisner:
| >
| > Change the annoyingly small limits on the length of a field name to
| > something that is reasonably large (but still arbitrary).
| >
| >  M  +3 -3      getdata_struct.h
| >
| >
| > --- trunk/extragear/graphics/kst/kst/datasources/dirfile/getdata_struct.h
| > #494363:494364 @@ -15,9 +15,9 @@
| >  #ifndef GETDATA_STRUCT_H
| >  #define GETDATA_STRUCT_H
| >
| > -#define FIELD_LENGTH 16
| > -#define MAX_FILENAME_LENGTH 180
| > -#define MAX_LINE_LENGTH 180
| > +#define FIELD_LENGTH 50
| > +#define MAX_FILENAME_LENGTH 250
| > +#define MAX_LINE_LENGTH 250
| >  #define MAX_LINCOM 3
| >  #define MAX_IN_COLS 15
| >
| > _______________________________________________
| > Kst mailing list
| > Kst at kde.org
| > https://mail.kde.org/mailman/listinfo/kst
|
| _______________________________________________
| Kst mailing list
| Kst at kde.org
| https://mail.kde.org/mailman/listinfo/kst


More information about the Kst mailing list