[Tux4kids-tuxtype-dev] [Tuxmath-devel] TuxMath and TuxType BeOS ports

David Bruce davidstuartbruce at gmail.com
Thu Dec 18 16:26:50 UTC 2008


Hi,


> >         > TuxType and TuxMath both try out various paths to see if
> >         they are
> >         > valid, and subsequently the first valid path identified is
> >         used to
> >         > find the data files.  In TuxType, these paths are:
> >         >
> >         > const char PATHS[NUM_PATHS][FNLEN] =
> >         > {
> >         >   DATA_PREFIX"/share/"PACKAGE"/data",
> >         added "/boot/apps/Games/TuxTyping2/share/tuxtype/data"
> >         >   "/usr/share/"PACKAGE"/data",
> >         >   "/usr/local/share/"PACKAGE"/data",
> >         >   "./data"
> >         > };
> >
> > Hmm - I guess we need to dig into the actual function that is testing
> > the paths and enable some debugging output to see what is happening.
> > IIRC, the testing is done by CheckFile() that tries to open the path
> > as either a file or dir.
>

 Yes, the current scheme tries opendir() and fopen() on the paths listed in
that array, and uses the first valid one to load the data files.  On
tuxtype, you can use the -d command-line arg at run time to generate
debugging output (tuxmath needs to be recompiled for  debugging).  Looking
at the code, running tuxtype -d should tell us the exact spelling of the
paths that are actually being tested.  If
"/boot/apps/Games/TuxTyping2/share/tuxtype/date" really exists, but
opendir() is failing to open it, something really weird is going on.

In any event, tuxmath is able to find the data path, so we should be able to
use it as a model to get tuxtype to work again on BeOS.

Cheers,

David

>
> PS If you want to try out Haiku you can always download a raw or vmware
> image from haiku-os.org (or try the - a bit older - images I have on
>

How do I try the HDD images?  Do I make a blank partition and just copy the
image to it with dd (e.g. dd if=$HAIKU_IMAGE_FILE of=/dev/sda?, or similar)?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/tux4kids-tuxtype-dev/attachments/20081218/457ac659/attachment.htm 


More information about the Tux4kids-tuxtype-dev mailing list