forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Odd change experienced ....

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Jun 25, 2013 11:56 am    Post subject: Odd change experienced .... Reply with quote

I have come across a weird change. One of my programs contains this line:

Code:
      I=WINIO@('%nlTraverse Root name (2 letters e.g. AA)'//
     &         '%fn[Arial]%ts%`bg[white]%3^rs%sf&',
     &          1.25D0, A0,  iRoot)


A0 is CHARACTER*(2)

Using a straight version of FTN95 6.10 with no changes to salflibc.dll, I can enter 2 characters into the box before I get a 'bing' sound. Using the beta salflibc.dll, I can only enter 1 character before I get the 'bing'. This is not anything to do with the callback function iRoot, although iRoot does contain BEEP@, because I have tried it with WRITE statements before and after the BEEP@s, and they are not accessed. Moreover, if I make the character variable A0 into CHARACTER*(3), I can get the desired 2 character input, and only get 'bing' when I try a 3rd character in input.

I have tried this with my 6.10 (with beta salflibc.dll) and also 6.35 pe version (again with beta salflibc.dll). I also tried increasing the %3^rs to %5^rs, to no effect. I wonder if it is one of those dreaded "reversions"?

A tiny test code that shows it is:

Code:
      WINAPP
      PROGRAM SURVEYOR
      CHARACTER*(2) A2 ! allows 1 character only
      CHARACTER*(3) A3 ! allows 2 characters
      INTEGER, EXTERNAL:: iRoot
      INCLUDE <WINDOWS.INS>
      A2='  '
      A3='   '
      I=WINIO@('%nlTraverse Root name (1 letter only e.g. A) '//
     &         '%fn[Arial]%ts%`bg[white]%3^rs%sf&',
     &          1.25D0, A2,  iRoot)
      I=WINIO@('%2nlTraverse Root name (2 letters e.g. AA) '//
     &         '%fn[Arial]%ts%`bg[white]%3^rs%sf&',
     &          1.25D0, A3,  iRoot)
      I=WINIO@('%sf')
      END
      INTEGER FUNCTION iRoot()
      iRoot = 1
      END


The program gets an outing once a year for a week, and this is the week! (My colleague who is using it, knows that I am an inveterate tinkerer, and thinks that I have changed something ...)

Eddie

PS - ignore the superfluous %sf.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Tue Jun 25, 2013 3:16 pm    Post subject: Reply with quote

I think that is change results from a fix in salflibc.dll. This change limits the size of the edit buffer for %rs to the size of the related character variable. Otherwise ClearWin+ will copy back more characters than there is space for.

It is possible that I should have allowed one more character but this may have something to do with a NULL terminator in C.

I will log this for investigation.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Jun 25, 2013 7:33 pm    Post subject: Reply with quote

I am sure that it is something of the kind. I was already allowing for letters bigger than an average by specifying %3rs when I only wanted 2, and it is definitely a change. You wouldn't notice it so easily for a long string.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Wed Jun 26, 2013 6:55 am    Post subject: Reply with quote

I have fixed this for the next beta release (coming shortly I hope).
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group