Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vswprintf(3S) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought



vfwprintf(3S)                  DG/UX R4.11MU05                 vfwprintf(3S)


NAME
       vfwprintf, vwprintf, vswprintf - print formatted wide character
       output of a variable argument list

SYNOPSIS
       #include <stdarg.h>
       #include <stdio.h>
       #include <wchar.h>
       int vfwprintf(FILE *stream, const wchart *format, valist arg);
       int vwprintf(const wchart *format, valist arg);
       int vswprintf(wchart s, sizet n, const wchart *format,valist arg);

DESCRIPTION
       vfwprintf is equivalent to fwprintf, with the variable argument list
       replaced by an arg that has been initialized by the vastart macro.

       vwprintf is equivalent to wprintf, with the variable argument list
       replaced by an arg that has been initialized by the vastart macro.

       vswprintf is equivalent to swprintf, with the variable argument list
       replaced by an arg that has been initialized by the vastart macro.
       If copying takes place between objects that overlap, the behavior is
       undefined.

       None of these functions invoke vaend or the passed arg.

   Errors
       vfwprintf and vwprintf return the number of wide characters
       transmitted or return a negative value if an error was encountered.
       vswprintf returns the number of wide characters written in the array,
       not counting the terminating null wide character, or returns a
       negative value if n or more wide character are requested to be
       generated.

USAGE
       The following example shows the use of the vfwprintf function in a
       general error reporting routine:

              #include <stdarg.h>
              #include <stdio.h>
              #include <wchar.h>

              void error(wchart *functionname, wchart *format,...)
              {
                valist args;
                vastart(args, format);
                fwprintf(stderr, L"ERROR in %s: ", functionname);
                vfwprintf(stderr, format, args);
                vaend(args);
              }

REFERENCES
       printf(3S), fwprintf(3S), scanf(3S), setlocale(3C), stdio(3S),
       write(2)


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026