Write - HP 68000 Series User Manual

Debugger/simulator
Table of Contents

Advertisement

write

Function
Write to a system file
Synopsis
int write(fildes, buf, nbyte)
int
fildes;
char
*buf;
unsigned nbyte;
Description
The write macro writes to a system file. This macro is an interface to the
UNIX system call write(2). Refer to the HP-UX Reference Manual for detailed
information.
Diagnostics
If the system call to write(2) is successful, the number of bytes written is
returned. Otherwise, -1 is returned and a system generated error message is
written to the journal window of the debugger.
Example
The following command file segment defines two global debugger symbols and
includes the definition of a user-defined macro that uses write().
Symbol Add int infile
Symbol Add int outfile
Debugger Macro Add int foo(infile, outfile)
int
infile;
int
outfile;
{
char
buf[80];
while (!read(infile, buf, 80))
write(outfile, buf, 80);
}
Chapter 11: Predefined Macros
/* file descriptor to read from */
/* file descriptor to write to
write
*/
481

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents