Monday, November 08, 2010 at 12:01 AM.


on readPackedCard (f) { <<read a Card Editor file into the object database
	<<the data fork of a Card Editor file contains a packed card, and that's all
		<<updated 1/5/96 DW -- strips off net header, if it's present
	<<Fri, Dec 5, 1997 at 1:52:15 AM by PBS
		<<Changed call to toys.readWholeFile to file.readWholeFile.
	local (s = string (file.readWholeFile (f)));
	local (line1 = string.nthField (s, "\r", 1));
	if line1 == "MacBird 1.0 -- 12/31/95" {
		s = string.delete (s, 1, sizeof (line1) + 1);
		line1 = string.nthField (s, "\r", 1);
		s = string.delete (s, 1, sizeof (line1) + 1)};
	s = binary (s);
	setBinaryType (s, 'CARD');
	return (s)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.