ObjFW  Diff

Differences From Artifact [075ee49105]:

To Artifact [4c1c9e6a22]:


16
17
18
19
20
21
22


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#include "config.h"

#include <stdlib.h>
#include <stdio.h>

#import "OFSeekableStream.h"



@implementation OFSeekableStream
- init
{
	if (object_getClass(self) == [OFSeekableStream class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();
		} @catch (id e) {
			[self release];
			@throw e;
		}
	}

	return [super init];
}

- (off_t)lowlevelSeekToOffset: (off_t)offset
		       whence: (int)whence
{
	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (off_t)seekToOffset: (off_t)offset
	       whence: (int)whence
{
	if (whence == SEEK_CUR)
		offset -= _readBufferLength;







>
>




















|
<







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

46
47
48
49
50
51
52

#include "config.h"

#include <stdlib.h>
#include <stdio.h>

#import "OFSeekableStream.h"

#import "macros.h"

@implementation OFSeekableStream
- init
{
	if (object_getClass(self) == [OFSeekableStream class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();
		} @catch (id e) {
			[self release];
			@throw e;
		}
	}

	return [super init];
}

- (off_t)lowlevelSeekToOffset: (off_t)offset
		       whence: (int)whence
{
	OF_UNRECOGNIZED_SELECTOR

}

- (off_t)seekToOffset: (off_t)offset
	       whence: (int)whence
{
	if (whence == SEEK_CUR)
		offset -= _readBufferLength;