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

Conference turris::decc_bugs

Title:DEC C Problem Reporting Forum
Notice:Report DEC C++ problems in TURRIS::C_PLUS_PLUS
Moderator:CXXC::REPETETCHEON
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1299
Total number of notes:6249

1009.0. "(P1) ungetc broken in OpenVMS Alpha 6.2 and VAX 6.2" by CSC32::E_VAETH () Wed Sep 13 1995 17:31

T.RTitleUserPersonal
Name
DateLines
1009.1TLE::D_SMITHWed Sep 13 1995 17:357
1009.2time frame for that ECO??CSC32::E_VAETHThu Sep 14 1995 11:335
1009.3TLE::D_SMITHThu Sep 14 1995 11:565
1009.4Customer back...CSC32::E_VAETHFri Oct 27 1995 16:096
1009.5TLE::D_SMITHSat Oct 28 1995 09:323
1009.6Is there an OpenVMS Alpha V6.1 ECO for this problem?SMAUG::GARRODIBM Interconnect EngineeringWed Mar 26 1997 19:2465
    The same problem seems to exist on OpenVMS Alpha V6.1 and
    also OpenVMS VAX V6.1.
    
    What is the version of DECC$SHR.EXE that needs ro be run on V6.1
    in order not to see this problem.
    
    The image IO was running on OPenVMS Alpha V6.1 exhibits this problem
    
           Image Identification Information
    
                    image name: "DECC$SHR"
                    image file identification: "T02.0-018"
                    image file build identification: "X5SC-SSB-0000"
                    link date/time: 13-APR-1994 16:08:48.76
                    linker identification: "T11-11"
    
    
    as does the latest DECC ECO available. After installing this image
    its ident is:
    
            Image Identification Information
    
                    image name: "DECC$SHR"
                    image file identification: "T02.0-018"
                    image file build identification: "X5SC-SSB-BA00"
                    link date/time:  6-JAN-1997 17:35:36.67
                    linker identification: "T11-11"
     
    The release notes for this ECO do not mention this fix for OpenVMS
    Alpha.
    
    In looking at all the release notes for current ECOs. It looks like
    the following ECOs incorporate the fix:
    
       OPENVMS_ALPACRT05_070_Alpha_V7_0_DEC_C_RTL_ECO_Summary 
       OpenVMS_ALPACRT08_062_Alpha_V6_2_-_V6_2-1H3_DEC_C_RTL_ECO_Summary 
       OpenVMS_VAXACRT05_070_VAX_V7_0_DEC_C_RTL_ECO_Summary 
       OpenVMS_VAXACRT08_062_VAX_V_6_2_DEC_C_RTL_ECO_Summary 
       OpenVMS_VAXACRT09_061_V5_5-2_through_V6_1_DEC_C_RTL_ECO_Summary
    
    
    Note the distinct absence of a fix for OpenVMS Alpha V6.1. Specifically
    ECO:
    
    OpenVMS_ALPACRT09_061_Alpha_V6_1_-_V6_1-1H2_DEC_C_RTL_ECO_Summary
    
    does not include the fix.
    
    My questions are three:
    
    1) Is there a supported DECC$SHR image for OpenVMS Alpha V6.1 that
       includes this fix. If so how do customers get it.
    
    2) Is OpenVMS Alpha V6.1 still formally supported by Digital? If
       so I guess I can tell customers who come across this problem
       in our producty that they HAVE to upgrade to V6.2 and then
       apply the ECO. But I don't feel I can say this if V6.1 on Alpha
       is still formally supported.
    
    3) Why is there a fix for OpenVMS VAX V6.1 but not OpenVMS Alpha V6.1?
    
    Regards,
    
    Dave Garrod
    IBM Interconnect Engineering
1009.7Program showing the problemSMAUG::GARRODIBM Interconnect EngineeringWed Mar 26 1997 19:2631
    
    Attached is a noddy problem that demonstrates the problem.
    foo.bar is any old file with characters in it. The prgram
    fails when it attepts to unget() the 'B' character. It returns -1
    instead of 'B'.
    
    Dave
    
#include <stdio.h>
main ()
{
FILE *fd;
int status;
int i;
char c;
fd = fopen("foo.bar", "r");

for (i=0;  i<3;  i++)
{
    c= getc(fd);
    printf ("read character '%c'\n", c);
}

status = ungetc('A', fd);
printf ("status = %d\n", status);
status = ungetc('B', fd);
printf ("status = %d\n", status);
c = getc(fd);
printf ("read character '%c'\n", c);
return 0;
}
1009.8Maybe not the problem I'm seeingSMAUG::GARRODIBM Interconnect EngineeringWed Mar 26 1997 20:4013
    Further investigation shows that the ungetc() problem I'm having
    doesn't seem to be fixed by ECO
    
    VAXACRT09_061
    
    on a V6.1 VAX. The ECO release notes say:
    
         o  The function ungetc stopped working in OpenVMS  V6.1  for  both
             variable and fixed length records.
    
    I'm going to open a new note on this (1283).
    
    Dave
1009.9SPECXN::DERAMODan D&#039;EramoWed Mar 26 1997 20:4322
>     Attached is a noddy problem that demonstrates the problem.
>     foo.bar is any old file with characters in it. The prgram
>     fails when it attepts to unget() the 'B' character. It returns -1
>     instead of 'B'.
        
> status = ungetc('A', fd);
> printf ("status = %d\n", status);
> status = ungetc('B', fd);
> printf ("status = %d\n", status);
        
        The standard says of ungetc
        
        	  One character of pushback is guarenteed.  If the
        	ungetc function is called too many times on the same
        	stream without an intervening read or file positioning
        	operation on that stream, the operation may fail.
        
        Unless our documentation makes more of a committment than that
        one character of pushback, then the behavior you are seeing is
        legal for ungetc.
        
        Dan