~ubuntu-branches/ubuntu/precise/xdm/precise

« back to all changes in this revision

Viewing changes to dpylist.c

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2011-01-30 00:53:09 UTC
  • mfrom: (9.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110130005309-30mjjyk7div7d494
Tags: 1:1.1.10-3ubuntu1
* Merge from debian unstable.  Remaining changes: (LP: #682196)
  - debian/{rules, xdm.install, local/ubuntu*}:
    + Add Ubuntu graphics and configure xdm to use them by default.
  - debian/patches/ubuntu_no_whiteglass.diff: Don't hardcode
    the default Xcursor theme to whiteglass. Use the Ubuntu
    default x-cursor-theme instead.
* debian/patches/ftbfs_binutils-gold.diff: Fix FTBFS with binutils-gold
  and ld --as-needed. (Closes: #556694)
* Dropped changes, no longer applicable:
  - debian/{xdm.postinst.in, xdm.postrm.in, xdm.preinst.in}

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Xorg: dpylist.c,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $ */
2
1
/*
3
2
 
4
3
Copyright 1988, 1998  The Open Group
26
25
from The Open Group.
27
26
 
28
27
*/
29
 
/* $XFree86: xc/programs/xdm/dpylist.c,v 1.5tsi Exp $ */
30
28
 
31
29
/*
32
30
 * xdm - display manager daemon
35
33
 * a simple linked list of known displays
36
34
 */
37
35
 
38
 
# include "dm.h"
39
 
# include "dm_error.h"
 
36
#include "dm.h"
 
37
#include "dm_error.h"
40
38
 
41
39
static struct display   *displays;
42
40
 
121
119
#endif /* XDMCP */
122
120
 
123
121
#define IfFree(x)  if (x) free ((char *) x)
124
 
    
 
122
 
125
123
void
126
124
RemoveDisplay (struct display *old)
127
125
{
191
189
        return NULL;
192
190
    }
193
191
    d->next = displays;
194
 
    d->name = malloc ((unsigned) (strlen (name) + 1));
 
192
    d->name = strdup (name);
195
193
    if (!d->name) {
196
194
        LogOutOfMem ("NewDisplay");
197
195
        free ((char *) d);
198
196
        return NULL;
199
197
    }
200
 
    strcpy (d->name, name);
201
198
    if (class)
202
199
    {
203
 
        d->class = malloc ((unsigned) (strlen (class) + 1));
 
200
        d->class = strdup (class);
204
201
        if (!d->class) {
205
202
            LogOutOfMem ("NewDisplay");
206
203
            free (d->name);
207
204
            free ((char *) d);
208
205
            return NULL;
209
206
        }
210
 
        strcpy (d->class, class);
211
207
    }
212
208
    else
213
209
    {
214
 
        d->class = (char *) 0;
 
210
        d->class = NULL;
215
211
    }
216
212
    /* initialize every field to avoid possible problems */
217
213
    d->argv = NULL;