GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AL_FOPEN (3)

NAME

al_fopen - Allegro 5 API

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

C]
#include <allegro5/allegro.h>

ALLEGRO_FILE *al_fopen(const char *path, const char *mode) ]

DESCRIPTION

Creates and opens a file (real or virtual) given the path and mode. The current file interface is used to open the file.

Parameters:
[bu] path - path to the file to open
[bu] mode - access mode to open the file in ("r", "w", etc.)
Depending on the stream type and the mode string, files may be opened in "text" mode. The handling of newlines is particularly important. For example, using the default stdio-based streams on DOS and Windows platforms, where the native end-of-line terminators are CR+LF sequences, a call to al_fgetc(3) may return just one character ([aq]\n[aq]) where there were two bytes (CR+LF) in the file. When writing out [aq]\n[aq], two bytes would be written instead. (As an aside, [aq]\n[aq] is not defined to be equal to LF either.)

Newline translations can be useful for text files but is disastrous for binary files. To avoid this behaviour you need to open file streams in binary mode by using a mode argument containing a "b", e.g. "rb", "wb".

Returns a file handle on success, or NULL on error.

SEE ALSO

al_set_new_file_interface(3), al_fclose(3).

Search for    or go to Top of page |  Section 3 |  Main Index


Allegro reference manual AL_FOPEN (3)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.