
82
10:No more free file space for file extension.
writeln
Purpose
:
Write a line terminated by a null character (\0) to a DAT file.
The null character is also written to the file. After writing in, file
position will update.
Syntax
:
int writeln(int fd, char *buffer);
Example call
:
writeln(fd, data_buffer);
Includes
:
#include “LIB_CL.h ”
Description
:
The writeln function writes a line terminated by a null character
from the character array buffer to a DAT file whose file handle is
fd. Characters are written to the file until a null character (\0) is
encountered. The null character is also written to the file. Writing
of data starts at the current position of the file pointer, which is
incremented accordingly when the operation is completed. If the
end-of-file condition is encountered during the operation, the file
will be extended automatically to complete the operation.
Returns
:
The writeln function returns the number of bytes actually written
to the file (includes the null character). In case of error, writeln
returns an integer value of -1 and an error code is set to the global
variable fErrorCode to indicate the error condition encountered.
Possible error codes and their interpretation are listed below.
fErrorCode
:
2:File handle is NULL.
7:fd is not a file handle of a previously opened file.
9:no null character found in buffer
10:No more free file space for file extension.
DiskC_format
Purpose
:
Format disk C.
Syntax
:
int DiskC_format(void);
Example call
:
DiskC_ format ( );
Includes
:
#include
“
LIB_CL.h
"
Description
:
The DiskC_format function formats disk C.
Returns
:
0 : Format false
。
1 : Format OK
。
fErrorCode
:
None
DiskD_format
Purpose
:
Format disk D.
Syntax
:
int DiskD_ format (void);
Example call
:
DiskD_ format ( );
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...