Structural commands
structcmd.h
Go to the documentation of this file.
1/*! \file structcmd.h
2 \brief A Documented file.
3
4 Details.
5*/
6
7/*! \def MAX(a,b)
8 \brief A macro that returns the maximum of \a a and \a b.
9
10 Details.
11*/
12
13/*! \var typedef unsigned int UINT32
14 \brief A type definition for a .
15
16 Details.
17*/
18
19/*! \var int errno
20 \brief Contains the last error code.
21
22 \warning Not thread safe!
23*/
24
25/*! \fn int open(const char *pathname,int flags)
26 \brief Opens a file descriptor.
27
28 \param pathname The name of the descriptor.
29 \param flags Opening flags.
30*/
31
32/*! \fn int close(int fd)
33 \brief Closes the file descriptor \a fd.
34 \param fd The descriptor to close.
35*/
36
37/*! \fn size_t write(int fd,const char *buf, size_t count)
38 \brief Writes \a count bytes from \a buf to the filedescriptor \a fd.
39 \param fd The descriptor to write to.
40 \param buf The data buffer to write.
41 \param count The number of bytes to write.
42*/
43
44/*! \fn int read(int fd,char *buf,size_t count)
45 \brief Read bytes from a file descriptor.
46 \param fd The descriptor to read from.
47 \param buf The buffer to read into.
48 \param count The number of bytes to read.
49*/
50
51#define MAX(a,b) (((a)>(b))?(a):(b))
52typedef unsigned int UINT32;
54int open(const char *,int);
55int close(int);
56size_t write(int,const char *, size_t);
57int read(int,char *,size_t);
int open(const char *, int)
Opens a file descriptor.
int read(int, char *, size_t)
Read bytes from a file descriptor.
int errno
Contains the last error code.
Definition: structcmd.h:53
int close(int)
Closes the file descriptor fd.
unsigned int UINT32
A type definition for a .
Definition: structcmd.h:52
size_t write(int, const char *, size_t)
Writes count bytes from buf to the filedescriptor fd.