Main Page | Alphabetical List | Class List | File List | Class Members | File Members

slice_stdio_os1.h File Reference

#include <nlibc.h>
#include <stdarg.h>
#include <os1/defs_os1.h>

Include dependency graph for slice_stdio_os1.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define __MIOPUT(ITS, CTS, CTYPE, STREAM)
#define BODY(args)   ;
#define __MIOPUTA(ITS, ITYPE, CTS, CTYPE, BS, STREAM)
#define __MIOGET(ITS, CTS, CTYPE, STREAM)
#define mprintf(ARGS...)   mfprintf(stdout, ##ARGS)
#define mvprintf(ARGS...)   mvfprintf(stdout, ##ARGS)
#define __MF_ANZARGS   7
#define __TMF_ANZARGS   7
#define __MFSTART(ANZARGS)
#define __MFCHECK(STREAM)
#define __MIOPACKET(IOCMD, IOBS)
#define __MFEND
#define _MFIO(IOCMD, STREAM)
#define _TMFIO(IOCMD, STREAM)
#define BODY(args)   ;
#define mscanf(ARGS...)   mfscanf(stdin, ##ARGS)

Functions

int mfputi (int x1, int y1, int z1,...) BODY(
int mputi (int x1, int y1, int z1,...) BODY(
int mfputiv (int x1, int y1, int z1,...) BODY(
int mputiv (int x1, int y1, int z1,...) BODY(
int mfputx (int x1, int y1, int z1,...) BODY(
int mputx (int x1, int y1, int z1,...) BODY(
int mfputd (int x1, int y1, int z1,...) BODY(
int mputd (int x1, int y1, int z1,...) BODY(
int mfputu (int x1, int y1, int z1,...) BODY(
int mputu (int x1, int y1, int z1,...) BODY(
int mfputh (int x1, int y1, int z1,...) BODY(
int mputh (int x1, int y1, int z1,...) BODY(
int mfputhv (int x1, int y1, int z1,...) BODY(
int mputhv (int x1, int y1, int z1,...) BODY(
int mfputia (int x1, int y1, int z1,...) BODY(
int mputia (int x1, int y1, int z1,...) BODY(
int mfputxa (int x1, int y1, int z1,...) BODY(
int mputxa (int x1, int y1, int z1,...) BODY(
int mfputda (int x1, int y1, int z1,...) BODY(
int mputda (int x1, int y1, int z1,...) BODY(
int mfputva (int x1, int y1, int z1,...) BODY(
int mputva (int x1, int y1, int z1,...) BODY(
int mfgeti (int x1, int y1, int z1,...) BODY(
int mfgetx (int x1, int y1, int z1,...) BODY(
int mfgetdi (int x1, int y1, int z1,...) BODY(
int mfprintf (FILE *stream, int x1, int y1, int z1,...)
int mvfprintf (FILE *stream, int x1, int y1, int z1,...)
size_t slread (int x1, int y1, int z1,...)
size_t mfread (int x1, int y1, int z1,...)
size_t mfwrite (int x1, int y1, int z1,...)
int mfscanf (FILE *stream, int x1, int y1, int z1,...)


Define Documentation

#define __MF_ANZARGS   7
 

Definition at line 612 of file slice_stdio_os1.h.

#define __MFCHECK STREAM   ) 
 

Value:

assert( (nbytes%16)==0 );\
        stream = STREAM;\
        if( ! stream->fd ) {\
                errno = EBADF;\
                return 0;\
        }

Definition at line 635 of file slice_stdio_os1.h.

#define __MFEND
 

Value:

retval = nmemb;\
        where (sys_rval.lo) {\
                stream->err = 1;\
                retval = 0;\
        }\
\
        return retval

Definition at line 661 of file slice_stdio_os1.h.

#define __MFSTART ANZARGS   ) 
 

Value:

int iocnt, retval, nbytes;\
        vector int argcnt, sys_rval;\
        size_t size, nmemb;\
        void *ptr;\
        FILE *stream;\
        va_list ap;\
        int x2 = x1, y2 = y1, z2 = z1;\
\
        va_start( ap, z1 );\
        argcnt = __builtin_argcount();\
        iocnt = argcnt.lo;\
\
        if (iocnt==ANZARGS+3) {\
                x2 = va_arg(ap, int);\
                y2 = va_arg(ap, int);\
                z2 = va_arg(ap, int);\
        }\
        else if (iocnt!=ANZARGS) return 0

Definition at line 615 of file slice_stdio_os1.h.

#define __MIOGET ITS,
CTS,
CTYPE,
STREAM   ) 
 

Definition at line 251 of file slice_stdio_os1.h.

#define __MIOPACKET IOCMD,
IOBS   ) 
 

Value:

asm("\t$io_start\n"\
            "\t\\equl $cmd   "#IOCMD"\n"\
            "\t\\equl $fmt   $SYS_IOFMT_BIN\n"\
            "\t\\equl $sep   $SYS_IOPSEP_NOP\n"\
            "\t\\equl $rdflg $SYS_IORDFLG_NOP\n"\
            "\t\\equl $dev   $SYS_IODEV_MEM\n"\
            "\t\\equl $l     %1>>4\n"\
            "\t\\equl $bs    "#IOBS"\n"\
            "\t$io_fd( 0.%2 )\n"\
            "\t$io_slice(0.%4,0.%5,0.%6,0.%7,0.%8,0.%9)\n"\
            "\t$io_slice_set\n"\
            "\t$io_packet($cmd, <$fmt .or. $sep>, $rdflg, $dev, $l, $bs, 0.%3)\n"\
            "\t$io_end\n"\
            "\tlmtr %0 $MEM_SYS_RVAL\n"\
            : "=r" (sys_rval) : "r" (nbytes), "r" (stream->fd), "r" (ptr),\
               "r" (x1), "r" (y1), "r" (z1), "r" (x2), "r" (y2), "r" (z2) )

Definition at line 643 of file slice_stdio_os1.h.

#define __MIOPUT ITS,
CTS,
CTYPE,
STREAM   ) 
 

Definition at line 53 of file slice_stdio_os1.h.

#define __MIOPUTA ITS,
ITYPE,
CTS,
CTYPE,
BS,
STREAM   ) 
 

Definition at line 152 of file slice_stdio_os1.h.

#define __TMF_ANZARGS   7
 

Definition at line 613 of file slice_stdio_os1.h.

#define _MFIO IOCMD,
STREAM   ) 
 

Value:

__MFSTART(__MF_ANZARGS);\
        ptr = va_arg(ap, void*);\
        size = va_arg(ap, size_t);\
        nmemb = va_arg(ap, size_t);\
        nbytes = size * nmemb;\
        __MFCHECK(STREAM);\
        __MIOPACKET(IOCMD,$SYS_IOBS_V);\
        __MFEND

Definition at line 672 of file slice_stdio_os1.h.

#define _TMFIO IOCMD,
STREAM   ) 
 

Value:

__MFSTART(__TMF_ANZARGS);\
        ptr = va_arg(ap, void*);\
        size = va_arg(ap, size_t);\
        nmemb = 1;\
        nbytes = size * nmemb;\
        __MFCHECK(STREAM);\
        if( (tcode==NLCC_FLOAT) || (tcode==NLCC_DOUBLE) || (tcode==NLCC_INT) || (tcode==NLCC_UNSIGNED) ) {\
                __MIOPACKET(IOCMD,$SYS_IOBS_L);\
        }\
        else if( (tcode==NLCC_COMPLEX) || (tcode==NLCC_VECTOR) || (tcode==NLCC_VFLOAT) || (tcode==NLCC_VINT) || (tcode==NLCC_VUINT) ) {\
                __MIOPACKET(IOCMD,$SYS_IOBS_V);\
        }\
        __MFEND

Definition at line 682 of file slice_stdio_os1.h.

#define BODY args   )     ;
 

Definition at line 702 of file slice_stdio_os1.h.

#define BODY args   )     ;
 

Definition at line 702 of file slice_stdio_os1.h.

#define mprintf ARGS...   )     mfprintf(stdout, ##ARGS)
 

NAME
mfprintf - generates formatted text for multiple nodes
SYNOPSIS
#include <stdio.h>

int mfprintf(int x1, int y1, int z1, [int x2, int y2, int z2,] FILE * stream, const char * format, ...)
int mprintf(int x1, int y1, int z1, [int x2, int y2, int z2,] const char * format, ...)

#include <stdarg.h>

int mvfprintf(FILE * restrict stream, const char * format, va_list ap)
int mvprintf(const char * format, va_list ap)
DESCRIPTION
This function generates a formatted text under the control of the format format and any additional arguments, and writes each generated character to the stream stream or to stdout (in case of mprintf()). The specification of the second coordinate triple is optional. If present, it specifies the 'upper' corner of a slice of nodes. If not present, the first triple specifies coordinates of a single node. For more than one node, the behaviour of these functions is identical to calling the functions for each single node in (z first) sequence if at least one argument is provided after the format specifier.
The function is similar to fprintf() or printf() except that printing strings is not supported.

RETURN VALUE
It returns the number of characters generated or returns a negative value if the function sets the error indicator for the stream.
ERRORS
The global variable errno is set to EINVAL if the number of arguments is not sufficient or of wrong type.

Definition at line 342 of file slice_stdio_os1.h.

#define mscanf ARGS...   )     mfscanf(stdin, ##ARGS)
 

NAME
mfscanf - generates formatted text for multiple nodes
SYNOPSIS
#include <stdio.h>

int mfscanf(int x1, int y1, int z1, [int x2, int y2, int z2,] FILE * stream, const char * format, ...)
int mscanf(int x1, int y1, int z1, [int x2, int y2, int z2,] const char * format, ...)
DESCRIPTION
The behaviour of mfscanf and mscanf is identical to calling the functions for each single node in (z first) sequence if at least one argument is provided after the format specifier.
RETURN VALUE
It returns the number of times conversion succeeded for each node.
ERRORS
The global variable errno is set to EINVAL if the number of arguments is not sufficient or of wrong type.

Definition at line 758 of file slice_stdio_os1.h.

#define mvprintf ARGS...   )     mvfprintf(stdout, ##ARGS)
 

Definition at line 454 of file slice_stdio_os1.h.


Function Documentation

int mfgetdi int  x1,
int  y1,
int  z1,
... 
 

Definition at line 297 of file slice_stdio_os1.h.

References FILE.

int mfgeti int  x1,
int  y1,
int  z1,
... 
 

Definition at line 289 of file slice_stdio_os1.h.

References FILE.

int mfgetx int  x1,
int  y1,
int  z1,
... 
 

Definition at line 293 of file slice_stdio_os1.h.

References FILE.

int mfprintf FILE stream,
int  x1,
int  y1,
int  z1,
... 
 

int mfputd int  x1,
int  y1,
int  z1,
... 
 

Definition at line 121 of file slice_stdio_os1.h.

References FILE.

int mfputda int  x1,
int  y1,
int  z1,
... 
 

Definition at line 212 of file slice_stdio_os1.h.

References FILE.

int mfputh int  x1,
int  y1,
int  z1,
... 
 

Definition at line 137 of file slice_stdio_os1.h.

References FILE.

int mfputhv int  x1,
int  y1,
int  z1,
... 
 

Definition at line 145 of file slice_stdio_os1.h.

References FILE.

int mfputi int  x1,
int  y1,
int  z1,
... 
 

Definition at line 97 of file slice_stdio_os1.h.

References FILE.

int mfputia int  x1,
int  y1,
int  z1,
... 
 

Definition at line 196 of file slice_stdio_os1.h.

References FILE.

int mfputiv int  x1,
int  y1,
int  z1,
... 
 

Definition at line 105 of file slice_stdio_os1.h.

References FILE.

int mfputu int  x1,
int  y1,
int  z1,
... 
 

Definition at line 129 of file slice_stdio_os1.h.

References FILE.

int mfputva int  x1,
int  y1,
int  z1,
... 
 

Definition at line 220 of file slice_stdio_os1.h.

References FILE, and va_arg.

int mfputx int  x1,
int  y1,
int  z1,
... 
 

Definition at line 113 of file slice_stdio_os1.h.

References FILE.

int mfputxa int  x1,
int  y1,
int  z1,
... 
 

Definition at line 204 of file slice_stdio_os1.h.

References FILE, and va_arg.

size_t mfread int  x1,
int  y1,
int  z1,
... 
 

int mfscanf FILE stream,
int  x1,
int  y1,
int  z1,
... 
 

size_t mfwrite int  x1,
int  y1,
int  z1,
... 
 

int mputd int  x1,
int  y1,
int  z1,
... 
 

Definition at line 125 of file slice_stdio_os1.h.

int mputda int  x1,
int  y1,
int  z1,
... 
 

Definition at line 216 of file slice_stdio_os1.h.

int mputh int  x1,
int  y1,
int  z1,
... 
 

Definition at line 141 of file slice_stdio_os1.h.

int mputhv int  x1,
int  y1,
int  z1,
... 
 

Definition at line 149 of file slice_stdio_os1.h.

int mputi int  x1,
int  y1,
int  z1,
... 
 

Definition at line 101 of file slice_stdio_os1.h.

int mputia int  x1,
int  y1,
int  z1,
... 
 

Definition at line 200 of file slice_stdio_os1.h.

int mputiv int  x1,
int  y1,
int  z1,
... 
 

Definition at line 109 of file slice_stdio_os1.h.

int mputu int  x1,
int  y1,
int  z1,
... 
 

Definition at line 133 of file slice_stdio_os1.h.

int mputva int  x1,
int  y1,
int  z1,
... 
 

Definition at line 224 of file slice_stdio_os1.h.

int mputx int  x1,
int  y1,
int  z1,
... 
 

Definition at line 117 of file slice_stdio_os1.h.

int mputxa int  x1,
int  y1,
int  z1,
... 
 

Definition at line 208 of file slice_stdio_os1.h.

int mvfprintf FILE stream,
int  x1,
int  y1,
int  z1,
... 
 

size_t slread int  x1,
int  y1,
int  z1,
... 
 


Generated on Mon Feb 20 15:54:37 2006 for nlibc by doxygen 1.3.5