This is pointdata.h in view mode; [Download] [Up]
/* This is pointdata.h, header for pointdata.c. */
/* This module is a standard ANSI C point-data */
/* List implementation. Format of a point is : */
#define BLOCKSIZE 100
#define UP 1
#define DOWN 0
#define SKIP -1
typedef struct {
float x;
float y;
int pen;
float pencolour;
} Point;
typedef Point pointBlock[BLOCKSIZE];
typedef struct pnode {
pointBlock block;
int contains;
struct pnode *next;
} pointNode;
typedef struct pointlist {
pointNode *head;
pointNode *tail;
pointNode *curr;
int currpos;
int currtot;
int quantity;
} PointList;
void newPointList(PointList *p);
void freePointList(PointList *p);
int addToPointList(PointList *p, Point *pt);
int removeFromPointList(PointList *p,int index);
int insertInPointListAt(PointList *p,Point *pt, int index);
int gotoPointInList(PointList *p,int index,Point **pt);
int gotoNextPointInList(PointList *p, Point **pt);
int lastPointInList(PointList *p, Point **pt);
void doTestShape(PointList *p);
int savePointList(PointList *p,char *fn);
int loadPointList(PointList *p,char *fn);
int nearestPointInList(PointList *p,Point **pt,float x,float y,int *index);
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.