Re: BeOS changes/Library

Stephen van Egmond (svanegmond nospam at home.com)
Sun, 27 Jun 1999 23:46:17 EDT

>Hello,
>
>thanks for the BeOS diffs, I added them to the repository
>code.
>
>The only change I did not apply right now is your change
>regarding ints.
>
>Please tell me what your sizeof(int) and sizeof(long) are.
>So far we assume more or less sizeof(int) = 4.

4 and 4, respectively. Code which depends on the size of an integer,
however, should use the system-defined types like so:

uint8 int8
uint16 int16
uint32 int32
uint64 int64

I believe I coded in accordance with this standard.

>Your code looks like your system has sizeof(int) = 2
>or did I misunderstand you and there is something else
>problematic?

No, you're probably reading this from the code I wrote to parse the CD
toc. I didn't make any assumptions about structure packing, and so
pulled it out manually.

>cdi_lib

cdi_lib doesn't exist in the cdi_client repository, and if I attempt to
check it out, I get this:

$ cvs co cdi_lib
cvs server: Updating cdi_lib
cvs server: failed to create lock directory in repository `/src/
repository/cdi_lib': Permission denied
cvs server: failed to obtain dir lock in repository `/src/repository/
cdi_lib'
cvs [server aborted]: read lock failed - giving up

$ echo $CVSROOT
:pserver:freeamp nospam at cvs.freeamp.org:/src/repository

>On one hand I would like to finish this stuff on the other
>hand we (Robert and I) are glad if we could have more serious
>contributors on the project..
>
>Therefore please post an outline of your intended approach for
>discussion.
>
>We will then try to assign tasks in a manner that everyone is
>happy and the project is able to move on.

I was sold on the approach of using C instead of C++ to ensure
portability. There isn't much to be gained from it, though STL's
string is really useful compared to char*.

I noticed there is an assumption in the existing client code that
CDINDEX_DEVICE == char*, owing to what is done with the command-line
argument.

More properly, there should be a mapping function:

CDINDEX_DEVICE convert_device_name(char *argument);

to convert a command line argument into a CDINDEX_DEVICE. (Assuming
you want to keep this abstraction; I think it's a good one.)

The only real issues in the cdi library are the network communication
and the XML parsing into a usable C structure. For the record, I am
not good at writing networking code, but I have an interest in the XML
side of things, and the "building a usable API" side of things.

I'll bang together some rocks, and send out my thoughts once I can get
a look at cdi_lib.

/Steve