ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Temp/MiscCoordAdditions/main.c

This is main.c in view mode; [Download] [Up]

// Copyright (c) 1997  Todd Anthony Nathan  All Rights Reserved.
//
// Created: Sun Mar  9 02:16:13 GMT-0600 1997
// By:      Todd Anthony Nathan
// 
// You are free to do as you see fit with this software.  The author
// doesn't make any implied or non-implied guarentees to the fitness
// of the software.  Use it at your own risk.
///

#import <appkit/appkit.h>
#import <misckit/miscgiskit.h>
#import "MiscCoordAdditions.h"

int main ()
{
	id	data;
	NXPoint	currPoint;
	int	index;

	data = [[MiscCoord alloc] init];
	for ( index = 8; index >= 0; index-- ) {
		currPoint.x = index;
		currPoint.y = -index;
		[data replacePoint:&currPoint at:index];
	}
	currPoint.x = 100; currPoint.y = -100;
	[data prependPoint:&currPoint];
	currPoint.x = 200; currPoint.y = -200;
	[data appendPoint:&currPoint];

	currPoint.x = 1000; currPoint.y = -1000;
	[data insertPoint:&currPoint at:20];

	// Print the data forwards ...
	printf("Data Forward ...\n");
	[data dumpPoints];

	// Print the data backwards ...
	printf("Data Backwards ...\n");
	[data reverse];
	[data dumpPoints];

	[data free];

	return ( 0 );
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.