dummytest.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5. #include <openssl/e_os2.h>
  6. #include <openssl/buffer.h>
  7. #include <openssl/crypto.h>
  8. int main(int argc, char *argv[])
  9. {
  10. char *p, *q = 0, *program;
  11. p = strrchr(argv[0], '/');
  12. if (!p)
  13. p = strrchr(argv[0], '\\');
  14. #ifdef OPENSSL_SYS_VMS
  15. if (!p)
  16. p = strrchr(argv[0], ']');
  17. if (p)
  18. q = strrchr(p, '>');
  19. if (q)
  20. p = q;
  21. if (!p)
  22. p = strrchr(argv[0], ':');
  23. q = 0;
  24. #endif
  25. if (p)
  26. p++;
  27. if (!p)
  28. p = argv[0];
  29. if (p)
  30. q = strchr(p, '.');
  31. if (p && !q)
  32. q = p + strlen(p);
  33. if (!p)
  34. program = BUF_strdup("(unknown)");
  35. else {
  36. program = OPENSSL_malloc((q - p) + 1);
  37. strncpy(program, p, q - p);
  38. program[q - p] = '\0';
  39. }
  40. for (p = program; *p; p++)
  41. if (islower((unsigned char)(*p)))
  42. *p = toupper((unsigned char)(*p));
  43. q = strstr(program, "TEST");
  44. if (q > p && q[-1] == '_')
  45. q--;
  46. *q = '\0';
  47. printf("No %s support\n", program);
  48. OPENSSL_free(program);
  49. return (0);
  50. }