openssl.c (302408) | openssl.c (331638) |
---|---|
1/* apps/openssl.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 337 unchanged lines hidden (view full) --- 346 NCONF_free(config); 347 exit(1); 348 } 349 } 350 351 prog = prog_init(); 352 353 /* first check the program name */ | 1/* apps/openssl.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 337 unchanged lines hidden (view full) --- 346 NCONF_free(config); 347 exit(1); 348 } 349 } 350 351 prog = prog_init(); 352 353 /* first check the program name */ |
354 program_name(Argv[0], pname, sizeof pname); | 354 program_name(Argv[0], pname, sizeof(pname)); |
355 356 f.name = pname; 357 fp = lh_FUNCTION_retrieve(prog, &f); 358 if (fp != NULL) { 359 Argv[0] = pname; 360 ret = fp->func(Argc, Argv); 361 goto end; 362 } --- 11 unchanged lines hidden (view full) --- 374 goto end; 375 } 376 377 /* ok, lets enter the old 'OpenSSL>' mode */ 378 379 for (;;) { 380 ret = 0; 381 p = buf; | 355 356 f.name = pname; 357 fp = lh_FUNCTION_retrieve(prog, &f); 358 if (fp != NULL) { 359 Argv[0] = pname; 360 ret = fp->func(Argc, Argv); 361 goto end; 362 } --- 11 unchanged lines hidden (view full) --- 374 goto end; 375 } 376 377 /* ok, lets enter the old 'OpenSSL>' mode */ 378 379 for (;;) { 380 ret = 0; 381 p = buf; |
382 n = sizeof buf; | 382 n = sizeof(buf); |
383 i = 0; 384 for (;;) { 385 p[0] = '\0'; 386 if (i++) 387 prompt = ">"; 388 else 389 prompt = "OpenSSL> "; 390 fputs(prompt, stdout); --- 289 unchanged lines hidden (view full) --- 680static LHASH_OF(FUNCTION) *prog_init(void) 681{ 682 LHASH_OF(FUNCTION) *ret; 683 FUNCTION *f; 684 size_t i; 685 686 /* Purely so it looks nice when the user hits ? */ 687 for (i = 0, f = functions; f->name != NULL; ++f, ++i) ; | 383 i = 0; 384 for (;;) { 385 p[0] = '\0'; 386 if (i++) 387 prompt = ">"; 388 else 389 prompt = "OpenSSL> "; 390 fputs(prompt, stdout); --- 289 unchanged lines hidden (view full) --- 680static LHASH_OF(FUNCTION) *prog_init(void) 681{ 682 LHASH_OF(FUNCTION) *ret; 683 FUNCTION *f; 684 size_t i; 685 686 /* Purely so it looks nice when the user hits ? */ 687 for (i = 0, f = functions; f->name != NULL; ++f, ++i) ; |
688 qsort(functions, i, sizeof *functions, SortFnByName); | 688 qsort(functions, i, sizeof(*functions), SortFnByName); |
689 690 if ((ret = lh_FUNCTION_new()) == NULL) 691 return (NULL); 692 693 for (f = functions; f->name != NULL; f++) 694 (void)lh_FUNCTION_insert(ret, f); 695 return (ret); 696} | 689 690 if ((ret = lh_FUNCTION_new()) == NULL) 691 return (NULL); 692 693 for (f = functions; f->name != NULL; f++) 694 (void)lh_FUNCTION_insert(ret, f); 695 return (ret); 696} |