Page 2 of 2

Re: Qxltool[s]

Posted: Wed Feb 27, 2019 11:24 am
by tofro
NormanDunbar wrote: Yes I like this method too, however, the code is supposed to be compatible with C68 and I'm pretty sure it doesn't do pragmas.
Norman,

it actually does if you invoke it with "extension = yes" (using this enables quite some close-to-ANSI-C constructs). Pragmas then need to exactly replicate the command-line option and they should work.

(Unfortunately, if the compiler comes across a #pragma it won't understand, they will simply be ignored...)

Tobias

Re: Qxltool[s]

Posted: Wed Feb 27, 2019 11:41 am
by NormanDunbar
Thanks Tobias.

I have a funny feeling that attempting that command line option in the past has failed, but I think the manual is incorrect in that it mentions "extensions" plural rather than singular. Maybe I need to try again.

Oh yes, the QDOS build uses qdos-gcc in the makefile, so it could be moot anyway!


Cheers,
Norm.

Re: Qxltool[s]

Posted: Wed Feb 27, 2019 11:46 am
by tofro
Yep, the manual states

-extensions=yes

would be the command line option (at least in some examples, the option as such is described correctly) , but actually

-extension=yes

is what the compiler wants to see

This option is also essential for people who like to use C++-style commenting.

Tobias

Re: Qxltool[s]

Posted: Wed Feb 27, 2019 1:38 pm
by mk79
tofro wrote:This option is also essential for people who like to use C++-style commenting.
I didn't know that, cool :-)

Cheers, Marcel

Re: Qxltool[s]

Posted: Mon Aug 12, 2019 5:02 pm
by NormanDunbar
Long time, no update!

Ok, I've had some fun, and spare time over the weekend, but enough of that! I've done a fair bit of work on the qxltool utility and it now correctly formats a QXL file with all the correct settings in the header etc. To be honest, it's taken some time to get this working - and so far, only the Unix version has been changed. A rough idea of changes are:

Lots of fixes. Now properly initialises a QXL file. Also changed:

* Added 'dir' and 'dirw' as synonyms for 'ls' and 'lslr'.
* Added 'header' command to display full header. Like info++!
* Updated the help with explanations of each command.
* Unix Makefile changed to remove multiple warnings.
* Fixed Unix qxltool.h to correctly define the header structure.
* Unfortunately, QLDIR structure is still broken. TO DO. (It uses a time_t rather than a uint32_t for one of the date fields).
* Also, because the formatting is now correct, nothing (much) else works! 'makdir test', for example, appears to work, updates free sectors etc, but nothing yet appears, however, the QLDIR structure is still 66 bytes rather than 64 - on my compilation system. TO DO!

So, there is still (lots) of work to do. But, progress!

It's only available on my GitHub repository at the moment - https://github.com/NormanDunbar/qxltools and only in the 'working' branch. If anyone wants to play that is.


Cheers,
Norm.

Re: Qxltool[s]

Posted: Mon Aug 19, 2019 7:30 pm
by Peter
Thanks for the good work and please keep us updated!

Re: Qxltool[s]

Posted: Thu Aug 22, 2019 3:05 pm
by NormanDunbar
Ha! Now I know why the code in qxltool decided to limit the maximum size of a QXL file to 256 MB. It's because that's a bug! :(
It should be limiting to 255 MB, because when the size of the file is 256 MB, the qwa_ngrp word rolls over from 65535 to zero, thus bolloxing the file. :cry:

Still, progress is being made.....


Cheers,
Norm.

Re: Qxltool[s]

Posted: Thu Aug 22, 2019 4:12 pm
by NormanDunbar
More progress to report. After only a small amount of wailing and gnashing of teeth, I have managed to make the "mkdir" function work now.

So far, it's still only source code that's available, and only from my working GitHub branch, as noted somewhere above.

So far we can do this:
  • Format a file correctly;
  • Create a directory
My next task is to figure out why "cd" segfaults - but I have my ideas! ;)

Cheers,
Norm.

Re: Qxltool[s]

Posted: Fri Aug 23, 2019 4:36 pm
by NormanDunbar
So, I have a day off today! I spent some of it making qxltool work - at least, it seems to work!

Please nip over to my githb at https://github.com/NormanDunbar/qxltools and grab the code from the "working" branch, not the "master" branch. And compile it.

On Linux, it works. However, I have found a huge bug now that many years have passed since the utility was originally written, sizeof(QLDIR *) != sizeof(int) and a lot of the code returns int values which are simply int casts of pointers, no no no no - at least, not on 64 bit systems. To this end, the Unix makefile now compiles in 32bit mode where sizeof(QLDIR *) == sizeof(int), until I get around to maybe perhaps, possibly thinking about wondering if I should perchance, look at it!

I've created and formatted QXL files, created directories, changed into them, deleted stuff etc etc, copied files from the OS into the QXL file, copied them back out and so on. So far, nothing I have done has broken it.

Please test and let me know if there's anything you find broken, if not, I'll put it "live". (I've also updated the qxltool.txt file with whatever info I have.)

If anyone has Windows C compilers, try compiling it to see if it still compiles, I'm not near a Windows box at the moment. It might still compile under C68 too. (He hinted!)


Cheers,
Norm.