Atari ST series Technical Reference Manual page 138

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Fdatime() gets or sets the timestamp for the file referred to
by handle, according to the setting of mode. If mode is set to 1,
the file's time stamp is set according to the value stored in
the buffer pointed to by timeptr. If mode is set to 0, the file's
time stamp is read into that buffer. In either case, timeptr
contains the address of a 32-bit buffer that holds the time
and date stamp information. The first word of the buffer con­
tains the date in the following format:
Bit Number Description
0 -4
Day
5 -8
Month
9-15
Year
* Year value is added to 1980 to get current year.
The second word holds the time, as follows:
Bit Number
0 -4
Seconds divided by 2
5-10
Minutes
11-15
Hour
File I/O Redirection
The standard file handles (standard input, standard output)
are commonly used for console-driven TOS applications.
Sometimes, however, you may want to redirect the output of
a TOS program to a device other than the screen. For exam­
ple, if you're running a program to list a disk directory on
the screen, you may want to send that output to a printer.
This type of redirection is a common feature of command
line interface shell programs.
GEMDOS includes a couple of functions that make it
possible to do this kind of I/O redirection. This first is used
to create a user-designated file handle that duplicates one of
the standard file handles. In other words, it takes a file han­
dle with a value of five or less, and returns a file handle with
a value of six or more, which points to the exact same de­
vice. This is useful for two reasons.
The first reason is that if you change a standard device
handle, you want to have some way of changing it back.
Therefore, use the handle duplicate function to create a tem­
porary copy of the original handle before you redirect the I/O
130
CHAPTER 6
Range
1-31
1-12
0-119*
Description
Range
0-29
0-59
0-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents