ObjFW  Diff

Differences From Artifact [9d72f8d05d]:

To Artifact [87163d3271]:


122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/**
 * Initializes an already allocated OFFile.
 *
 * \param fp A file pointer, returned from for example fopen().
 *	     It is not closed when the OFFile object is deallocated!
 */
- initWithFilePointer: (FILE*)fp;

/**
 * Reads from the file into a buffer.
 *
 * \param buf The buffer into which the data is read
 * \param size The size of the data that should be read.
 *	  The buffer MUST be at least size * nitems big!
 * \param nitems nitem The number of items to read
 *	  The buffer MUST be at least size * nitems big!
 * \return The number of bytes read
 */
- (size_t)readNItems: (size_t)nitems
	      ofSize: (size_t)size
	  intoBuffer: (char*)buf;

/**
 * Writes from a buffer into the file.
 *
 * \param nitems The number of items to write
 * \param size The size of the data that should be written
 * \param buf The buffer from which the data is written to the file
 * \return The number of bytes written
 */
- (size_t)writeNItems: (size_t)nitems
	       ofSize: (size_t)size
	   fromBuffer: (const char*)buf;
@end

@interface OFFileSingleton: OFFile
@end

/// An OFFile object for stdin.
extern OFFile *of_stdin;
/// An OFFile object for stdout.
extern OFFile *of_stdout;
/// An OFFile object for stderr.
extern OFFile *of_stderr;







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











122
123
124
125
126
127
128


























129
130
131
132
133
134
135
136
137
138
139
/**
 * Initializes an already allocated OFFile.
 *
 * \param fp A file pointer, returned from for example fopen().
 *	     It is not closed when the OFFile object is deallocated!
 */
- initWithFilePointer: (FILE*)fp;


























@end

@interface OFFileSingleton: OFFile
@end

/// An OFFile object for stdin.
extern OFFile *of_stdin;
/// An OFFile object for stdout.
extern OFFile *of_stdout;
/// An OFFile object for stderr.
extern OFFile *of_stderr;