VA_ARG(P) POSIX Programmer's Manual VA_ARG(P)
NAME
va_arg, va_copy, va_end, va_start - handle variable argument list
SYNOPSIS
#include <stdarg.h>
type va_arg(va_list ap, type);
void va_copy(va_list dest, va_list src);
void va_end(va_list ap);
void va_start(va_list ap, argN);
DESCRIPTION
Refer to the Base Definitions volume of IEEE Std 1003.1-2001, <stdarg.h>.
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE /The Open Group 2003 VA_ARG(P)
Check Out this Related Man Page
VFPRINTF(P) POSIX Programmer's Manual VFPRINTF(P)
NAME
vfprintf, vprintf, vsnprintf, vsprintf - format output of a stdarg argument list
SYNOPSIS
#include <stdarg.h>
#include <stdio.h>
int vfprintf(FILE *restrict stream, const char *restrict format,
va_list ap);
int vprintf(const char *restrict format, va_list ap);
int vsnprintf(char *restrict s, size_t n, const char *restrict format,
va_list ap);
int vsprintf(char *restrict s, const char *restrict format, va_list ap);
DESCRIPTION
The vprintf(), vfprintf(), vsnprintf(), and vsprintf() functions shall be equivalent to printf(), fprintf(), snprintf(), and sprintf()
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>.
These functions shall not invoke the va_end macro. As these functions invoke the va_arg macro, the value of ap after the return is unspeci-
fied.
RETURN VALUE
Refer to fprintf() .
ERRORS
Refer to fprintf() .
The following sections are informative.
EXAMPLES
None.
APPLICATION USAGE
Applications using these functions should call va_end(ap) afterwards to clean up.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
fprintf() , the Base Definitions volume of IEEE Std 1003.1-2001, <stdarg.h>, <stdio.h>
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE /The Open Group 2003 VFPRINTF(P)
In this piece i implemented the gossip method. The first thread is invoked from inside the (msg is first sent from node -1 to 0 from main()) and the other threads are invoked from inside of the thread function itself. I used two mutexes and a condition variable to control the synchronization. ... (4 Replies)
I have put some yellow color codes and works well.
I call the funstion using
print_usage(stderr, 0);
I would like to know if there is any way, to store the ansi color codes in variables and then call them inside fprintf.
Or have a format followed by the strings I want to output.
... (5 Replies)
Hi friends,
Working on a linux X86-64 bit system, I suddenly started getting this error (mentioned in subject) from various scripts.
I googled, found that there are couple of reason which causes this issue.
- less memory
I am pretty sure, memory seems to be stable on my system and at the... (15 Replies)
Hi.
The problem is to write logs in a shared file from several processes.
The cooperate call of fprintf() leads to messing the content even in one call
example:
fprintf(f,"a1 \n a2");
fprintf(f,"a3 \n a4");
out:
a1
a3
a2
a4
Ofcourse this is possible to implement the file as a... (9 Replies)
Hi,
I haven't programed in C in a few years. I have been doing a lot of shell scripting, I.E. not really programming anything heavy. :o
That said, I have a script that gives hourly usage statistics for our email server. It runs w-a-y to slow as a script for my impatience, and needs to... (7 Replies)
Hi
I want to create a script to be able to check if a process is running and act on it. Essentially I want to:
Check acc process status /opt/ca/APMCommandCenterController./apmccctrl.sh status
If process found not to be running
Execute start command... (6 Replies)
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Been a while since my last post. Had a laptop die with my last project and still working to get it back. In the meantime I started another.
In my main function I define some arguments with getopt:
int main ( int argc, char **argv) {
int option_index = 0;
char *fname = "./commands";
... (3 Replies)
I am trying to illustrate the reverse order of parameters on the stack when passed to a function in C:
#include <stdio.h>
void p(int p1, int p2, double p3)
{
printf("params:\n"
"1) %p offset = %li\n"
"2) %p offset = %li\n"
... (5 Replies)