Put a word on a stream
#include <stdio.h> int putw( int w, FILE *stream );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The putw() function writes the C int (word) w to the standard I/O output stream (at the position of the file pointer, if defined). The size of a word is the size of an integer, and varies from machine to machine. The putw() function neither assumes nor causes special alignment in the file.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
Because of possible differences in word length and byte ordering, files written using putw() are machine-dependent, and might not be read correctly using getw() on a different processor.