Lines Matching refs:ptr
102 ptr->dev_chipid = -1; in xf86parseDeviceSection()
103 ptr->dev_chiprev = -1; in xf86parseDeviceSection()
104 ptr->dev_irq = -1; in xf86parseDeviceSection()
108 ptr->dev_comment = xf86addComment(ptr->dev_comment, xf86_lex_val.str); in xf86parseDeviceSection()
111 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
115 ptr->dev_identifier = xf86_lex_val.str; in xf86parseDeviceSection()
119 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
121 ptr->dev_vendor = xf86_lex_val.str; in xf86parseDeviceSection()
124 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
126 ptr->dev_board = xf86_lex_val.str; in xf86parseDeviceSection()
129 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
131 ptr->dev_chipset = xf86_lex_val.str; in xf86parseDeviceSection()
134 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
136 ptr->dev_card = xf86_lex_val.str; in xf86parseDeviceSection()
139 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
141 ptr->dev_driver = xf86_lex_val.str; in xf86parseDeviceSection()
144 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
146 ptr->dev_ramdac = xf86_lex_val.str; in xf86parseDeviceSection()
150 ptr->dev_dacSpeeds[i] = 0; in xf86parseDeviceSection()
151 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) { in xf86parseDeviceSection()
155 ptr->dev_dacSpeeds[0] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); in xf86parseDeviceSection()
157 if (xf86getSubToken(&(ptr->dev_comment)) == NUMBER) in xf86parseDeviceSection()
158 ptr->dev_dacSpeeds[i] = (int) in xf86parseDeviceSection()
168 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
170 ptr->dev_videoram = xf86_lex_val.num; in xf86parseDeviceSection()
173 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
178 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
180 ptr->dev_mem_base = xf86_lex_val.num; in xf86parseDeviceSection()
183 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
185 ptr->dev_io_base = xf86_lex_val.num; in xf86parseDeviceSection()
188 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
190 ptr->dev_clockchip = xf86_lex_val.str; in xf86parseDeviceSection()
193 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
195 ptr->dev_chipid = xf86_lex_val.num; in xf86parseDeviceSection()
198 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
200 ptr->dev_chiprev = xf86_lex_val.num; in xf86parseDeviceSection()
204 token = xf86getSubToken(&(ptr->dev_comment)); in xf86parseDeviceSection()
205 for (i = ptr->dev_clocks; in xf86parseDeviceSection()
207 ptr->dev_clock[i] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); in xf86parseDeviceSection()
208 token = xf86getSubToken(&(ptr->dev_comment)); in xf86parseDeviceSection()
210 ptr->dev_clocks = i; in xf86parseDeviceSection()
214 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
216 ptr->match_seat = xf86_lex_val.str; in xf86parseDeviceSection()
219 ptr->dev_option_lst = xf86parseOption(ptr->dev_option_lst); in xf86parseDeviceSection()
222 if (xf86getSubToken(&(ptr->dev_comment)) != STRING) in xf86parseDeviceSection()
224 ptr->dev_busid = xf86_lex_val.str; in xf86parseDeviceSection()
227 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
229 ptr->dev_irq = xf86_lex_val.num; in xf86parseDeviceSection()
232 if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) in xf86parseDeviceSection()
234 ptr->dev_screen = xf86_lex_val.num; in xf86parseDeviceSection()
252 return ptr; in xf86parseDeviceSection()
258 xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr) in xf86printDeviceSection() argument
262 while (ptr) { in xf86printDeviceSection()
264 if (ptr->dev_comment) in xf86printDeviceSection()
265 fprintf(cf, "%s", ptr->dev_comment); in xf86printDeviceSection()
266 if (ptr->dev_identifier) in xf86printDeviceSection()
267 fprintf(cf, "\tIdentifier \"%s\"\n", ptr->dev_identifier); in xf86printDeviceSection()
268 if (ptr->dev_driver) in xf86printDeviceSection()
269 fprintf(cf, "\tDriver \"%s\"\n", ptr->dev_driver); in xf86printDeviceSection()
270 if (ptr->dev_vendor) in xf86printDeviceSection()
271 fprintf(cf, "\tVendorName \"%s\"\n", ptr->dev_vendor); in xf86printDeviceSection()
272 if (ptr->dev_board) in xf86printDeviceSection()
273 fprintf(cf, "\tBoardName \"%s\"\n", ptr->dev_board); in xf86printDeviceSection()
274 if (ptr->dev_chipset) in xf86printDeviceSection()
275 fprintf(cf, "\tChipSet \"%s\"\n", ptr->dev_chipset); in xf86printDeviceSection()
276 if (ptr->dev_card) in xf86printDeviceSection()
277 fprintf(cf, "\tCard \"%s\"\n", ptr->dev_card); in xf86printDeviceSection()
278 if (ptr->dev_ramdac) in xf86printDeviceSection()
279 fprintf(cf, "\tRamDac \"%s\"\n", ptr->dev_ramdac); in xf86printDeviceSection()
280 if (ptr->dev_dacSpeeds[0] > 0) { in xf86printDeviceSection()
282 for (i = 0; i < CONF_MAXDACSPEEDS && ptr->dev_dacSpeeds[i] > 0; i++) in xf86printDeviceSection()
283 fprintf(cf, "%g ", (double) (ptr->dev_dacSpeeds[i]) / 1000.0); in xf86printDeviceSection()
286 if (ptr->dev_videoram) in xf86printDeviceSection()
287 fprintf(cf, "\tVideoRam %d\n", ptr->dev_videoram); in xf86printDeviceSection()
288 if (ptr->dev_mem_base) in xf86printDeviceSection()
289 fprintf(cf, "\tMemBase 0x%lx\n", ptr->dev_mem_base); in xf86printDeviceSection()
290 if (ptr->dev_io_base) in xf86printDeviceSection()
291 fprintf(cf, "\tIOBase 0x%lx\n", ptr->dev_io_base); in xf86printDeviceSection()
292 if (ptr->dev_clockchip) in xf86printDeviceSection()
293 fprintf(cf, "\tClockChip \"%s\"\n", ptr->dev_clockchip); in xf86printDeviceSection()
294 if (ptr->dev_chipid != -1) in xf86printDeviceSection()
295 fprintf(cf, "\tChipId 0x%x\n", ptr->dev_chipid); in xf86printDeviceSection()
296 if (ptr->dev_chiprev != -1) in xf86printDeviceSection()
297 fprintf(cf, "\tChipRev 0x%x\n", ptr->dev_chiprev); in xf86printDeviceSection()
299 xf86printOptionList(cf, ptr->dev_option_lst, 1); in xf86printDeviceSection()
300 if (ptr->dev_clocks > 0) { in xf86printDeviceSection()
302 for (i = 0; i < ptr->dev_clocks; i++) in xf86printDeviceSection()
303 fprintf(cf, "%.1f ", (double) ptr->dev_clock[i] / 1000.0); in xf86printDeviceSection()
306 if (ptr->dev_busid) in xf86printDeviceSection()
307 fprintf(cf, "\tBusID \"%s\"\n", ptr->dev_busid); in xf86printDeviceSection()
308 if (ptr->dev_screen > 0) in xf86printDeviceSection()
309 fprintf(cf, "\tScreen %d\n", ptr->dev_screen); in xf86printDeviceSection()
310 if (ptr->dev_irq >= 0) in xf86printDeviceSection()
311 fprintf(cf, "\tIRQ %d\n", ptr->dev_irq); in xf86printDeviceSection()
313 ptr = ptr->list.next; in xf86printDeviceSection()
318 xf86freeDeviceList(XF86ConfDevicePtr ptr) in xf86freeDeviceList() argument
322 while (ptr) { in xf86freeDeviceList()
323 TestFree(ptr->dev_identifier); in xf86freeDeviceList()
324 TestFree(ptr->dev_vendor); in xf86freeDeviceList()
325 TestFree(ptr->dev_board); in xf86freeDeviceList()
326 TestFree(ptr->dev_chipset); in xf86freeDeviceList()
327 TestFree(ptr->dev_card); in xf86freeDeviceList()
328 TestFree(ptr->dev_driver); in xf86freeDeviceList()
329 TestFree(ptr->dev_ramdac); in xf86freeDeviceList()
330 TestFree(ptr->dev_clockchip); in xf86freeDeviceList()
331 TestFree(ptr->dev_comment); in xf86freeDeviceList()
332 xf86optionListFree(ptr->dev_option_lst); in xf86freeDeviceList()
334 prev = ptr; in xf86freeDeviceList()
335 ptr = ptr->list.next; in xf86freeDeviceList()