Discussion:
A Curious Situation in the C Guide for QNX (cguideq)
(too old to reply)
Paul S Person
2020-03-09 17:17:09 UTC
Permalink
I discovered an interesting problem while working on cguideq with PS:

macro .dir, defined in lnkdir.gml in docs\doc\lg, does not identify
and include some linker options marked as being used with QNX

This sort of thing is what doesn't work:

.dir heapsize opheap.gml os2 qnx win16 win32

while this sort of thing does:

.dir linearrelocs oplinear.gml qnx

and testing shows that something like

.dir <whatever> <filename> os/2 qnx

would also work, were it present.

The problem has been fixed in the code, so our wgml now omits these
items as well.

The problem in the macro is isolated to QNX and is pretty clear:

. .se *$$fnd=&'wordpos('QNX',&suppsys)

is using a variable containing the list of supported targets as it
will be displayed to the user: that is, instead of

os2 qnx win16 win32

it contains

OS/2, QNX, Win16, Win32

and, since the script function &'wordpos() deals with /words/ not
/substrings/, the search term

"QNX"

does not match what it is expected to match

"QNX,"

in the string.

The fix is obvious: this function is used earlier to construct suppsys
from the command line, so the command line can be used here to match.
The only "trick" is to use the optional parameter "3" to skip the
option name and filename. And it would be nicely restricted to QNX.

I think I should do this, since it seems likely that all the linker
options used with QNX were intended to be in the manual. But first I
must ask:

does anyone know a reason why this should not be done?

or

are these options omitted intentionally?
--
"I begin to envy Petronius."
"I have envied him long since."
Jiri Malak
2020-03-13 23:55:12 UTC
Permalink
I think it is bug in "dir" macro

proper code is

. .se *$$fnd=&'wordpos('qnx',&*,3)
Post by Paul S Person
macro .dir, defined in lnkdir.gml in docs\doc\lg, does not identify
and include some linker options marked as being used with QNX
.dir heapsize opheap.gml os2 qnx win16 win32
.dir linearrelocs oplinear.gml qnx
and testing shows that something like
.dir <whatever> <filename> os/2 qnx
would also work, were it present.
The problem has been fixed in the code, so our wgml now omits these
items as well.
. .se *$$fnd=&'wordpos('QNX',&suppsys)
is using a variable containing the list of supported targets as it
will be displayed to the user: that is, instead of
os2 qnx win16 win32
it contains
OS/2, QNX, Win16, Win32
and, since the script function &'wordpos() deals with /words/ not
/substrings/, the search term
"QNX"
does not match what it is expected to match
"QNX,"
in the string.
The fix is obvious: this function is used earlier to construct suppsys
from the command line, so the command line can be used here to match.
The only "trick" is to use the optional parameter "3" to skip the
option name and filename. And it would be nicely restricted to QNX.
I think I should do this, since it seems likely that all the linker
options used with QNX were intended to be in the manual. But first I
does anyone know a reason why this should not be done?
or
are these options omitted intentionally?
Paul S Person
2020-03-14 17:34:26 UTC
Permalink
Post by Jiri Malak
I think it is bug in "dir" macro
proper code is
. .se *$$fnd=&'wordpos('qnx',&*,3)
And I agree with you.

I just wanted to see if anyone was aware of a reason for omitting the
affected sections.

I will make the change and test it as soon as I finish off the diff I
am currently working on.
Post by Jiri Malak
Post by Paul S Person
macro .dir, defined in lnkdir.gml in docs\doc\lg, does not identify
and include some linker options marked as being used with QNX
.dir heapsize opheap.gml os2 qnx win16 win32
.dir linearrelocs oplinear.gml qnx
and testing shows that something like
.dir <whatever> <filename> os/2 qnx
would also work, were it present.
The problem has been fixed in the code, so our wgml now omits these
items as well.
. .se *$$fnd=&'wordpos('QNX',&suppsys)
is using a variable containing the list of supported targets as it
will be displayed to the user: that is, instead of
os2 qnx win16 win32
it contains
OS/2, QNX, Win16, Win32
and, since the script function &'wordpos() deals with /words/ not
/substrings/, the search term
"QNX"
does not match what it is expected to match
"QNX,"
in the string.
The fix is obvious: this function is used earlier to construct suppsys
from the command line, so the command line can be used here to match.
The only "trick" is to use the optional parameter "3" to skip the
option name and filename. And it would be nicely restricted to QNX.
I think I should do this, since it seems likely that all the linker
options used with QNX were intended to be in the manual. But first I
does anyone know a reason why this should not be done?
or
are these options omitted intentionally?
--
"I begin to envy Petronius."
"I have envied him long since."
Jiri Malak
2020-03-15 09:13:32 UTC
Permalink
I think the reason was to create specialized documentation with QNX
directives and options only.
If you create QNX version you see no reference to other "Formats:".
Post by Paul S Person
Post by Jiri Malak
I think it is bug in "dir" macro
proper code is
. .se *$$fnd=&'wordpos('qnx',&*,3)
And I agree with you.
I just wanted to see if anyone was aware of a reason for omitting the
affected sections.
I will make the change and test it as soon as I finish off the diff I
am currently working on.
Post by Jiri Malak
Post by Paul S Person
macro .dir, defined in lnkdir.gml in docs\doc\lg, does not identify
and include some linker options marked as being used with QNX
.dir heapsize opheap.gml os2 qnx win16 win32
.dir linearrelocs oplinear.gml qnx
and testing shows that something like
.dir <whatever> <filename> os/2 qnx
would also work, were it present.
The problem has been fixed in the code, so our wgml now omits these
items as well.
. .se *$$fnd=&'wordpos('QNX',&suppsys)
is using a variable containing the list of supported targets as it
will be displayed to the user: that is, instead of
os2 qnx win16 win32
it contains
OS/2, QNX, Win16, Win32
and, since the script function &'wordpos() deals with /words/ not
/substrings/, the search term
"QNX"
does not match what it is expected to match
"QNX,"
in the string.
The fix is obvious: this function is used earlier to construct suppsys
from the command line, so the command line can be used here to match.
The only "trick" is to use the optional parameter "3" to skip the
option name and filename. And it would be nicely restricted to QNX.
I think I should do this, since it seems likely that all the linker
options used with QNX were intended to be in the manual. But first I
does anyone know a reason why this should not be done?
or
are these options omitted intentionally?
Jiri Malak
2020-03-15 07:22:48 UTC
Permalink
Sorry, your message has no body.

Dne 14.3.2020 v 18:34 Paul S Person napsal(a):
Paul S Person
2020-03-15 16:57:52 UTC
Permalink
Post by Jiri Malak
Sorry, your message has no body.
That /is/ odd. But the only post I made here yesterday is the one you
already responded to, so this probably doesn't matter.
--
"I begin to envy Petronius."
"I have envied him long since."
Mat Nieuwenhoven
2020-03-16 06:33:56 UTC
Permalink
Post by Jiri Malak
Sorry, your message has no body.
I see three ms from Paul, the first from 2020-03-09. All have a body. I am
using a dedicated newsreader.

Mat Nieuwenhoven
Paul S Person
2020-03-19 16:56:15 UTC
Permalink
On Mon, 09 Mar 2020 10:17:09 -0700, Paul S Person
Post by Paul S Person
macro .dir, defined in lnkdir.gml in docs\doc\lg, does not identify
and include some linker options marked as being used with QNX
.dir heapsize opheap.gml os2 qnx win16 win32
.dir linearrelocs oplinear.gml qnx
and testing shows that something like
.dir <whatever> <filename> os/2 qnx
would also work, were it present.
The problem has been fixed in the code, so our wgml now omits these
items as well.
. .se *$$fnd=&'wordpos('QNX',&suppsys)
is using a variable containing the list of supported targets as it
will be displayed to the user: that is, instead of
os2 qnx win16 win32
it contains
OS/2, QNX, Win16, Win32
and, since the script function &'wordpos() deals with /words/ not
/substrings/, the search term
"QNX"
does not match what it is expected to match
"QNX,"
in the string.
The fix is obvious: this function is used earlier to construct suppsys
from the command line, so the command line can be used here to match.
The only "trick" is to use the optional parameter "3" to skip the
option name and filename. And it would be nicely restricted to QNX.
I think I should do this, since it seems likely that all the linker
options used with QNX were intended to be in the manual. But first I
does anyone know a reason why this should not be done?
or
are these options omitted intentionally?
And the fix has been done!
--
"I begin to envy Petronius."
"I have envied him long since."
Loading...