| I modified the code to use the C binding for FETCH_LITERAL:
integer function get_literal (name, trans, trans_l)
implicit none
character*(*) name, trans
integer*2 trans_l
include 'sys$library:decw$dwtstruct'
include 'dcw_src:dcw_common'
include 'dcw_src:dcw_common_main'
character*80 name_null
character*1 chr
integer*4 dwtfetchliteral, realen
integer*4 stat, buff, lit_type, i, namel
external ss$_unsupported
trans_l = 0
namel = realen (name)
name_null(:namel+1) = name(:namel) //char(0)
stat = dwtfetchliteral (
1 %val(drm_hierarchy), %ref(name_null),
2 %val(twidget(main_display_id)), buff, lit_type)
if (.not. stat) call lib$signal (%val(stat))
if (lit_type .eq. dwt$c_rgmr_type_char8) then
call str$copy_r (chr, 1, %val(buff))
i = 0
do while (chr .ge. ' ')
i = i+1
trans (i:i) = chr
buff = buff+1
call str$copy_r (chr, 1, %val(buff))
enddo
trans_l = i
else
call lib$signal (ss$_unsupported)
endif
end
c ----------------------------------------------------------------------------- !
c
c Find trailing blanks of a string.
c To speed up, test for 2 special cases:
c - all blank
c - the first blank is the start of the trailing blanks
c - otherwise, check from the end to the first blank found.
integer function realen (string)
implicit none
character*(*) string
integer*4 number, i
if (string .eq. ' ') then
i = 0
else
number = index (string, ' ')
if (number .eq. 0) then !no blanks found, take length
i = len (string)
elseif (string (number:) .eq. ' ') then !check if only blanks from here
i = number-1 !yes, done
else
do i = len (string), number-1, -1 !no other options, brute force
if (string (i:i) .ne.' ') go to 11
enddo
11 continue
endif
endif
realen = i
end
|
| > - Is the routine just missing in decw$dwtlibshr.exe? => don't do the hack and
> wait for this routine(s)
The routine is in decw$dwtlibshr.exe, but not in the shareable image
transfer vector (i.e., the linker cannot find it). This is a bug
that will be fixed in the next major DECwindows release (what is called
DECwindows V3).
Leo
|
| RE: .3
Import the C routine...this works.
RE: <<< Note 2611.4 by LEOVAX::TREGGIARI >>>
-< Not in the transfer vector >-
>> The routine is in decw$dwtlibshr.exe, but not in the shareable image
>> transfer vector (i.e., the linker cannot find it). This is a bug
>> that will be fixed in the next major DECwindows release (what is called
>> DECwindows V3).
Isn't DECwindows V3.0 OSF/Motif and not XUI ? I believe this is the case
which means that this bug will go away any way and a 'fix' is meaningless.
-=> Jim <=-
|