Lines Matching refs:ptr

119 xf86freeModeLineList(XF86ConfModeLinePtr ptr)  in xf86freeModeLineList()  argument
123 while (ptr) { in xf86freeModeLineList()
124 TestFree(ptr->ml_identifier); in xf86freeModeLineList()
125 TestFree(ptr->ml_comment); in xf86freeModeLineList()
126 prev = ptr; in xf86freeModeLineList()
127 ptr = ptr->list.next; in xf86freeModeLineList()
140 if (xf86getSubToken(&(ptr->ml_comment)) != STRING) in xf86parseModeLine()
142 ptr->ml_identifier = xf86_lex_val.str; in xf86parseModeLine()
145 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
147 ptr->ml_clock = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); in xf86parseModeLine()
150 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
152 ptr->ml_hdisplay = xf86_lex_val.num; in xf86parseModeLine()
155 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
157 ptr->ml_hsyncstart = xf86_lex_val.num; in xf86parseModeLine()
160 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
162 ptr->ml_hsyncend = xf86_lex_val.num; in xf86parseModeLine()
165 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
167 ptr->ml_htotal = xf86_lex_val.num; in xf86parseModeLine()
170 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
172 ptr->ml_vdisplay = xf86_lex_val.num; in xf86parseModeLine()
175 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
177 ptr->ml_vsyncstart = xf86_lex_val.num; in xf86parseModeLine()
180 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
182 ptr->ml_vsyncend = xf86_lex_val.num; in xf86parseModeLine()
185 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
187 ptr->ml_vtotal = xf86_lex_val.num; in xf86parseModeLine()
189 token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab); in xf86parseModeLine()
199 ptr->ml_flags |= XF86CONF_INTERLACE; in xf86parseModeLine()
202 ptr->ml_flags |= XF86CONF_PHSYNC; in xf86parseModeLine()
205 ptr->ml_flags |= XF86CONF_NHSYNC; in xf86parseModeLine()
208 ptr->ml_flags |= XF86CONF_PVSYNC; in xf86parseModeLine()
211 ptr->ml_flags |= XF86CONF_NVSYNC; in xf86parseModeLine()
214 ptr->ml_flags |= XF86CONF_CSYNC; in xf86parseModeLine()
217 ptr->ml_flags |= XF86CONF_PCSYNC; in xf86parseModeLine()
220 ptr->ml_flags |= XF86CONF_NCSYNC; in xf86parseModeLine()
223 ptr->ml_flags |= XF86CONF_DBLSCAN; in xf86parseModeLine()
226 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
228 ptr->ml_hskew = xf86_lex_val.num; in xf86parseModeLine()
229 ptr->ml_flags |= XF86CONF_HSKEW; in xf86parseModeLine()
232 ptr->ml_flags |= XF86CONF_BCAST; in xf86parseModeLine()
235 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseModeLine()
237 ptr->ml_vscan = xf86_lex_val.num; in xf86parseModeLine()
238 ptr->ml_flags |= XF86CONF_VSCAN; in xf86parseModeLine()
247 token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab); in xf86parseModeLine()
254 return ptr; in xf86parseModeLine()
265 if (xf86getSubToken(&(ptr->ml_comment)) != STRING) in xf86parseVerboseMode()
267 ptr->ml_identifier = xf86_lex_val.str; in xf86parseVerboseMode()
271 ptr->ml_comment = xf86addComment(ptr->ml_comment, xf86_lex_val.str); in xf86parseVerboseMode()
274 if ((token = xf86getSubToken(&(ptr->ml_comment))) != NUMBER) in xf86parseVerboseMode()
276 ptr->ml_clock = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); in xf86parseVerboseMode()
280 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
281 ptr->ml_hdisplay = xf86_lex_val.num; in xf86parseVerboseMode()
285 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
286 ptr->ml_hsyncstart = xf86_lex_val.num; in xf86parseVerboseMode()
290 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
291 ptr->ml_hsyncend = xf86_lex_val.num; in xf86parseVerboseMode()
295 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
296 ptr->ml_htotal = xf86_lex_val.num; in xf86parseVerboseMode()
302 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
303 ptr->ml_vdisplay = xf86_lex_val.num; in xf86parseVerboseMode()
307 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
308 ptr->ml_vsyncstart = xf86_lex_val.num; in xf86parseVerboseMode()
312 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
313 ptr->ml_vsyncend = xf86_lex_val.num; in xf86parseVerboseMode()
317 if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) in xf86parseVerboseMode()
318 ptr->ml_vtotal = xf86_lex_val.num; in xf86parseVerboseMode()
324 token = xf86getSubToken(&(ptr->ml_comment)); in xf86parseVerboseMode()
331 ptr->ml_flags |= XF86CONF_INTERLACE; in xf86parseVerboseMode()
334 ptr->ml_flags |= XF86CONF_PHSYNC; in xf86parseVerboseMode()
337 ptr->ml_flags |= XF86CONF_NHSYNC; in xf86parseVerboseMode()
340 ptr->ml_flags |= XF86CONF_PVSYNC; in xf86parseVerboseMode()
343 ptr->ml_flags |= XF86CONF_NVSYNC; in xf86parseVerboseMode()
346 ptr->ml_flags |= XF86CONF_CSYNC; in xf86parseVerboseMode()
349 ptr->ml_flags |= XF86CONF_PCSYNC; in xf86parseVerboseMode()
352 ptr->ml_flags |= XF86CONF_NCSYNC; in xf86parseVerboseMode()
355 ptr->ml_flags |= XF86CONF_DBLSCAN; in xf86parseVerboseMode()
364 token = xf86getSubToken(&(ptr->ml_comment)); in xf86parseVerboseMode()
369 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseVerboseMode()
371 ptr->ml_flags |= XF86CONF_HSKEW; in xf86parseVerboseMode()
372 ptr->ml_hskew = xf86_lex_val.num; in xf86parseVerboseMode()
375 if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) in xf86parseVerboseMode()
377 ptr->ml_flags |= XF86CONF_VSCAN; in xf86parseVerboseMode()
378 ptr->ml_vscan = xf86_lex_val.num; in xf86parseVerboseMode()
397 return ptr; in xf86parseVerboseMode()
415 ptr->mon_comment = xf86addComment(ptr->mon_comment, xf86_lex_val.str); in xf86parseMonitorSection()
418 if (xf86getSubToken(&(ptr->mon_comment)) != STRING) in xf86parseMonitorSection()
422 ptr->mon_identifier = xf86_lex_val.str; in xf86parseMonitorSection()
426 if (xf86getSubToken(&(ptr->mon_comment)) != STRING) in xf86parseMonitorSection()
428 ptr->mon_vendor = xf86_lex_val.str; in xf86parseMonitorSection()
431 if (xf86getSubToken(&(ptr->mon_comment)) != STRING) in xf86parseMonitorSection()
433 ptr->mon_modelname = xf86_lex_val.str; in xf86parseMonitorSection()
444 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) in xf86parseMonitorSection()
446 ptr->mon_width = xf86_lex_val.realnum; in xf86parseMonitorSection()
447 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) in xf86parseMonitorSection()
449 ptr->mon_height = xf86_lex_val.realnum; in xf86parseMonitorSection()
453 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) in xf86parseMonitorSection()
456 if (ptr->mon_n_hsync >= CONF_MAX_HSYNC) in xf86parseMonitorSection()
458 ptr->mon_hsync[ptr->mon_n_hsync].lo = xf86_lex_val.realnum; in xf86parseMonitorSection()
459 switch (token = xf86getSubToken(&(ptr->mon_comment))) { in xf86parseMonitorSection()
461 ptr->mon_hsync[ptr->mon_n_hsync].hi = in xf86parseMonitorSection()
462 ptr->mon_hsync[ptr->mon_n_hsync].lo; in xf86parseMonitorSection()
465 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER || in xf86parseMonitorSection()
467 ptr->mon_hsync[ptr->mon_n_hsync].lo) in xf86parseMonitorSection()
469 ptr->mon_hsync[ptr->mon_n_hsync].hi = xf86_lex_val.realnum; in xf86parseMonitorSection()
470 if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA) in xf86parseMonitorSection()
472 ptr->mon_n_hsync++; in xf86parseMonitorSection()
478 ptr->mon_hsync[ptr->mon_n_hsync].hi = in xf86parseMonitorSection()
479 ptr->mon_hsync[ptr->mon_n_hsync].lo; in xf86parseMonitorSection()
480 ptr->mon_n_hsync++; in xf86parseMonitorSection()
483 ptr->mon_n_hsync++; in xf86parseMonitorSection()
484 } while ((token = xf86getSubToken(&(ptr->mon_comment))) == NUMBER); in xf86parseMonitorSection()
490 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) in xf86parseMonitorSection()
493 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = xf86_lex_val.realnum; in xf86parseMonitorSection()
494 switch (token = xf86getSubToken(&(ptr->mon_comment))) { in xf86parseMonitorSection()
496 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = in xf86parseMonitorSection()
497 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo; in xf86parseMonitorSection()
500 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER || in xf86parseMonitorSection()
502 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo) in xf86parseMonitorSection()
504 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = xf86_lex_val.realnum; in xf86parseMonitorSection()
505 if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA) in xf86parseMonitorSection()
507 ptr->mon_n_vrefresh++; in xf86parseMonitorSection()
513 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = in xf86parseMonitorSection()
514 ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo; in xf86parseMonitorSection()
515 ptr->mon_n_vrefresh++; in xf86parseMonitorSection()
518 if (ptr->mon_n_vrefresh >= CONF_MAX_VREFRESH) in xf86parseMonitorSection()
520 ptr->mon_n_vrefresh++; in xf86parseMonitorSection()
521 } while ((token = xf86getSubToken(&(ptr->mon_comment))) == NUMBER); in xf86parseMonitorSection()
527 if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) { in xf86parseMonitorSection()
531 ptr->mon_gamma_red = ptr->mon_gamma_green = in xf86parseMonitorSection()
532 ptr->mon_gamma_blue = xf86_lex_val.realnum; in xf86parseMonitorSection()
533 if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) { in xf86parseMonitorSection()
534 ptr->mon_gamma_green = xf86_lex_val.realnum; in xf86parseMonitorSection()
535 if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) { in xf86parseMonitorSection()
536 ptr->mon_gamma_blue = xf86_lex_val.realnum; in xf86parseMonitorSection()
547 ptr->mon_option_lst = xf86parseOption(ptr->mon_option_lst); in xf86parseMonitorSection()
553 if ((token = xf86getSubToken(&(ptr->mon_comment))) != STRING) in xf86parseMonitorSection()
562 ptr->mon_modes_sect_lst = (XF86ConfModesLinkPtr) in xf86parseMonitorSection()
563 xf86addListItem((GenericListPtr) ptr->mon_modes_sect_lst, in xf86parseMonitorSection()
572 CLEANUP(ptr); in xf86parseMonitorSection()
584 return ptr; in xf86parseMonitorSection()
601 ptr->modes_comment = xf86addComment(ptr->modes_comment, xf86_lex_val.str); in xf86parseModesSection()
604 if (xf86getSubToken(&(ptr->modes_comment)) != STRING) in xf86parseModesSection()
608 ptr->modes_identifier = xf86_lex_val.str; in xf86parseModesSection()
621 CLEANUP(ptr); in xf86parseModesSection()
633 return ptr; in xf86parseModesSection()
639 xf86printMonitorSection(FILE * cf, XF86ConfMonitorPtr ptr) in xf86printMonitorSection() argument
645 while (ptr) { in xf86printMonitorSection()
646 mptr = ptr->mon_modes_sect_lst; in xf86printMonitorSection()
648 if (ptr->mon_comment) in xf86printMonitorSection()
649 fprintf(cf, "%s", ptr->mon_comment); in xf86printMonitorSection()
650 if (ptr->mon_identifier) in xf86printMonitorSection()
651 fprintf(cf, "\tIdentifier \"%s\"\n", ptr->mon_identifier); in xf86printMonitorSection()
652 if (ptr->mon_vendor) in xf86printMonitorSection()
653 fprintf(cf, "\tVendorName \"%s\"\n", ptr->mon_vendor); in xf86printMonitorSection()
654 if (ptr->mon_modelname) in xf86printMonitorSection()
655 fprintf(cf, "\tModelName \"%s\"\n", ptr->mon_modelname); in xf86printMonitorSection()
660 if (ptr->mon_width) in xf86printMonitorSection()
662 ptr->mon_width, ptr->mon_height); in xf86printMonitorSection()
663 for (i = 0; i < ptr->mon_n_hsync; i++) { in xf86printMonitorSection()
665 ptr->mon_hsync[i].lo, ptr->mon_hsync[i].hi); in xf86printMonitorSection()
667 for (i = 0; i < ptr->mon_n_vrefresh; i++) { in xf86printMonitorSection()
669 ptr->mon_vrefresh[i].lo, ptr->mon_vrefresh[i].hi); in xf86printMonitorSection()
671 if (ptr->mon_gamma_red) { in xf86printMonitorSection()
672 if (ptr->mon_gamma_red == ptr->mon_gamma_green in xf86printMonitorSection()
673 && ptr->mon_gamma_red == ptr->mon_gamma_blue) { in xf86printMonitorSection()
674 fprintf(cf, "\tGamma %.4g\n", ptr->mon_gamma_red); in xf86printMonitorSection()
678 ptr->mon_gamma_red, in xf86printMonitorSection()
679 ptr->mon_gamma_green, ptr->mon_gamma_blue); in xf86printMonitorSection()
682 for (mlptr = ptr->mon_modeline_lst; mlptr; mlptr = mlptr->list.next) { in xf86printMonitorSection()
714 xf86printOptionList(cf, ptr->mon_option_lst, 1); in xf86printMonitorSection()
716 ptr = ptr->list.next; in xf86printMonitorSection()
721 xf86printModesSection(FILE * cf, XF86ConfModesPtr ptr) in xf86printModesSection() argument
725 while (ptr) { in xf86printModesSection()
727 if (ptr->modes_comment) in xf86printModesSection()
728 fprintf(cf, "%s", ptr->modes_comment); in xf86printModesSection()
729 if (ptr->modes_identifier) in xf86printModesSection()
730 fprintf(cf, "\tIdentifier \"%s\"\n", ptr->modes_identifier); in xf86printModesSection()
731 for (mlptr = ptr->mon_modeline_lst; mlptr; mlptr = mlptr->list.next) { in xf86printModesSection()
769 ptr = ptr->list.next; in xf86printModesSection()
774 xf86freeMonitorList(XF86ConfMonitorPtr ptr) in xf86freeMonitorList() argument
778 while (ptr) { in xf86freeMonitorList()
779 TestFree(ptr->mon_identifier); in xf86freeMonitorList()
780 TestFree(ptr->mon_vendor); in xf86freeMonitorList()
781 TestFree(ptr->mon_modelname); in xf86freeMonitorList()
782 TestFree(ptr->mon_comment); in xf86freeMonitorList()
783 xf86optionListFree(ptr->mon_option_lst); in xf86freeMonitorList()
784 xf86freeModeLineList(ptr->mon_modeline_lst); in xf86freeMonitorList()
785 prev = ptr; in xf86freeMonitorList()
786 ptr = ptr->list.next; in xf86freeMonitorList()
792 xf86freeModesList(XF86ConfModesPtr ptr) in xf86freeModesList() argument
796 while (ptr) { in xf86freeModesList()
797 TestFree(ptr->modes_identifier); in xf86freeModesList()
798 TestFree(ptr->modes_comment); in xf86freeModesList()
799 xf86freeModeLineList(ptr->mon_modeline_lst); in xf86freeModesList()
800 prev = ptr; in xf86freeModesList()
801 ptr = ptr->list.next; in xf86freeModesList()