dummytest.c 955 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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) p = strrchr(argv[0], '\\');
  13. #ifdef OPENSSL_SYS_VMS
  14. if (!p) p = strrchr(argv[0], ']');
  15. if (p) q = strrchr(p, '>');
  16. if (q) p = q;
  17. if (!p) p = strrchr(argv[0], ':');
  18. q = 0;
  19. #endif
  20. if (p) p++;
  21. if (!p) p = argv[0];
  22. if (p) q = strchr(p, '.');
  23. if (p && !q) q = p + strlen(p);
  24. if (!p)
  25. program = BUF_strdup("(unknown)");
  26. else
  27. {
  28. program = OPENSSL_malloc((q - p) + 1);
  29. strncpy(program, p, q - p);
  30. program[q - p] = '\0';
  31. }
  32. for(p = program; *p; p++)
  33. if (islower((unsigned char)(*p)))
  34. *p = toupper((unsigned char)(*p));
  35. q = strstr(program, "TEST");
  36. if (q > p && q[-1] == '_') q--;
  37. *q = '\0';
  38. printf("No %s support\n", program);
  39. OPENSSL_free(program);
  40. return(0);
  41. }