![Argox PT-10 Скачать руководство пользователя страница 78](http://html.mh-extra.com/html/argox/pt-10/pt-10_programming-manual_2969261078.webp)
77
Example call
:
total_file = filelist(file_list);
Includes
:
#include “LIB_CL.h ”
Description
:
The filelist function copies the file name, file type, and file size
information (separated by a blank character) of all files in
existence into a character array specified in the argument dir.
When char * file_list = NULL
,
it will pass the length that the file
string needs back.
Returns
:
When “char*file_list”is NULL, it will pass the size of memory
back.
When “char*file_list”is NULL, it will pass the quantity of file
back.
fErrorCode
:
None
lseek
Purpose
:
Move file pointer of a DAT file to a new position.
Syntax
:
long lseek(int fd, long offset, int origin);
Example call
:
lseek (fd, 512, 0);
Includes
:
#include “LIB_CL.h ”
The lseek function moves the file pointer of a DAT file whose
file handle is specified in the argument fd to a new position
within the file. The new position is specified with an offset byte
address to a specific origin. The offset byte address is specified
in the argument offset which is a long integer. There are 3
possible values for the argument origin.
The values and their interpretations are listed below.
Value of origin
Interpretation
1
beginning of file
0
current file pointer position
-1
end of file
Description
:
Returns
:
When successful, lseek returns the new byte offset address of the
file pointer from the beginning of file. In case of error, lseek
returns a long value of -1L 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 specified by fd does not exist.
9:Illegal offset value.
10:Illegal origin value.
15:New position is beyond end-of-file.
Содержание 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 ...