[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2611.0. "Missing routines: DWT$FETCH_COLOR_LITERAL, DWT$FETCH_ICON_LITERAL, DWT$FETCH_LITERAL" by AZUR::KOREVAAR (Derk Korevaar @VBO DTN 828-5430) Fri Apr 13 1990 12:03

I received the VMS V5.3 VMS DECwindows Programming Documentation Supplement. 
In there I found some nice new routines:

  DWT$FETCH_COLOR_LITERAL
  DWT$FETCH_ICON_LITERAL
  DWT$FETCH_LITERAL

I wanted to use them, but these routines do not seem to exist in the VAX 
binding. Is this an omission? We're running VMS V5.3-1

Derk.
T.RTitleUserPersonal
Name
DateLines
2611.1The C routines work...can you get to them?GSRC::WESTVariables don't, Constants aren'tSun Apr 15 1990 16:128
  Not sure but I believe this was an oops.  I've imported the C routines in
Ada for a customer and they appear to work just fine.

  I've not sumitted a QAR on this.  Maybe one should be entered.

						-=> Jim <=-

2611.2Fortran example: 'guess I've got to live with the C-binding.AZUR::KOREVAARDerk Korevaar @VBO DTN 828-5430Tue Apr 24 1990 05:3070
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		  
2611.3Is it a documentation error or not? EIGER::MISCHLERChristian Mischler - SSUP Switzerland RLE 760-2706Sat Jun 02 1990 11:5216
Hello there,

I also have a customer using ADA. He found the routine DWT$FETCH_LITERAL
documented.

So it's not a real solution to tell him to use the c-bindings. Of course
he could do the hack. But before he does a hack he wants to know:

- Is it a documentation error?   => do the hack
- Is the routine just missing in decw$dwtlibshr.exe? => don't do the hack and
  wait for this routine(s)

Thanks for any statement!

Regards
  Chris
2611.4Not in the transfer vectorLEOVAX::TREGGIARISun Jun 03 1990 08:409
> - 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
2611.5C routine works just fine...GSRC::WESTHelp stamp out and abolish redundancy !Mon Jun 04 1990 12:2518
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 <=-

2611.6XUI doesn't immediately "disappear"LEOVAX::TREGGIARIMon Jun 04 1990 14:195
>  Isn't DECwindows V3.0 OSF/Motif and not XUI ?  

Almost - it's OSF/Motif *AND* XUI (but decprecated...)

Leo