[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

1579.0. "DwtGetNextSegment problem on DECW V2.0 IFT1" by KASINO::TALLETT (Just one more bug to fix...) Mon Oct 16 1989 15:15

    Hi Folks!
    
    	I am having a problem with DwtGetNextSegment on IFT1 of DECwindows
    	on VMS V5.2. The code used to work on V1.0 of DECwindows (and
    	still does on Ultrix V1.0 DECwindows) but on V2.0 I always get
    	the error DwtEndCS when I try to get the first (and only) segment
    	of a compound string. My code is:
    
    char *comp_char(DwtCompString *dcs)
    {
    DwtCompStringContext ctxt;
    unsigned long charset;
    Boolean dir_r_to_l;
    unsigned long lang;
    DwtRendMask rend;
    char *temp;
    long code;
    
            if(DwtInitGetSegment(&ctxt, dcs)!=DwtSuccess){
                    printf("error -- DwtInitGetSegment failed");
                    exit(1);
            }
            if((code=DwtGetNextSegment(&ctxt, &temp, &charset, &dir_r_to_l,
                            &lang, &rend))!=DwtSuccess){
                    printf("error -- DwtGetNextSegment failed - ");
                    switch(code) {
                      case DwtEndCS:
                            printf("DwtEndCS %x: ", (long) temp);
                            printf(" %s", temp);
                            break;
                      case DwtFail:
                            printf("DwtFail");
                            break;
                      case DwtTruncate:
                            printf("DwtTruncate");
                            break;
                      default:
                            printf("unknown reason");
                            break;
                    }
                    printf("\n");
                    exit(1);
            }
            return temp;
    }
    
    
    	Any ideas anybody? I can't believe this is a toolkit bug, it must
    	be my code...... I don't want to go to VMS V5.3 until it is SSB
    	unless it actually fixes anything for me.... Also my code looks
    	just like the sample code in the bookreader documentation....hmmmm?
    	I will of course QAR if its a new bug...
    
    Thanks in advance,
    Paul Tallett,
    CEC Karlsruhe

T.RTitleUserPersonal
Name
DateLines
1579.1dir_r_to_l must be int and not BooleanTLE::D_SMITHWed Oct 18 1989 14:224
    The bug in the code is that dir_r_to_l is declared as a Boolean and not
    an int.  I ran into the same problem.  I sent mail to the author of the
    base note and changing that declaration did fix his problem.

1579.2Solved. "int" not Boolean.KASINO::TALLETTJust one more bug to fix...Wed Oct 18 1989 14:2913
    Hi guys!
    
    	A kind person sent me mail and solved my problem.
    
    	The Boolean dir_r_to_l should be an "int". I figured it
    	was my bug, but what a wierd way to show up! (I never
    	even recompiled the code from DECwindows V1 to V2 !!).
    
    Regards,
    Paul Tallett,
    CEC Karlsruhe,
    West Germany.