~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/OpenDis.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-12-04 11:43:54 UTC
  • mfrom: (1.1.10 upstream) (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20091204114354-0lik4mbb1bv1a8nw
Tags: 2:1.3.2-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add 100_latin_locale_alias.diff (LP 379785)

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
#ifndef XLIBMINBUFSIZE
274
274
#define XLIBMINBUFSIZE BUFSIZE /* old default buffer size */
275
275
#endif
276
 
    if ((xlib_buffer_size = getenv("XLIBBUFFERSIZE")) == NULL)
277
 
        conn_buf_size = XLIBDEFAULTBUFSIZE;
278
 
    else
279
 
        conn_buf_size = 1024 * strtol(xlib_buffer_size, NULL, 10);
280
 
    if (conn_buf_size < XLIBMINBUFSIZE)
281
 
        conn_buf_size = XLIBMINBUFSIZE;
282
 
 
283
 
    if ((dpy->bufptr = dpy->buffer = Xcalloc(1, conn_buf_size)) == NULL) {
284
 
         OutOfMemory (dpy, setup);
285
 
         return(NULL);
286
 
    }
287
 
    dpy->bufmax = dpy->buffer + conn_buf_size;
 
276
        xlib_buffer_size = getenv("XLIBBUFFERSIZE");
 
277
 
 
278
#ifdef __sun /* Backwards compatibility for old Solaris libX11 name */
 
279
        if (xlib_buffer_size == NULL)
 
280
            xlib_buffer_size = getenv("XSUNBUFFERSIZE");
 
281
#endif
 
282
 
 
283
        if (xlib_buffer_size == NULL)
 
284
            conn_buf_size = XLIBDEFAULTBUFSIZE;
 
285
        else
 
286
            conn_buf_size = 1024 * strtol(xlib_buffer_size, NULL, 10);
 
287
        if (conn_buf_size < XLIBMINBUFSIZE)
 
288
            conn_buf_size = XLIBMINBUFSIZE;
 
289
 
 
290
        if ((dpy->bufptr = dpy->buffer = Xcalloc(1, conn_buf_size)) == NULL) {
 
291
            OutOfMemory (dpy, setup);
 
292
            return(NULL);
 
293
        }
 
294
        dpy->bufmax = dpy->buffer + conn_buf_size;
288
295
#if USE_XCB
289
 
    dpy->xcb->real_bufmax = dpy->bufmax;
290
 
    dpy->bufmax = dpy->buffer;
 
296
        dpy->xcb->real_bufmax = dpy->bufmax;
 
297
        dpy->bufmax = dpy->buffer;
291
298
#endif
292
299
 
293
300
        /* Set up the input event queue and input event queue parameters. */
790
797
 
791
798
void _XFreeDisplayStructure(Display *dpy)
792
799
{
 
800
        /* move all cookies in the EQ to the jar, then free them. */
 
801
        if (dpy->qfree) {
 
802
            _XQEvent *qelt = dpy->qfree;
 
803
            while (qelt) {
 
804
                if (_XIsEventCookie(dpy, &qelt->event))
 
805
                    _XStoreEventCookie(dpy, &qelt->event);
 
806
                qelt = qelt->next;
 
807
            }
 
808
        }
 
809
        if (dpy->cookiejar)
 
810
            _XFreeEventCookies(dpy);
793
811
        while (dpy->ext_procs) {
794
812
            _XExtension *ext = dpy->ext_procs;
795
813
            dpy->ext_procs = ext->next;