Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

va_start(9f) [posix man page]

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

VFWSCANF(P)						     POSIX Programmer's Manual						       VFWSCANF(P)

NAME
vfwscanf, vswscanf, vwscanf - wide-character formatted input of a stdarg argument list SYNOPSIS
#include <stdarg.h> #include <stdio.h> #include <wchar.h> int vfwscanf(FILE *restrict stream, const wchar_t *restrict format, va_list arg); int vswscanf(const wchar_t *restrict ws, const wchar_t *restrict format, va_list arg); int vwscanf(const wchar_t *restrict format, va_list arg); DESCRIPTION
The vfwscanf(), vswscanf(), and vwscanf() functions shall be equivalent to the fwscanf(), swscanf(), and wscanf() functions, respectively, except that instead of being called with a variable number of arguments, they are called with an argument list as defined in the <stdarg.h> header. 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 unspecified. RETURN VALUE
Refer to fwscanf() . ERRORS
Refer to fwscanf() . 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
fwscanf() , the Base Definitions volume of IEEE Std 1003.1-2001, <stdarg.h>, <stdio.h>, <wchar.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 VFWSCANF(P)
Man Page

10 More Discussions You Might Find Interesting

1. Programming

Multi-threading

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)
Discussion started by: saman_glorious
4 Replies

2. Programming

Using ANSI color codes in gcc compiled program

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)
Discussion started by: kristinu
5 Replies

3. Shell Programming and Scripting

Fork: Resource temporarily unavailable

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)
Discussion started by: clx
15 Replies

4. Programming

Logging in shared file

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)
Discussion started by: z7ql
9 Replies

5. Programming

Passing printf formatting parameters as variables

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)
Discussion started by: mph
7 Replies

6. Shell Programming and Scripting

Script to start process

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)
Discussion started by: simpsa27
6 Replies

7. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

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)
Discussion started by: siegfried
3 Replies

8. Programming

Combine GetOpt And Variadic Function In C

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)
Discussion started by: Azrael
3 Replies

9. UNIX for Beginners Questions & Answers

Where can I find the program that runs the -wc command?

Hey guys, I was wondering. When I enter a command in the terminal -wcl for a word count, where is that program located in the kernel? (7 Replies)
Discussion started by: Circuits
7 Replies

10. Programming

Parameters placement on stack in C

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)
Discussion started by: migurus
5 Replies