version.c add NT351 to the switch

Paul Vriens Paul.Vriens at xs4all.nl
Sat Dec 18 11:55:02 CST 2004


On Sat, 2004-12-18 at 15:16, Vincent Béron wrote:
> Le sam 18/12/2004 à 05:51, Paul Vriens a écrit :
> > Hi,
> > 
> > put the NT351 check also in the switch. The goal is to have everything in
> > the switch eventually.
> > 
> > Changelog:
> > Move NT351 check to the main switch.
> > 
> > Cheers,
> > 
> > Paul.
> > ----
> > 
> 
> > --- wine/dlls/ntdll/version.c	2004-12-18 11:40:12.717071142 +0100
> > +++ wine.paul/dlls/ntdll/version.c	2004-12-18 11:44:38.952480858 +0100
> > @@ -431,12 +431,6 @@
> >            ophd->MajorImageVersion, ophd->MinorImageVersion,
> >            ophd->MajorSubsystemVersion, ophd->MinorSubsystemVersion);
> >  
> > -    /* special nt 3.51 */
> > -    if (3 == ophd->MajorOperatingSystemVersion && 51 == ophd->MinorOperatingSystemVersion)
> > -    {
> > -        return NT351;
> > -    }
> > -
> >      /* the MajorSubsystemVersion is the only usable sign */
> >      if (ophd->MajorSubsystemVersion < 4)
> >      {
> 
> Since for NT3.51 (according to the comment in the function header)
> MajorSubsystemVersion == 3 for system dlls (minus comctl32.dll), the
> flow will go in the if just above and not in the main switch.
> 
> > @@ -476,6 +470,10 @@
> >              break;
> >          }
> >          break;
> > +    case 3:
> > +        if(ophd->MinorOperatingSystemVersion == 51)
> > +           return NT351;
> > +        break;
> >      case 1:
> >          if(ophd->MinorOperatingSystemVersion == 0)
> >             return WIN95;
> 
> Vincent
> 
> 
> 

OK, what about the attached one? This gets rid of the if's altogether
and leaves us with just one switch.

Changelog:
Do all the checks in one switch.

Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: version.diff
Type: text/x-patch
Size: 1490 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041218/76bae95c/version.bin


More information about the wine-patches mailing list