ObjFW  Diff

Differences From Artifact [59b3e4b4fd]:

To Artifact [73e673b29a]:


615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640

	if ((ret = read(fileDescriptor, buffer, length)) == 0)
		isAtEndOfStream = YES;

	return ret;
}

- (size_t)_writeNBytes: (size_t)length
	    fromBuffer: (const void*)buffer
{
	size_t ret;

	if (fileDescriptor == -1 || isAtEndOfStream ||
	    (ret = write(fileDescriptor, buffer, length)) < length)
		@throw [OFWriteFailedException newWithClass: isa
						     stream: self
					    requestedLength: length];

	return ret;
}

- (void)_seekToOffset: (off_t)offset
{
	if (lseek(fileDescriptor, offset, SEEK_SET) == -1)
		@throw [OFSeekFailedException newWithClass: isa
						    stream: self







|
|

<
<

|



<
<







615
616
617
618
619
620
621
622
623
624


625
626
627
628
629


630
631
632
633
634
635
636

	if ((ret = read(fileDescriptor, buffer, length)) == 0)
		isAtEndOfStream = YES;

	return ret;
}

- (void)_writeNBytes: (size_t)length
	  fromBuffer: (const void*)buffer
{


	if (fileDescriptor == -1 || isAtEndOfStream ||
	    write(fileDescriptor, buffer, length) < length)
		@throw [OFWriteFailedException newWithClass: isa
						     stream: self
					    requestedLength: length];


}

- (void)_seekToOffset: (off_t)offset
{
	if (lseek(fileDescriptor, offset, SEEK_SET) == -1)
		@throw [OFSeekFailedException newWithClass: isa
						    stream: self