e70152e44cc66cc599ff6b699eb8adc07f3e656a kent Sat May 24 21:09:34 2014 -0700 Adding Copyright NNNN Regents of the University of California to all files I believe with reasonable certainty were developed under UCSC employ or as part of Genome Browser copyright assignment. diff --git src/lib/psPoly.c src/lib/psPoly.c index e9df86e..5e94e7e 100644 --- src/lib/psPoly.c +++ src/lib/psPoly.c @@ -1,49 +1,52 @@ /* psPoly - two dimensional polygon. */ + +/* Copyright (C) 2011 The Regents of the University of California + * See README in this or parent directory for licensing information. */ #include "common.h" #include "psPoly.h" struct psPoly *psPolyNew() /* Create new (empty) polygon */ { struct psPoly *poly; AllocVar(poly); return poly; } void psPolyFree(struct psPoly **pPoly) /* Free up resources associated with polygon */ { struct psPoly *poly = *pPoly; if (poly != NULL) { if (poly->lastPoint != NULL) { poly->lastPoint->next = NULL; slFreeList(&poly->ptList); } freez(pPoly); } } void psPolyAddPoint(struct psPoly *poly, double x, double y) /* Add point to polygon. */ { struct psPoint *pt; poly->ptCount += 1; AllocVar(pt); pt->x = x; pt->y = y; if (poly->ptList == NULL) { poly->ptList = poly->lastPoint = pt; pt->next = pt; } else { poly->lastPoint->next = pt; pt->next = poly->ptList; poly->lastPoint = pt; } }