On Thu, 2008-12-25 at 10:48 +0800, Wu, Fengguang wrote:
> On Sat, Dec 20, 2008 at 04:44:41AM +0200, Ma, Ling wrote:
> > handle detailed timing in xf86Configure.c
> 
> Useless changelog. What it does and why?
> Is it a code refactor? Any behavior changes?
> 
> Thanks,
> Fengguang
Hi Fengguang

There is no new feature or behavior change.yes, I need to add change log
in it.

thanks
Ma Ling 
> 
> > ---
> >  hw/xfree86/common/xf86Configure.c |   56 
> > ++++++++++++++++++++----------------
> >  1 files changed, 31 insertions(+), 25 deletions(-)
> > 
> > diff --git a/hw/xfree86/common/xf86Configure.c 
> > b/hw/xfree86/common/xf86Configure.c
> > index b803b49..53e207f 100644
> > --- a/hw/xfree86/common/xf86Configure.c
> > +++ b/hw/xfree86/common/xf86Configure.c
> > @@ -531,6 +531,35 @@ configureMonitorSection (int screennum)
> >      return ptr;
> >  }
> >  
> > +static void handle_detailed_input(struct detailed_monitor_section *det_mon,
> > +                                  void *data)
> > +{
> > +    XF86ConfMonitorPtr ptr = (XF86ConfMonitorPtr) data; 
> > +
> > +    switch (det_mon->type) {
> > +    case DS_NAME:
> > +        ptr->mon_modelname = xf86confrealloc(ptr->mon_modelname, 
> > +                                             
> > strlen((char*)(det_mon->section.name)) +
> > +                                             1);
> > +        strcpy(ptr->mon_modelname,
> > +         (char*)(det_mon->section.name));
> > +        break;
> > +    case DS_RANGES:
> > +        ptr->mon_hsync[ptr->mon_n_hsync].lo =
> > +            det_mon->section.ranges.min_h;
> > +        ptr->mon_hsync[ptr->mon_n_hsync].hi =
> > +            det_mon->section.ranges.max_h;
> > +        ptr->mon_n_vrefresh = 1;
> > +        ptr->mon_vrefresh[ptr->mon_n_hsync].lo =
> > +            det_mon->section.ranges.min_v;
> > +        ptr->mon_vrefresh[ptr->mon_n_hsync].hi =
> > +            det_mon->section.ranges.max_v;
> > +        ptr->mon_n_hsync++;
> > +    default:
> > +        break;
> > +    }
> > +}
> > +
> >  static XF86ConfMonitorPtr
> >  configureDDCMonitorSection (int screennum)
> >  {
> > @@ -578,31 +607,8 @@ configureDDCMonitorSection (int screennum)
> >      }
> >  #endif /* def CONFIGURE_DISPLAYSIZE */
> >  
> > -    for (i=0;i<4;i++) {
> > -   switch (ConfiguredMonitor->det_mon[i].type) {
> > -       case DS_NAME:
> > -           ptr->mon_modelname  = xf86confrealloc(ptr->mon_modelname, 
> > -             strlen((char*)(ConfiguredMonitor->det_mon[i].section.name))
> > -               + 1);
> > -           strcpy(ptr->mon_modelname,
> > -                  (char*)(ConfiguredMonitor->det_mon[i].section.name));
> > -           break;
> > -       case DS_RANGES:
> > -           ptr->mon_hsync[ptr->mon_n_hsync].lo =
> > -               ConfiguredMonitor->det_mon[i].section.ranges.min_h;
> > -           ptr->mon_hsync[ptr->mon_n_hsync].hi =
> > -               ConfiguredMonitor->det_mon[i].section.ranges.max_h;
> > -           ptr->mon_n_vrefresh = 1;
> > -           ptr->mon_vrefresh[ptr->mon_n_hsync].lo =
> > -               ConfiguredMonitor->det_mon[i].section.ranges.min_v;
> > -           ptr->mon_vrefresh[ptr->mon_n_hsync].hi =
> > -               ConfiguredMonitor->det_mon[i].section.ranges.max_v;
> > -           ptr->mon_n_hsync++;
> > -       default:
> > -           break;
> > -   }
> > -    }
> > -
> > +    xf86ForEachDetailedBlock(ConfiguredMonitor, handle_detailed_input,
> > +                             ptr);
> >      if (ConfiguredMonitor->features.dpms) {
> >        ptr->mon_option_lst = xf86addNewOption(ptr->mon_option_lst, 
> > xstrdup("DPMS"), NULL);
> >      }
> > -- 
> > 1.5.4.4
> > 
> > 
> > 

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to