Morning Dave,

a bit of background. I started writing the libguide in 1992 it seems. I last updated it in 1994 - so it's been running "just fine" since 1994. With the recent problems running it on Q_Emulator 3.x, I decided to compile it again with additional error messages and I've hit a few problems:

I'm now using C684.5Beta.

database_h needed all the _PROTOTYPE() macro calls removing, and the #include of ansi_h was removed also. _ANSI_H was #defined.

The compilation worked, but listed calls to strfnd as having the wrong number of arguments. I had three, as per online references, but it seems the definition in string_h only has two :

        strfnd(const char *, const char *)

So, I fixed my code to remove the third (boolean) parameter, and compiled again.

This time, I discovered I was using a macro named CONSOLE which is now part of C68 in the defaults_h file. I changed mine to MAINCONSOLE to avoid the name clash.

Next problem, illegal redefinition of _cmdparams and _cmdwildcards. Well, I can't find anything to tell me how I should be (now) using these. What I had was:

        void (*_cmdparams)() = NULL;
        void (*_cmdwildcards)() = NULL;

And I notice the name has changed from _cmdwildcards to _cmdwildcard - at least, in defaults_h.

Given that defaults_h in now supplied, I changed the above two lines to the following:

        PARAMS(NULL);
        WILDCARDS(NULL);

But still the same error. I checked in the docs and CHANGES_doc mentions that these two have been changed and any program using them needs to be amended. It neglects to mention what needs to be changed though. Libansi_doc seems to have them defined as per defaults_h and my old code. :-(

As these are not really a necessity, I have commented them out for now. The compilation now runs all the way through, and fails at the link stage with one undefined reference.

Checking the map file, I see _OSERR is undefined.

I then changed all my own code to use errno_h and errno instead of _oserr, but that gave the same result, _OSERR is undefined.

It may be because the DBAS library call fsd_open also sets _oserr on the event of any errors, so this last one might need some jiggery pokery to get around, but I'll appreciate some assistance on the remainder please.

Thanks.


Cheers,
Norm.


On 16/04/12 17:41, Dave Walker wrote:

-----Original Message-----
From: [email protected] [mailto:ql-users-
[email protected]] On Behalf Of Norman Dunbar
Sent: 16 April 2012 16:08
To: [email protected]
Subject: [Ql-Users] C68 and the Quanta Library Guide

Sorry, I've pulled this one out from the "query" discussion, maybe Dave
Walker will notice it here as a new topic...

On 16/04/12 15:52, Dilwyn Jones wrote:
  >  Ahem, excuse me!!!
  >
  >  _*sulk*_
  >
  >  :o)

Sorry Dilwyn, couldn't resist! ;-)

Anyway, back on topic - unusual for me I admit, but - I've had a look
at the version of DBAs that I have, 2.12, and the C68 headers seem to
be non-ansi format.

It looks like c68 did away with the file ansi_h at some point long ago
when it changed over to the default of being ansi compliant? Maybe?

Anyway, it is with horror that I find that I can no longer compile the
libguide or libadmin utilities under the current version of C68 - which
is 4.5 Beta according to the c68 command.

Does anyone have a version of DBAs that has ansi standard header files
instead of the old ones please? I'd hate to be in the position of being
called upon to maybe do some work on this program and being completely
unable!

Maybe I'll have to rewrite it in assembler for the PE! (I jest by the
way!)



Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Norman,

I found an old copy of the ansi.h file.    It did not look as though it did
much so you may well just be able to comment it out.   I think the
equivalent functionality is now built into the individual header files.   I
hope so as I do not believe I have a full set of the original header files
from that time.

Depending on the state of the code you may well have to relax the
warning/error levels to get the code to compile without errors.

Dave Walker

Tel:  +44 (0)1707 652791
Mob: +44 (0)7999 218953
Web: http://www.itimpi.com
Skype:  itimpi

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm



--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to