ObjFW  Artifact [031f4c03f0]

Artifact 031f4c03f0bf75a01f634b5ae4f71ab542509b3f6b511391f0bd9c9cd4c72011:


/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import <stdio.h>

#import "OFString.h"
#import "OFList.h"
 
int
main()
{
	OFList		*list;
	OFListObject	*iter;

	list = [OFList new];
 
	[list addNew: [OFString new: "First String Object"]];
	[list addNew: [OFString new: "Second String Object"]];
	[list addNew: [OFString new: "Third String Object"]];
 
	for (iter = [list first]; iter != nil; iter = [iter next])
		printf("%s\n", [(OFString*)[iter data] cString]);
 
	[iter free];
	[list free];

	return 0;
}