Lines Matching defs:Argv
139 static int do_cmd(LHASH_OF(FUNCTION) *prog,int argc,char *argv[]);
216 # define ARGV _Argv
218 # define ARGV Argv
221 int main(int Argc, char *ARGV[])
232 char **argv,*p;
239 * we bypass this mess, as on non-VMS systems. (See ARGV,
242 * pointers for argv[].
243 * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
245 * duplicate of argv[].
247 * to NULL-terminate a 64-bit argv[]. (As this was written, the
250 * 64-bit argv[argc] for NULL, and, if necessary, use a
251 * (properly) NULL-terminated (64-bit) duplicate of argv[].
252 * The same code is used in either case to duplicate argv[].
257 char **Argv = NULL;
260 if ((sizeof( _Argv) < 8) /* 32-bit argv[]. */
262 || (_Argv[ Argc] != NULL) /* Untrusted argv[argc] not NULL. */
267 Argv = OPENSSL_malloc( (Argc+ 1)* sizeof( char *));
268 if (Argv == NULL)
271 Argv[i] = _Argv[i];
272 Argv[ Argc] = NULL; /* Certain NULL termination. */
277 /* Use the known-good 32-bit argv[] (which needs the
279 * tested-good 64-bit argv[] as-is. */
280 Argv = (char **)_Argv;
350 program_name(Argv[0],pname,sizeof pname);
356 Argv[0]=pname;
357 ret=fp->func(Argc,Argv);
366 Argv++;
367 ret=do_cmd(prog,Argc,Argv);
398 if (!chopup_args(&arg,buf,&argc,&argv)) break;
400 ret=do_cmd(prog,argc,argv);
407 BIO_printf(bio_err,"error in %s\n",argv[0]);
432 /* Free any duplicate Argv[] storage. */
435 OPENSSL_free(Argv);
449 static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[])
454 if ((argc <= 0) || (argv[0] == NULL))
456 f.name=argv[0];
460 if (EVP_get_digestbyname(argv[0]))
466 else if (EVP_get_cipherbyname(argv[0]))
475 ret=fp->func(argc,argv);
477 else if ((strncmp(argv[0],"no-",3)) == 0)
486 f.name=argv[0]+3;
489 BIO_printf(bio_stdout, "%s\n", argv[0]);
491 BIO_printf(bio_stdout, "%s\n", argv[0]+3);
495 else if ((strcmp(argv[0],"quit") == 0) ||
496 (strcmp(argv[0],"q") == 0) ||
497 (strcmp(argv[0],"exit") == 0) ||
498 (strcmp(argv[0],"bye") == 0))
503 else if ((strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0) ||
504 (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0) ||
505 (strcmp(argv[0],LIST_MESSAGE_DIGEST_ALGORITHMS) == 0) ||
506 (strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0) ||
507 (strcmp(argv[0],LIST_CIPHER_ALGORITHMS) == 0) ||
508 (strcmp(argv[0],LIST_PUBLIC_KEY_ALGORITHMS) == 0))
513 if (strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0)
515 else if (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0)
517 else if (strcmp(argv[0],LIST_MESSAGE_DIGEST_ALGORITHMS) == 0)
519 else if (strcmp(argv[0],LIST_PUBLIC_KEY_ALGORITHMS) == 0)
521 else if (strcmp(argv[0],LIST_CIPHER_ALGORITHMS) == 0)
523 else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */
556 argv[0]);