#include <nlibc.h>
#include <os1/defs_os1.h>
#include <errno.h>
#include <stddef.h>
#include <string.h>
#include <stdarg.h>
#include <typecodes.h>
#include <assert.h>
#include <os1/slice_stdio_os1.h>
Include dependency graph for stdio_os1.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | write_double write_float |
#define | write_string(STR) fputs((STR),stdout) |
#define | EOF (-1) |
#define | _IOFBF 0 |
#define | _IOLBF 1 |
#define | _IONBF 2 |
#define | BUFSIZ 0 |
#define | FOPEN_MAX __NLCC_OS1_MAX_FILES__ |
#define | FILENAME_MAX 4095 |
#define | L_tmpnam 20 |
#define | TMP_MAX 238328 |
#define | SEEK_SET 0 |
Seek from beginning of file. | |
#define | SEEK_CUR 1 |
Seek from current position. | |
#define | SEEK_END 2 |
Seek from end of file. | |
#define | _fputs(str, stream, sep) |
#define | putc(C, STR) fputc(C, STR) |
#define | tfread(PTR, NMEMB, STREAM) __tfread(__typecode(*PTR),PTR,NMEMB,STREAM) |
#define | tfwrite(PTR, NMEMB, STREAM) __tfwrite(__typecode(*PTR),PTR,NMEMB,STREAM) |
#define | __IOPUT_INIT |
#define | __IOPUT(ITYPE, CTYPE) |
#define | fputf(VAL, STREAM) fputd(VAL, STREAM) |
#define | putf(VAL, STREAM) putd(VAL, STREAM) |
#define | __IOPUTA(CTS, ITYPE, BS) |
#define | printf(ARGS...) fprintf(stdout, ##ARGS) |
#define | vprintf(FMT, ARG) vfprintf(stdout, (FMT), (ARG)) |
#define | scanf(ARGS...) fscanf(stdin, ##ARGS) |
Typedefs | |
typedef int | fpos_t |
typedef __nlcc_file_struct | FILE |
Functions | |
void | write_int (int i) |
void | write_int_array (int *ip, int size) |
void | write_float (float f) |
void | write_float_array (float *fp, int size) |
void | write_double_array (double *fp, int size) |
void | write_complex (complex c) |
void | write_complex_array (complex *cp, int size) |
void | write_vector (vector v) |
void | write_vector_array (vector *vp, int size) |
int | remove (const char *filename) |
int | rename (const char *old, const char *new) |
FILE * | tmpfile (void) |
char * | tmpnam (char *s) |
int | fflush (FILE *stream) |
FILE * | fopen (const char *path, const char *mode) |
int | fclose (FILE *stream) |
FILE * | freopen (const char *restrict filename, const char *restrict mode, FILE *restrict stream) |
void | setbuf (FILE *restrict stream, char *restrict buf) |
int | setvbuf (FILE *restrict stream, char *restrict buf, int mode, size_t size) |
long | _fsetpos (FILE *stream, fpos_t *pos, int whence) |
int | fseek (FILE *stream, long offset, int whence) |
void | rewind (FILE *stream) |
int | fsetpos (FILE *stream, fpos_t *pos) |
int | fgetpos (FILE *stream, fpos_t *pos) |
long | ftell (FILE *stream) |
int | fputs (const char *str, FILE *stream) |
int | puts (const char *str) |
int | fputc (int c, FILE *stream) |
int | putchar (int c) |
size_t | fread (void *ptr, size_t size, size_t nmemb, FILE *stream) |
size_t | fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
size_t | __tfread (int tcode, const void *ptr, size_t nmemb, FILE *stream) |
size_t | __tfwrite (int tcode, const void *ptr, size_t nmemb, FILE *stream) |
int | fputd (const double val, FILE *stream) |
int | putd (const double val) |
int | fputx (const complex val, FILE *stream) |
int | putx (const complex val) |
int | fputv (const vector val, FILE *stream) |
int | putv (const vector val) |
int | fputi (const int val, FILE *stream) |
int | puti (const int val) |
int | fputiv (const vector int val, FILE *stream) |
int | putiv (const vector int val) |
int | fputh (const int val, FILE *stream) |
int | fputhv (const int val, FILE *stream) |
int | puth (const int val) |
int | puthv (const int val) |
int | fputia (const int *ptr, int len, FILE *stream) |
int | fputiva (const int *ptr, int len, FILE *stream) |
int | fputxa (const complex *ptr, int len, FILE *stream) |
int | fputva (const vector *ptr, int len, FILE *stream) |
int | fputda (const double *ptr, int len, FILE *stream) |
int | fputua (const unsigned *ptr, int len, FILE *stream) |
int | fputha (const int *ptr, int len, FILE *stream) |
int | fputhva (const int *ptr, int len, FILE *stream) |
int | putia (const int *ptr, int len) |
int | putiva (const int *ptr, int len) |
int | putxa (const complex *ptr, int len) |
int | putva (const vector *ptr, int len) |
int | putda (const double *ptr, int len) |
int | putua (const unsigned *ptr, int len) |
int | putha (const int *ptr, int len) |
int | puthva (const int *ptr, int len) |
int | fgetd (double *ptr, FILE *stream) |
int | getd (double *ptr) |
int | fgetx (complex *ptr, FILE *stream) |
int | getx (complex *ptr) |
int | fgetv (vector *ptr, FILE *stream) |
int | getv (vector *ptr) |
int | fgeti (int *ptr, FILE *stream) |
int | geti (int *ptr) |
int | fprintf (FILE *stream, const char *format,...) |
int | vfprintf (FILE *restrict stream, const char *restrict format, va_list ap) |
int | fscanf (FILE *restrict stream, const char *restrict format,...) |
void | clearerr (FILE *stream) |
int | feof (FILE *stream) |
int | ferror (FILE *stream) |
void | perror (const char *s) |
int | fileno (FILE *stream) |
|
Value: asm("\n\t!! begin fput"#CTYPE"()");\ asm("\t$io_start\n"\ "\t$io_fd( 0.%1 )\n"\ "\t$io_put"#ITYPE"( 0x0.%2 )\n"\ "\t$io_end\n"\ "\tlmtr %0 $MEM_SYS_RVAL\n"\ : "=r" (sys_rval) : "r" (stream->fd), "r" (&val) );\ \ retval = 0;\ where (sys_rval.lo) {\ stream->err = 1;\ retval = -1;\ }\ asm("\t!! end fput"#CTYPE"()\n");\ return retval Definition at line 1560 of file stdio_os1.h. Referenced by fputd(), fputh(), fputhv(), fputi(), fputiv(), fputv(), and fputx(). |
|
Value: int retval;\ vector int sys_rval;\ \ _Pragma("localmem");\ \
Definition at line 1553 of file stdio_os1.h. Referenced by fputd(), fputda(), fputh(), fputha(), fputhv(), fputhva(), fputi(), fputia(), fputiv(), fputiva(), fputua(), fputv(), fputva(), fputx(), and fputxa(). |
|
Value: asm("\n\t!! begin fput"#CTS"a()");\ asm("\t$io_start\n"\ "\t$io_fd( 0.%1 )\n"\ "\t\\equl $cmd $SYS_IOCMD_GWR\n"\ "\t\\equl $fmt <$SYS_IOFMT_"#ITYPE">\n"\ "\t\\equl $sep <$SYS_IOPSEP_NL .or. $SYS_IOWSEP_SPACE>\n"\ "\t\\equl $dev $SYS_IODEV_MEM\n"\ "\t\\equl $bs "#BS"\n"\ "\t\\equl $rdflg $SYS_IORDFLG_NOP\n"\ "\t$io_packet($cmd, <$fmt .or. $sep>, $rdflg, $dev, 0.%2, $bs, 0.%3)\n"\ "\t$io_end\n"\ "\tlmtr %0 $MEM_SYS_RVAL\n"\ : "=r" (sys_rval)\ : "r" (stream->fd), "r" (len), "r" (ptr) );\ \ retval = 0;\ where (sys_rval.lo) {\ stream->err = 1;\ retval = -1;\ }\ asm("\t!! end fput"#CTS"a()\n");\ return retval Definition at line 1643 of file stdio_os1.h. Referenced by fputda(), fputha(), fputhva(), fputia(), fputiva(), fputua(), fputva(), and fputxa(). |
|
Value: int retval; \ vector int sys_rval; \ \ if(! stream->fd) { \ return EOF; \ } \ \ asm("\t$io_start\n" \ "\t$io_fd( 0.%1 )\n" \ "\t\\equl $cmd $SYS_IOCMD_GWR\n" \ "\t\\equl $fmtsep <$SYS_IOFMT_VARSTR .or. %2>\n" \ "\t\\equl $dev $SYS_IODEV_MEM\n" \ "\t\\equl $l 0\n" \ "\t\\equl $bs $SYS_IOBS_V\n" \ "\t\\equl $rdflg $SYS_IORDFLG_NOP\n" \ "\t$io_packet($cmd, $fmtsep, $rdflg, $dev, $l, $bs, 0.%3)\n" \ "\t$io_end\n" \ "\tlmtr %0 $MEM_SYS_RVAL\n" \ : "=r" (sys_rval) : "r" (stream->fd), "I" (sep), "r" (str)); \ \ retval = 0; \ where (sys_rval.lo) { \ retval = EOF; \ stream->err = 1; \ errno = sys_rval.hi; \ } \ \ return retval;
Definition at line 1139 of file stdio_os1.h. |
|
Yields the value of the mode argument to "int setvbuf(...)" to indicate full buffering Definition at line 408 of file stdio_os1.h. |
|
Yields the value of the mode argument to "int setvbuf(...)" to indicate line buffering Definition at line 415 of file stdio_os1.h. |
|
Yields the value of the mode argument to "int setvbuf(...)" to indicate no buffering Definition at line 422 of file stdio_os1.h. |
|
It expands to an integer constant expression that is the size of the buffer used by the setbuf function Definition at line 429 of file stdio_os1.h. |
|
EOF expands to an integer constant expression, with type int and a negative value, that is returned by several functions to indicate end-of-file, that is, no more input from a stream; Definition at line 376 of file stdio_os1.h. Referenced by fputc(). |
|
It yields the maximum size array of characters that you must provide to hold a filename. A filename is a string whose contents meet the requirements of the target environment for naming files. Definition at line 445 of file stdio_os1.h. |
|
It yields the maximum number of files that the target environment permits to be simultaneously open Definition at line 436 of file stdio_os1.h. |
|
Definition at line 1577 of file stdio_os1.h. |
|
It yields the number of characters that the target environment requires for representing temporary filenames created by char *tmpnam(...) Definition at line 452 of file stdio_os1.h. |
|
Definition at line 1854 of file stdio_os1.h. Referenced by write_int(). |
|
Definition at line 1203 of file stdio_os1.h. Referenced by putchar(). |
|
Definition at line 1578 of file stdio_os1.h. |
|
Definition at line 2040 of file stdio_os1.h. |
|
Seek from current position.
Definition at line 993 of file stdio_os1.h. |
|
Seek from end of file.
Definition at line 994 of file stdio_os1.h. |
|
Seek from beginning of file.
Definition at line 992 of file stdio_os1.h. |
|
Definition at line 1385 of file stdio_os1.h. |
|
Definition at line 1451 of file stdio_os1.h. |
|
It yields the minimum number of distinct filenames created by char tmpnam(...). Definition at line 459 of file stdio_os1.h. |
|
Definition at line 1855 of file stdio_os1.h. |
|
Definition at line 137 of file stdio_os1.h. |
|
Definition at line 367 of file stdio_os1.h. |
|
FILE is an object type capable of recording all the information needed to control a stream, including its file position indicator, a pointer to its associated buffer (if any), an error indicator that records whether a read/write error has occurred, and an end-of-file indicator that records whether the end of the file has been reached; Definition at line 400 of file stdio_os1.h. Referenced by mfgetdi(), mfgeti(), mfgetx(), mfputd(), mfputda(), mfputh(), mfputhv(), mfputi(), mfputia(), mfputiv(), mfputu(), mfputva(), mfputx(), mfputxa(), and tmpfile(). |
|
The type fpos_t is an object type of an object that you declare to hold the value of a file-position indicator stored by fsetpos and accessed by int fgetpos(...). Definition at line 386 of file stdio_os1.h. |
|
|
|
|
|
Definition at line 998 of file stdio_os1.h. References EBADF, EINVAL, __nlcc_file_struct::err, errno, __nlcc_file_struct::fd, SEEK_CUR, SEEK_END, and SEEK_SET. |
|
|
|
|
|
|
|
|
|
Definition at line 628 of file stdio_os1.h. |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 2235 of file stdio_os1.h. References __nlcc_file_struct::fd. |
|
|
|
|
|
Definition at line 1186 of file stdio_os1.h. |
|
Definition at line 1581 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by putd(). |
|
Definition at line 1684 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. Referenced by putda(). |
|
Definition at line 1626 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by puth(). |
|
Definition at line 1692 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. |
|
Definition at line 1631 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by puthv(). |
|
Definition at line 1696 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. |
|
Definition at line 1608 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by puti(). |
|
Definition at line 1668 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. Referenced by putia(). |
|
Definition at line 1617 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by putiv(). |
|
Definition at line 1672 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. Referenced by putiva(). |
|
Definition at line 1170 of file stdio_os1.h. References _fputs. Referenced by fputc(). |
|
Definition at line 1688 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. Referenced by putua(). |
|
Definition at line 1599 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by putv(). |
|
Definition at line 1680 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. Referenced by putva(). |
|
Definition at line 1590 of file stdio_os1.h. References __IOPUT, and __IOPUT_INIT. Referenced by putx(). |
|
Definition at line 1676 of file stdio_os1.h. References __IOPUT_INIT, and __IOPUTA. Referenced by putxa(). |
|
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); size_t fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream);
|
|
|
|
|
|
Definition at line 1041 of file stdio_os1.h. References _fsetpos(), and fpos_t. |
|
Definition at line 1059 of file stdio_os1.h. References _fsetpos(), and SEEK_SET. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 1207 of file stdio_os1.h. |
|
Definition at line 1586 of file stdio_os1.h. |
|
Definition at line 1716 of file stdio_os1.h. |
|
Definition at line 1636 of file stdio_os1.h. |
|
Definition at line 1724 of file stdio_os1.h. |
|
Definition at line 1640 of file stdio_os1.h. |
|
Definition at line 1728 of file stdio_os1.h. |
|
Definition at line 1613 of file stdio_os1.h. |
|
Definition at line 1700 of file stdio_os1.h. |
|
Definition at line 1622 of file stdio_os1.h. |
|
Definition at line 1704 of file stdio_os1.h. |
|
Definition at line 1177 of file stdio_os1.h. |
|
Definition at line 1720 of file stdio_os1.h. |
|
Definition at line 1604 of file stdio_os1.h. |
|
Definition at line 1712 of file stdio_os1.h. |
|
Definition at line 1595 of file stdio_os1.h. |
|
Definition at line 1708 of file stdio_os1.h. |
|
Definition at line 486 of file stdio_os1.h. |
|
Definition at line 520 of file stdio_os1.h. |
|
Definition at line 1050 of file stdio_os1.h. References _fsetpos(), fpos_t, and SEEK_SET. |
|
Definition at line 897 of file stdio_os1.h. |
|
Definition at line 943 of file stdio_os1.h. References size_t. |
|
Definition at line 559 of file stdio_os1.h. References FILE. |
|
Definition at line 595 of file stdio_os1.h. |
|
|
|
Definition at line 236 of file stdio_os1.h. |
|
Definition at line 275 of file stdio_os1.h. |
|
Definition at line 199 of file stdio_os1.h. |
|
Definition at line 120 of file stdio_os1.h. |
|
Definition at line 161 of file stdio_os1.h. |
|
Definition at line 44 of file stdio_os1.h. |
|
Definition at line 82 of file stdio_os1.h. |
|
Definition at line 312 of file stdio_os1.h. |
|
Definition at line 351 of file stdio_os1.h. |