Current Path : /compat/linux/proc/self/root/usr/src/contrib/groff/src/preproc/grn/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/src/contrib/groff/src/preproc/grn/hpoint.cpp |
/* Last non-groff version: hpoint.c 1.1 84/10/08 */ /* * This file contains routines for manipulating the point data structures * for the gremlin picture editor. */ #include <stdlib.h> #include "gprint.h" /* * Return pointer to empty point list. */ POINT * PTInit() { return ((POINT *) NULL); } /* * This routine creates a new point with coordinates x and y and links it * into the pointlist. */ POINT * PTMakePoint(double x, double y, POINT **pplist) { register POINT *pt; if (Nullpoint(pt = *pplist)) { /* empty list */ *pplist = (POINT *) malloc(sizeof(POINT)); pt = *pplist; } else { while (!Nullpoint(pt->nextpt)) pt = pt->nextpt; pt->nextpt = (POINT *) malloc(sizeof(POINT)); pt = pt->nextpt; } pt->x = x; pt->y = y; pt->nextpt = PTInit(); return (pt); } /* end PTMakePoint */ /* EOF */