ftp.nice.ch/pub/next/unix/text/rtfdtohtml.1.3.s.tar.gz#/rtfdtohtml-1.3/pbtools/PBTypes.m

This is PBTypes.m in view mode; [Download] [Up]

#import "PBTypes.h"

@implementation PBTypes
+ new
{	static id pbTypes;	// HashTable: NXAtom -> NXAtom

	if (! pbTypes)
	{	pbTypes = [[self alloc] initKeyDesc:"%" valueDesc:"%"];

#define add(a,b) [pbTypes insertKey:NXUniqueString(#a) value:(void *)b], \
		 [pbTypes insertKey:NXUniqueString(#b) value:(void *)b]

		add(eps, NXPostScriptPboardType);
		add(rtf, NXRTFPboardType);
		add(tif, NXTIFFPboardType);
		add(tiff, NXTIFFPboardType);

#undef add
	}
	return pbTypes;
}
- (NXAtom)type:(const char *)ext
{	NXAtom result = [self valueForKey:NXUniqueString(ext)];

	return result ? result : NXAsciiPboardType;
}
@end

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