Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

854 Function Prototypes Appendix A


int fprintf(FILE *restrictfp,const char *restrictformat,...);
<stdio.h> p. 159
Returns: number of characters output if OK, negative value
if output error

int fputc(intc,FILE *fp);
<stdio.h> p. 152
Returns:cif OK,EOFon error

int fputs(const char *restrictstr,FILE *restrict fp);
<stdio.h> p. 153
Returns: non-negative value if OK,EOFon error

size_t fread(void *restrictptr,size_tsize,size_tnobj,
FILE *restrictfp);
<stdio.h> p. 156
Returns: number of objects read

void free(void *ptr);
<stdlib.h> p. 207

void freeaddrinfo(struct addrinfo *ai);
<sys/socket.h> p. 599
<netdb.h>

FILE *freopen(const char *restrictpath,const char *restricttype,
FILE *restrictfp);
<stdio.h> p. 148
type:"r", "w", "a", "r+", "w+", "a+"
Returns: file pointer if OK,NULLon error

int fscanf(FILE *restrictfp,const char *restrictformat,...);
<stdio.h> p. 162
Returns: number of input items assigned,EOFif input
error or end of file beforeany conversion

int fseek(FILE *fp,longoffset,intwhence);
<stdio.h> p. 158
whence:SEEK_SET, SEEK_CUR, SEEK_END
Returns: 0 if OK,−1 on error

int fseeko(FILE *fp,off_toffset,intwhence);
<stdio.h> p. 158
whence:SEEK_SET, SEEK_CUR, SEEK_END
Returns: 0 if OK,−1 on error
Free download pdf