ObjFW  Check-in [9160269d5f]

Overview
Comment:of_std{in,out,err} don't support seeking.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9160269d5fd58581bda84b6d97b1ac03934bc531eeacc8dca95a3ea11c34d148
User & Date: js on 2011-02-26 14:27:12
Other Links: manifest | tags
Context
2011-02-26
19:00
Make isa public to allow for better class swizzling. check-in: 58c07e80e4 user: js tags: trunk
14:27
of_std{in,out,err} don't support seeking. check-in: 9160269d5f user: js tags: trunk
14:23
Clean up exception descriptions a little. check-in: 29e981d99a user: js tags: trunk
Changes

Modified src/OFFile.m from [c76530e6dd] to [9d8d131cd6].

693
694
695
696
697
698
699
700

701
702
703
704
705
706
707
708
709
710

711
712
713
714
715
716
717
693
694
695
696
697
698
699

700
701
702
703
704
705
706
707
708
709

710
711
712
713
714
715
716
717







-
+









-
+








- (void)_seekToOffset: (off_t)offset
{
	if (lseek(fd, offset, SEEK_SET) == -1)
		@throw [OFSeekFailedException newWithClass: isa];
}

- (size_t)_seekForwardWithOffset: (off_t)offset
- (off_t)_seekForwardWithOffset: (off_t)offset
{
	off_t ret;

	if ((ret = lseek(fd, offset, SEEK_CUR)) == -1)
		@throw [OFSeekFailedException newWithClass: isa];

	return ret;
}

- (size_t)_seekToOffsetRelativeToEnd: (off_t)offset
- (off_t)_seekToOffsetRelativeToEnd: (off_t)offset
{
	off_t ret;

	if ((ret = lseek(fd, offset, SEEK_END)) == -1)
		@throw [OFSeekFailedException newWithClass: isa];

	return ret;
769
770
771
772
773
774
775


















776
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


- (void)dealloc
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
	[super dealloc];	/* Get rid of stupid warning */
}

- (void)_seekToOffset: (off_t)offset
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (off_t)_seekForwardWithOffset: (off_t)offset
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (off_t)_seekToOffsetRelativeToEnd: (off_t)offset
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}
@end