Unison Help
- Unison Kernel
- Pthreads
- pthread_create()
- pthread_exit()
- pthread_self()
- pthread_equal()
- pthread_join()
- pthread_detach()
- pthread_setschedparam()
- pthread_getschedparam()
- pthread_attr_init()
- pthread_attr_destroy()
- pthread_attr_setstackaddr()
- pthread_attr_getstackaddr()
- pthread_attr_setstacksize()
- pthread_attr_getstacksize()
- pthread_attr_setschedparam()
- pthread_attr_getschedparam()
- pthread_attr_setdetachstate()
- pthread_attr_getdetachstate()
- pthread_stackinfo()
- pthread_setprio()
- pthread_getprio()
- sched_get_priority_max()
- sched_get_priority_min()
- sched_yield()
- Pthread Cancellation
- Mutex
- Semaphores
- Message Queues
- Conditional Variables
- Barriers
- Timers
- Clocks
- Memory Allocation
- Rendezvous
- Interrupts
- Directory Services
- Miscellaneous
- Pthreads
- Unison I/O Library
- Unison STDIO Library
- STDIO Library Calls
- clearerr()
- dprintf()
- fclose()
- fdopen()
- feof()
- ferror()
- fileno()
- fflush()
- fgetc()
- fgetpos()
- fgets()
- fopen()
- fprintf()
- fputc()
- fputs()
- fread()
- freopen()
- fscanf()
- fseek()
- fseeko()
- fsetpos()
- ftell()
- ftello()
- fwrite()
- getc()
- getc_unlocked()
- getchar()
- getchar_unlocked()
- getdelim()
- getline()
- gets()
- get_stderr_ptr()
- get_stdin_ptr()
- get_stdout_ptr()
- noperprintf()
- perprintf()
- perror()
- posix_compat()
- printf()
- putc()
- putc_unlocked()
- putchar()
- putchar_unlocked()
- puts()
- remove()
- rewind()
- scanf()
- setbuf()
- setvbuf()
- snprintf()
- sprintf()
- sscanf()
- stderr_init()
- stderr_close()
- stdin_init()
- stdin_close()
- stdout_init()
- stdout_close()
- vdprintf()
- vscanf()
- vsscanf()
- vfscanf()
- vprintf()
- vsnprintf()
- vsprintf()
- vfprintf()
- ungetc()
- Do-nothing Stubs
- STDIO Library Calls
- Unison LIBC Library
- Unison I/O Servers
- Graphics, Camera, Video, Audio
- Network Protocols
- TCP and UDP Server - tcpd
- DHCP Client Service - dhcp client
- DHCP Server - dhcpd
- Telnet Server - telnetd
- Tiny FTP Server - tftpd
- Point to Point - pppd
- Network Translation - NAT with PAT
- Firewall
- Tiny HTTP Server - thttpd
- Tiny HTTP Server with TLS
- POP3 Server
- Simple Mail Transfer Protocol Services (SMTP)
- Bootp Protocol
- File Transfer Protocol Server (FTP)
- File Transfer Client Services
- RPC / XDR
- DNS Client
- HTTP/HTTPS Client
- REST Client
- AutoIP Service - autoip client
- mDNS server - mdnsd
- SNTP Client
- SNMP Agent - Snmpd server
- SSL/TLS library
- SSH server
- IP security
- Power Control
- Serial I/O
- System Services
- Universal Serial Bus (USB)
- Wireless
- Remedy Tools for Unison
3.1.66.vfprintf() #
NAME
vprintf, vfprintf, vsprintf, vsnprintf – print formatted output
SYNOPSIS
#include <stdio.h>
- int vprintf (const char *format, __va_list);
- int vfprintf (FILE *stream, const char *format, __va_list);
- int vdprintf (int fildes, const char *format, __va_list);
- int vsprintf (char *s, const char *format, __va_list);
- int vsnprintf (char *s, size_t n, const char *format, __va_list);
DESCRIPTION
The vprintf(), vfprintf(), vdprintf(), vsprintf() and vsnprintf() functions are equivalent to printf(), fprintf(), dprintf() sprintf() and snprintf() respectively, except that instead of being called with a variable number of arguments, they are called with an argument list as defined by <stdarg.h>.
vprintf() places output on the standard output stream stdout .
vfprintf() places output on stream.
vdprintf() is equivalent to the vfprintf() function, except that vdprintf() write output to the file associated with the file descriptor specified by the fildes argument rather than place output on a stream.
vsprintf() places output, followed by the null character (0), in consecutive bytes starting at s. It is the user’s responsibility to ensure that enough storage is available.
vsnprintf() is equivalent to vsprintf(), with the addition of the n argument which states the size of the buffer referred to by s. If n is zero, nothing shall be written and s may be a null pointer. Otherwise, output bytes beyond the n-1st are discarded instead of being written to the array, and a null byte is written at the end of the bytes actually written into the array.
Each function returns the number of characters transmitted (not including the 0 in the case of vsprintf() and vsnprintf()) ) or a negative value if an output error was encountered.
Characters generated by vprintf() and vfprintf() are printed as if the fputc() routine had been called.
RETURN VALUES
Refer to fprintf().
ERRORS
Refer to fprintf().
EXAMPLES
#include <stdio.h>
#include <stdarg.h>
void
print_message(
char
*format, ...)
{
va_list ptr;
va_start(ptr, format);
vprintf(format, ptr);
va_end(ptr);
}
int
main(
void
)
{
print_message("Cannot open file %s.", "test");
return
0;
}