(file) Return to Monitor.c CVS log (file) (dir) Up to [XFree86 CVS] / xc / programs / Xserver / hw / xfree86 / parser

Diff for /xc/programs/Xserver/hw/xfree86/parser/Monitor.c between version 1.21 and 1.22

version 1.21, 2001/06/30 04:00:23 version 1.22, 2001/07/02 15:38:34
Line 1 
Line 1 
 /* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Monitor.c,v 1.20 2001/02/21 23:37:04 paulo Exp $ */  /* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Monitor.c,v 1.21 2001/06/30 04:00:23 paulo Exp $ */
 /* /*
  *  *
  * Copyright (c) 1997  Metro Link Incorporated  * Copyright (c) 1997  Metro Link Incorporated
Line 100 
Line 100 
         parsePrologue (XF86ConfModeLinePtr, XF86ConfModeLineRec)         parsePrologue (XF86ConfModeLinePtr, XF86ConfModeLineRec)
  
         /* Identifier */         /* Identifier */
         if (xf86getToken (NULL) != STRING)          if (xf86getSubToken (&(ptr->ml_comment)) != STRING)
                 Error ("ModeLine identifier expected", NULL);                 Error ("ModeLine identifier expected", NULL);
         ptr->ml_identifier = val.str;         ptr->ml_identifier = val.str;
  
         /* DotClock */         /* DotClock */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine dotclock expected", NULL);                 Error ("ModeLine dotclock expected", NULL);
         ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);         ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);
  
         /* HDisplay */         /* HDisplay */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine Hdisplay expected", NULL);                 Error ("ModeLine Hdisplay expected", NULL);
         ptr->ml_hdisplay = val.num;         ptr->ml_hdisplay = val.num;
  
         /* HSyncStart */         /* HSyncStart */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine HSyncStart expected", NULL);                 Error ("ModeLine HSyncStart expected", NULL);
         ptr->ml_hsyncstart = val.num;         ptr->ml_hsyncstart = val.num;
  
         /* HSyncEnd */         /* HSyncEnd */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine HSyncEnd expected", NULL);                 Error ("ModeLine HSyncEnd expected", NULL);
         ptr->ml_hsyncend = val.num;         ptr->ml_hsyncend = val.num;
  
         /* HTotal */         /* HTotal */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine HTotal expected", NULL);                 Error ("ModeLine HTotal expected", NULL);
         ptr->ml_htotal = val.num;         ptr->ml_htotal = val.num;
  
         /* VDisplay */         /* VDisplay */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine Vdisplay expected", NULL);                 Error ("ModeLine Vdisplay expected", NULL);
         ptr->ml_vdisplay = val.num;         ptr->ml_vdisplay = val.num;
  
         /* VSyncStart */         /* VSyncStart */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine VSyncStart expected", NULL);                 Error ("ModeLine VSyncStart expected", NULL);
         ptr->ml_vsyncstart = val.num;         ptr->ml_vsyncstart = val.num;
  
         /* VSyncEnd */         /* VSyncEnd */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine VSyncEnd expected", NULL);                 Error ("ModeLine VSyncEnd expected", NULL);
         ptr->ml_vsyncend = val.num;         ptr->ml_vsyncend = val.num;
  
         /* VTotal */         /* VTotal */
         if (xf86getToken (NULL) != NUMBER)          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                 Error ("ModeLine VTotal expected", NULL);                 Error ("ModeLine VTotal expected", NULL);
         ptr->ml_vtotal = val.num;         ptr->ml_vtotal = val.num;
  
         token = xf86getToken (TimingTab);          token = xf86getSubTokenWithTab (&(ptr->ml_comment), TimingTab);
         while ((token == TT_INTERLACE) || (token == TT_PHSYNC) ||         while ((token == TT_INTERLACE) || (token == TT_PHSYNC) ||
                    (token == TT_NHSYNC) || (token == TT_PVSYNC) ||                    (token == TT_NHSYNC) || (token == TT_PVSYNC) ||
                    (token == TT_NVSYNC) || (token == TT_CSYNC) ||                    (token == TT_NVSYNC) || (token == TT_CSYNC) ||
Line 188 
Line 188 
                         ptr->ml_flags |= XF86CONF_DBLSCAN;                         ptr->ml_flags |= XF86CONF_DBLSCAN;
                         break;                         break;
                 case TT_HSKEW:                 case TT_HSKEW:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                                 Error (NUMBER_MSG, "Hskew");                                 Error (NUMBER_MSG, "Hskew");
                         ptr->ml_hskew = val.num;                         ptr->ml_hskew = val.num;
                         ptr->ml_flags |= XF86CONF_HSKEW;                         ptr->ml_flags |= XF86CONF_HSKEW;
Line 197 
Line 197 
                         ptr->ml_flags |= XF86CONF_BCAST;                         ptr->ml_flags |= XF86CONF_BCAST;
                         break;                         break;
                 case TT_VSCAN:                 case TT_VSCAN:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                                 Error (NUMBER_MSG, "Vscan");                                 Error (NUMBER_MSG, "Vscan");
                         ptr->ml_vscan = val.num;                         ptr->ml_vscan = val.num;
                         ptr->ml_flags |= XF86CONF_VSCAN;                         ptr->ml_flags |= XF86CONF_VSCAN;
Line 212 
Line 212 
                         Error (INVALID_KEYWORD_MSG, xf86tokenString ());                         Error (INVALID_KEYWORD_MSG, xf86tokenString ());
                         break;                         break;
                 }                 }
                 token = xf86getToken (TimingTab);                  token = xf86getSubTokenWithTab (&(ptr->ml_comment), TimingTab);
         }         }
         xf86unGetToken (token);         xf86unGetToken (token);
  
Line 229 
Line 229 
         int had_dotclock = 0, had_htimings = 0, had_vtimings = 0;         int had_dotclock = 0, had_htimings = 0, had_vtimings = 0;
         parsePrologue (XF86ConfModeLinePtr, XF86ConfModeLineRec)         parsePrologue (XF86ConfModeLinePtr, XF86ConfModeLineRec)
  
                 if (xf86getToken (NULL) != STRING)                  if (xf86getSubToken (&(ptr->ml_comment)) != STRING)
                 Error ("Mode name expected", NULL);                 Error ("Mode name expected", NULL);
         ptr->ml_identifier = val.str;         ptr->ml_identifier = val.str;
         while ((token = xf86getToken (ModeTab)) != ENDMODE)         while ((token = xf86getToken (ModeTab)) != ENDMODE)
         {         {
                 switch (token)                 switch (token)
                 {                 {
                   case COMMENT:
                           ptr->ml_comment = xf86addComment(ptr->ml_comment, val.str);
                           break;
                 case DOTCLOCK:                 case DOTCLOCK:
                         if ((token = xf86getToken (NULL)) != NUMBER)                          if ((token = xf86getSubToken (&(ptr->ml_comment))) != NUMBER)
                                 Error (NUMBER_MSG, "DotClock");                                 Error (NUMBER_MSG, "DotClock");
                         ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);                         ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);
                         had_dotclock = 1;                         had_dotclock = 1;
                         break;                         break;
                 case HTIMINGS:                 case HTIMINGS:
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_hdisplay = val.num;                                 ptr->ml_hdisplay = val.num;
                         else                         else
                                 Error ("Horizontal display expected", NULL);                                 Error ("Horizontal display expected", NULL);
  
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_hsyncstart = val.num;                                 ptr->ml_hsyncstart = val.num;
                         else                         else
                                 Error ("Horizontal sync start expected", NULL);                                 Error ("Horizontal sync start expected", NULL);
  
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_hsyncend = val.num;                                 ptr->ml_hsyncend = val.num;
                         else                         else
                                 Error ("Horizontal sync end expected", NULL);                                 Error ("Horizontal sync end expected", NULL);
  
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_htotal = val.num;                                 ptr->ml_htotal = val.num;
                         else                         else
                                 Error ("Horizontal total expected", NULL);                                 Error ("Horizontal total expected", NULL);
                         had_htimings = 1;                         had_htimings = 1;
                         break;                         break;
                 case VTIMINGS:                 case VTIMINGS:
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_vdisplay = val.num;                                 ptr->ml_vdisplay = val.num;
                         else                         else
                                 Error ("Vertical display expected", NULL);                                 Error ("Vertical display expected", NULL);
  
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_vsyncstart = val.num;                                 ptr->ml_vsyncstart = val.num;
                         else                         else
                                 Error ("Vertical sync start expected", NULL);                                 Error ("Vertical sync start expected", NULL);
  
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_vsyncend = val.num;                                 ptr->ml_vsyncend = val.num;
                         else                         else
                                 Error ("Vertical sync end expected", NULL);                                 Error ("Vertical sync end expected", NULL);
  
                         if (xf86getToken (NULL) == NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
                                 ptr->ml_vtotal = val.num;                                 ptr->ml_vtotal = val.num;
                         else                         else
                                 Error ("Vertical total expected", NULL);                                 Error ("Vertical total expected", NULL);
                         had_vtimings = 1;                         had_vtimings = 1;
                         break;                         break;
                 case FLAGS:                 case FLAGS:
                         token = xf86getToken (NULL);                          token = xf86getSubToken (&(ptr->ml_comment));
                         if (token != STRING)                         if (token != STRING)
                                 Error (QUOTE_MSG, "Flags");                                 Error (QUOTE_MSG, "Flags");
                         while (token == STRING)                         while (token == STRING)
Line 332 
Line 335 
                                         Error ("Unknown flag string", NULL);                                         Error ("Unknown flag string", NULL);
                                         break;                                         break;
                                 }                                 }
                                 token = xf86getToken (NULL);                                  token = xf86getSubToken (&(ptr->ml_comment));
                         }                         }
                         xf86unGetToken (token);                         xf86unGetToken (token);
                         break;                         break;
                 case HSKEW:                 case HSKEW:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                                 Error ("Horizontal skew expected", NULL);                                 Error ("Horizontal skew expected", NULL);
                         ptr->ml_flags |= XF86CONF_HSKEW;                         ptr->ml_flags |= XF86CONF_HSKEW;
                         ptr->ml_hskew = val.num;                         ptr->ml_hskew = val.num;
                         break;                         break;
                 case VSCAN:                 case VSCAN:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
                                 Error ("Vertical scan count expected", NULL);                                 Error ("Vertical scan count expected", NULL);
                         ptr->ml_flags |= XF86CONF_VSCAN;                         ptr->ml_flags |= XF86CONF_VSCAN;
                         ptr->ml_vscan = val.num;                         ptr->ml_vscan = val.num;
Line 386 
Line 389 
                         ptr->mon_comment = xf86addComment(ptr->mon_comment, val.str);                         ptr->mon_comment = xf86addComment(ptr->mon_comment, val.str);
                         break;                         break;
                 case IDENTIFIER:                 case IDENTIFIER:
                         if (xf86getToken (NULL) != STRING)                          if (xf86getSubToken (&(ptr->mon_comment)) != STRING)
                                 Error (QUOTE_MSG, "Identifier");                                 Error (QUOTE_MSG, "Identifier");
                         if (has_ident == TRUE)                         if (has_ident == TRUE)
                                 Error (MULTIPLE_MSG, "Identifier");                                 Error (MULTIPLE_MSG, "Identifier");
Line 394 
Line 397 
                         has_ident = TRUE;                         has_ident = TRUE;
                         break;                         break;
                 case VENDOR:                 case VENDOR:
                         if (xf86getToken (NULL) != STRING)                          if (xf86getSubToken (&(ptr->mon_comment)) != STRING)
                                 Error (QUOTE_MSG, "Vendor");                                 Error (QUOTE_MSG, "Vendor");
                         ptr->mon_vendor = val.str;                         ptr->mon_vendor = val.str;
                         break;                         break;
                 case MODEL:                 case MODEL:
                         if (xf86getToken (NULL) != STRING)                          if (xf86getSubToken (&(ptr->mon_comment)) != STRING)
                                 Error (QUOTE_MSG, "ModelName");                                 Error (QUOTE_MSG, "ModelName");
                         ptr->mon_modelname = val.str;                         ptr->mon_modelname = val.str;
                         break;                         break;
Line 412 
Line 415 
                                                  XF86ConfModeLinePtr);                                                  XF86ConfModeLinePtr);
                         break;                         break;
                 case DISPLAYSIZE:                 case DISPLAYSIZE:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
                                 Error (DISPLAYSIZE_MSG, NULL);                                 Error (DISPLAYSIZE_MSG, NULL);
                         ptr->mon_width = val.realnum;                         ptr->mon_width = val.realnum;
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
                                 Error (DISPLAYSIZE_MSG, NULL);                                 Error (DISPLAYSIZE_MSG, NULL);
                         ptr->mon_height = val.realnum;                         ptr->mon_height = val.realnum;
                         break;                         break;
  
                 case HORIZSYNC:                 case HORIZSYNC:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
                                 Error (HORIZSYNC_MSG, NULL);                                 Error (HORIZSYNC_MSG, NULL);
                         do {                         do {
                                 ptr->mon_hsync[ptr->mon_n_hsync].lo = val.realnum;                                 ptr->mon_hsync[ptr->mon_n_hsync].lo = val.realnum;
                                 switch (token = xf86getToken (NULL))                                  switch (token = xf86getSubToken (&(ptr->mon_comment)))
                                 {                                 {
                                         case COMMA:                                         case COMMA:
                                                 ptr->mon_hsync[ptr->mon_n_hsync].hi =                                                 ptr->mon_hsync[ptr->mon_n_hsync].hi =
                                                 ptr->mon_hsync[ptr->mon_n_hsync].lo;                                                 ptr->mon_hsync[ptr->mon_n_hsync].lo;
                                                 break;                                                 break;
                                         case DASH:                                         case DASH:
                                                 if (xf86getToken (NULL) != NUMBER ||                                                  if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER ||
                                                     (float)val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)                                                     (float)val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)
                                                         Error (HORIZSYNC_MSG, NULL);                                                         Error (HORIZSYNC_MSG, NULL);
                                                 ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum;                                                 ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum;
                                                 if ((token = xf86getToken (NULL)) == COMMA)                                                  if ((token = xf86getSubToken (&(ptr->mon_comment))) == COMMA)
                                                         break;                                                         break;
                                                 ptr->mon_n_hsync++;                                                 ptr->mon_n_hsync++;
                                                 goto HorizDone;                                                 goto HorizDone;
Line 452 
Line 455 
                                 if (ptr->mon_n_hsync == CONF_MAX_HSYNC)                                 if (ptr->mon_n_hsync == CONF_MAX_HSYNC)
                                         Error ("Sorry. Too many horizontal sync intervals.", NULL);                                         Error ("Sorry. Too many horizontal sync intervals.", NULL);
                                 ptr->mon_n_hsync++;                                 ptr->mon_n_hsync++;
                         } while ((token = xf86getToken (NULL)) == NUMBER);                          } while ((token = xf86getSubToken (&(ptr->mon_comment))) == NUMBER);
 HorizDone: HorizDone:
                         xf86unGetToken (token);                         xf86unGetToken (token);
                         break;                         break;
  
                 case VERTREFRESH:                 case VERTREFRESH:
                         if (xf86getToken (NULL) != NUMBER)                          if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
                                 Error (VERTREFRESH_MSG, NULL);                                 Error (VERTREFRESH_MSG, NULL);
                         do {                         do {
                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = val.realnum;                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = val.realnum;
                                 switch (token = xf86getToken (NULL))                                  switch (token = xf86getSubToken (&(ptr->mon_comment)))
                                 {                                 {
                                         case COMMA:                                         case COMMA:
                                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi =                                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi =
                                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo;                                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo;
                                                 break;                                                 break;
                                         case DASH:                                         case DASH:
                                                 if (xf86getToken (NULL) != NUMBER ||                                                  if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER ||
                                                     (float)val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)                                                     (float)val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
                                                         Error (VERTREFRESH_MSG, NULL);                                                         Error (VERTREFRESH_MSG, NULL);
                                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum;                                                 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum;
                                                 if ((token = xf86getToken (NULL)) == COMMA)                                                  if ((token = xf86getSubToken (&(ptr->mon_comment))) == COMMA)
                                                         break;                                                         break;
                                                 ptr->mon_n_vrefresh++;                                                 ptr->mon_n_vrefresh++;
                                                 goto VertDone;                                                 goto VertDone;
Line 489 
Line 492 
                                 if (ptr->mon_n_vrefresh == CONF_MAX_VREFRESH)                                 if (ptr->mon_n_vrefresh == CONF_MAX_VREFRESH)
                                         Error ("Sorry. Too many vertical refresh intervals.", NULL);                                         Error ("Sorry. Too many vertical refresh intervals.", NULL);
                                 ptr->mon_n_vrefresh++;                                 ptr->mon_n_vrefresh++;
                         } while ((token = xf86getToken (NULL)) == NUMBER);                          } while ((token = xf86getSubToken (&(ptr->mon_comment))) == NUMBER);
 VertDone: VertDone:
                         xf86unGetToken (token);                         xf86unGetToken (token);
                         break;                         break;
  
                 case GAMMA:                 case GAMMA:
                         if( xf86getToken (NULL) != NUMBER )                          if( xf86getSubToken (&(ptr->mon_comment)) != NUMBER )
                         {                         {
                                 Error (INVALID_GAMMA_MSG, NULL);                                 Error (INVALID_GAMMA_MSG, NULL);
                         }                         }
Line 503 
Line 506 
                         {                         {
                                 ptr->mon_gamma_red = ptr->mon_gamma_green =                                 ptr->mon_gamma_red = ptr->mon_gamma_green =
                                         ptr->mon_gamma_blue = val.realnum;                                         ptr->mon_gamma_blue = val.realnum;
                                 if( xf86getToken (NULL) == NUMBER )                                  if( xf86getSubToken (&(ptr->mon_comment)) == NUMBER )
                                 {                                 {
                                         ptr->mon_gamma_green = val.realnum;                                         ptr->mon_gamma_green = val.realnum;
                                         if( xf86getToken (NULL) == NUMBER )                                          if( xf86getSubToken (&(ptr->mon_comment)) == NUMBER )
                                         {                                         {
                                                 ptr->mon_gamma_blue = val.realnum;                                                 ptr->mon_gamma_blue = val.realnum;
                                         }                                         }
Line 526 
Line 529 
                         {                         {
                                 XF86ConfModesLinkPtr mptr;                                 XF86ConfModesLinkPtr mptr;
  
                                 if ((token = xf86getToken (NULL)) != STRING)                                  if ((token = xf86getSubToken (&(ptr->mon_comment))) != STRING)
                                         Error (QUOTE_MSG, "UseModes");                                         Error (QUOTE_MSG, "UseModes");
  
                                 /* add to the end of the list of modes sections                                 /* add to the end of the list of modes sections
Line 573 
Line 576 
         {         {
                 switch (token)                 switch (token)
                 {                 {
                   case COMMENT:
                           ptr->modes_comment = xf86addComment(ptr->modes_comment, val.str);
                           break;
                 case IDENTIFIER:                 case IDENTIFIER:
                         if (xf86getToken (NULL) != STRING)                          if (xf86getSubToken (&(ptr->modes_comment)) != STRING)
                                 Error (QUOTE_MSG, "Identifier");                                 Error (QUOTE_MSG, "Identifier");
                         if (has_ident == TRUE)                         if (has_ident == TRUE)
                                 Error (MULTIPLE_MSG, "Identifier");                                 Error (MULTIPLE_MSG, "Identifier");
Line 707 
Line 713 
         while (ptr)         while (ptr)
         {         {
                 fprintf (cf, "Section \"Modes\"\n");                 fprintf (cf, "Section \"Modes\"\n");
                   if (ptr->modes_comment)
                           fprintf (cf, "%s", ptr->modes_comment);
                 if (ptr->modes_identifier)                 if (ptr->modes_identifier)
                         fprintf (cf, "\tIdentifier     \"%s\"\n", ptr->modes_identifier);                         fprintf (cf, "\tIdentifier     \"%s\"\n", ptr->modes_identifier);
                 for (mlptr = ptr->mon_modeline_lst; mlptr; mlptr = mlptr->list.next)                 for (mlptr = ptr->mon_modeline_lst; mlptr; mlptr = mlptr->list.next)
Line 742 
Line 750 
                                 fprintf (cf, " vscan %d", mlptr->ml_vscan);                                 fprintf (cf, " vscan %d", mlptr->ml_vscan);
                         if (mlptr->ml_flags & XF86CONF_BCAST)                         if (mlptr->ml_flags & XF86CONF_BCAST)
                                 fprintf (cf, " bcast");                                 fprintf (cf, " bcast");
                           if (mlptr->ml_comment)
                                   fprintf (cf, "%s", mlptr->ml_comment);
                           else
                         fprintf (cf, "\n");                         fprintf (cf, "\n");
                 }                 }
                 fprintf (cf, "EndSection\n\n");                 fprintf (cf, "EndSection\n\n");
Line 775 
Line 786 
         while (ptr)         while (ptr)
         {         {
                 TestFree (ptr->modes_identifier);                 TestFree (ptr->modes_identifier);
                   TestFree (ptr->modes_comment);
                 xf86freeModeLineList (ptr->mon_modeline_lst);                 xf86freeModeLineList (ptr->mon_modeline_lst);
                 prev = ptr;                 prev = ptr;
                 ptr = ptr->list.next;                 ptr = ptr->list.next;
Line 789 
Line 801 
         while (ptr)         while (ptr)
         {         {
                 TestFree (ptr->ml_identifier);                 TestFree (ptr->ml_identifier);
                   TestFree (ptr->ml_comment);
                 prev = ptr;                 prev = ptr;
                 ptr = ptr->list.next;                 ptr = ptr->list.next;
                 xf86conffree (prev);                 xf86conffree (prev);


Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

Powered by
ViewCVS 0.9.2