View | Details | Raw Unified | Return to bug 16069
Collapse All | Expand All

(-)xconf.c.orig (-6 / +7 lines)
Lines 50-57 Link Here
50
  XtFree(p->x);					\
50
  XtFree(p->x);					\
51
  p->x=XtNewString("");
51
  p->x=XtNewString("");
52
52
53
#define MergeLists(type, head, tail) \
54
    head = (type) xf86addListItem((GenericListPtr) (head), (GenericListPtr) (tail))
55
53
#define AddListItem(type, head, new) \
56
#define AddListItem(type, head, new) \
54
    head = (type) xf86addListItem((GenericListPtr) (head), (GenericListPtr) (new));
57
    (new)->list.next = NULL; \
58
    MergeLists(type, head, new)
55
59
56
#define LoadList conf->conf_modules->mod_load_lst
60
#define LoadList conf->conf_modules->mod_load_lst
57
61
Lines 73-79 Link Here
73
  int f = 0;
77
  int f = 0;
74
78
75
  if (LoadList != DisableList)
79
  if (LoadList != DisableList)
76
    AddListItem(XF86LoadPtr, LoadList, DisableList);
80
    MergeLists(XF86LoadPtr, LoadList, DisableList);
77
  for (l = LoadList; l != NULL; l = l->list.next)
81
  for (l = LoadList; l != NULL; l = l->list.next)
78
    if ((l->load_opt == NULL) && (strcmp(l->load_name, module) == 0))
82
    if ((l->load_opt == NULL) && (strcmp(l->load_name, module) == 0))
79
      {
83
      {
Lines 89-95 Link Here
89
    {
93
    {
90
      l->load_name = (char*) module;
94
      l->load_name = (char*) module;
91
      l->load_opt = NULL;
95
      l->load_opt = NULL;
92
      l->list.next = NULL;
93
      l->load_type = out;
96
      l->load_type = out;
94
      l->load_comment = NULL;
97
      l->load_comment = NULL;
95
      l->ignore = 0;
98
      l->ignore = 0;
Lines 428-435 Link Here
428
	    {
431
	    {
429
	      XF86ModePtr mode = calloc(1, sizeof(XF86ModeRec));
432
	      XF86ModePtr mode = calloc(1, sizeof(XF86ModeRec));
430
	      mode->mode_name = XtNewString(res_parse);
433
	      mode->mode_name = XtNewString(res_parse);
431
	      mode->list.next = disp->disp_mode_lst;
434
	      AddListItem(XF86ModePtr, disp->disp_mode_lst, mode);
432
	      disp->disp_mode_lst = mode;
433
	    }
435
	    }
434
		
436
		
435
	  res_parse = next_pos;
437
	  res_parse = next_pos;
Lines 507-513 Link Here
507
509
508
  if (action != NULL)
510
  if (action != NULL)
509
    {
511
    {
510
      action->list.next = NULL;
511
      action->type = a;
512
      action->type = a;
512
      action->arg = (char*) arg;
513
      action->arg = (char*) arg;
513
      return AddListItem(ActionPtr, actions, action);
514
      return AddListItem(ActionPtr, actions, action);

Return to bug 16069