This code is just a sample code that I have written to illustrate the problem. I need to
convert the command line arguments into a va_list. I tried using "ap =argv;".
But this is not allowed on ppc. So I am using "va_copy" to copy the contents of
argv into ap. This is the main purpose. However when I use ap with vsprintf, the
application is crashing.
Marcus Meissner <meissner(a)suse.de> wrote: On Mon, Oct 30, 2006 at 01:24:35AM -0800,
appy 80 wrote:
The following program crashes on suse-ppc. I am trying to copy the command line
parameters to a string buffer. I tried this on suse i386 and its working fine. Its
crashing on suse-ppc.
main(int argc, char *argv)
//ap = argv; //works fine on i386
va_copy(ap,argv); // cant use ap = argv on ppc. Need to use va_copy
vsprintf(Buffer,"Command Line arguments: %s\n",ap);
Please help me in resolving this.
The argv array is not a variable argument list.
You will have to use a for(i=1;i
Want to start your own business? Learn how on Yahoo! Small Business.