Go to the source code of this file.
Data Structures | |
struct | _CxFP |
A file pointer. More... | |
Typedefs | |
typedef _CxFP | CxFP |
A file pointer. | |
Functions | |
CxFP * | cxNewFp (void) |
Creates a file pointer structure. | |
void | cxSetFpAccessMode (CxFile *file, CxAccessMode accessMode) |
Sets the access mode of the specified file. | |
void | cxSetReadFunc (CxFP *fp, size_t(*fnc)(void *, size_t, size_t, CxFP *)) |
Sets the read function for this file pointer. | |
void | cxSetWriteFunc (CxFP *fp, size_t(*fnc)(const void *, size_t, size_t, CxFP *)) |
Sets the write function for this file pointer. | |
void | cxSetSeekFunc (CxFP *fp, void(*fnc)(CxFP *, long, int)) |
Sets the seek function for this file pointer. | |
void | cxSetCloseFunc (CxFP *fp, void(*fnc)(CxFP *)) |
Sets the close function for this file pointer. | |
void | cxSetError (CxFP *fp, int errnum, const char *errstr) |
Sets the current error number and string. | |
CxAccessMode | cxGetFpAccessMode (CxFile *file) |
Returns the access mode of the specified file. |
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
A file pointer.
|
|
Returns the access mode of the specified file.
|
|
Creates a file pointer structure.
|
|
Sets the close function for this file pointer.
This should destroy the module-specific content associated with this file pointer in the This function must be in the following format:
void closeFunction(CxFP *fp) { ... } The name of the function can be changed, of course.
|
|
Sets the current error number and string.
|
|
Sets the access mode of the specified file.
|
|
Sets the read function for this file pointer. This should work just like libc's fread() function, but with a CxFP instead of a FILE. It must read from the file stored in the archive. This function must be in the following format:
size_t readFunction(void *ptr, size_t size, size_t nmemb, CxFP *fp) { ... } The name of the function can be changed, of course.
|
|
Sets the seek function for this file pointer. This should work just like libc's fseek() function, but with a CxFP instead of a FILE. It must seek to the specified location in the file. This function must be in the following format:
void seekFunction(CxFP *fp, long offset, int whence) { ... } The name of the function can be changed, of course.
|
|
Sets the write function for this file pointer. This should work just like libc's fwrite() function, but with a CxFP instead of a FILE. It must write to the file stored in the archive. This function must be in the following format:
size_t writeFunction(const void *ptr, size_t size, size_t nmemb, CxFP *fp) { ... } The name of the function can be changed, of course.
|