Re: WORDWRAP gives Segmentation Violation
Posted in 1998
Lars Olofsson wrote: > > Hi > > Problem : > Upgraded everything: Solaris 2.6, Informix 4GL ... Latest version > > Programmed worked fine before, but now it gives a segmentation fault > when > editing a "formonly". > If I remove the Attribute "WORDWRAP" from the .per file, it workes fine > except for the wordwrapping function. > > Are there someone out there that have any idea ab how to solve this. > > I am very,very new to this 4GL stuff ! > > Best Regards and hopings > > PER-file > > database formonly > screen size 24 by 80 > { > ------------------------------------------------------------------------------- > > Edit Screen > ------------------------------------------------------------------------------- > > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > [f00 > ] > } > end > attributes > f00 = formonly.edit_str,WORDWRAP COMPRESS , > comments="Press 'ESC' to confirm, or 'CTRL-C' to abort"; > instructions > delimiters "<>" > end > > .4GL code > function edit_tmpl(edit_str,l_tmpl) > > define edit_str char(2000), > old_edit_str char(2000), > l_scr_str char(1100), --leave some space for editing > > l_tmpl smallint, > l_len smallint, > l_blk1 smallint, > l_blk2 smallint, > more_flag smallint, > l_upd smallint > > let l_blk1=1 > let more_flag=0 > let l_len=length(edit_str) > display "length of edit_str=",l_len," " at 23,1 > sleep 3 > if (l_len>1000) then > let more_flag=1 > call info_msg(p_str[89],infoline-1,10,0,0) > end if > let old_edit_str=edit_str > while true > let l_upd=0 > let l_blk2=l_blk1+999 > --display "RESETTING l_scr_str :",l_blk1," : ",l_blk2 at 23,1 > sleep 3 > let l_scr_str=edit_str[l_blk1,l_blk2] > let int_flag=false > display "Before input " at 23,1 > sleep 3 > input l_scr_str > without defaults > from edit_str > attribute (bold) > help 505 > before input > if (l_tmpl) then > call info_msg(p_str[137],infoline,1,0,0) > end if > end input Version 4.0 on SCO did this. Could it be the same bug resurrected? -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 --- If all else fails, read the instructions and the release notes. Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/ ---