DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T X

⟦5f8c9bc3b⟧ TextFile

    Length: 1046 (0x416)
    Types: TextFile
    Names: »XAppendVertex.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z« 
        └─⟦2109abc41⟧ 
            └─ ⟦this⟧ »./X.V10R4/Xlib/XAppendVertex.c« 

TextFile

#include <X/mit-copyright.h>

/* $Header: XAppendVertex.c,v 10.6 86/04/22 15:19:07 jg Rel $ */
/* Copyright    Massachusetts Institute of Technology    1985	*/

#include "XlibInternal.h"
XAppendVertex (vertices, nvert)
    Vertex vertices[];
    int nvert;
    {
    register Display *dpy = _XlibCurrentDisplay;
    register XReq *lastdraw;
    register char *old_bufptr, *new_bufptr;
    int nbytes;

    if ((lastdraw = (XReq*)(dpy->lastdraw)) == NULL)
    	return (0);  /* no draw command in output buffer */

    old_bufptr = dpy->bufptr;
    /* subtract off any padding */
    if (lastdraw->params0 & 1)
	old_bufptr -= 2;
    new_bufptr = old_bufptr + (nbytes = nvert*sizeof(Vertex));
    if (new_bufptr >= dpy->bufmax)
    	return (-1); /* vertices don't fit */
    
    /* increment number of vertices in XDraw packet */
    lastdraw->params0 += nvert;
    PackShorts(vertices, old_bufptr, nbytes);
    /* add in padding if needed */
    if (lastdraw->params0 & 1)
	new_bufptr += 2;
    dpy->bufptr = new_bufptr;
    return (nvert);
    }