Sending commands

The following example illustrates how you set up arguments and execute the p4 fstat command on a file named Jam.html.

char file[] = "Jam.html";
char *filep = &file[0];
client.SetArgv( 1, &filep );
client.Run( "fstat", &ui );

For commands with more arguments, use an approach like the following:

char    *argv[] = { "-C", "-l", 0, 0 };
int     argc    = 2;
char    *file   = "Jam.html";
argv[ argc++ ]  = file;
client.SetArgv( argc, argv );
client.Run( "fstat", &ui );