5 #include <openssl/e_os2.h>
6 #include <openssl/buffer.h>
7 #include <openssl/crypto.h>
9 int main(int argc
, char *argv
[])
11 char *p
, *q
= 0, *program
;
13 p
= strrchr(argv
[0], '/');
14 if (!p
) p
= strrchr(argv
[0], '\\');
15 #ifdef OPENSSL_SYS_VMS
16 if (!p
) p
= strrchr(argv
[0], ']');
17 if (p
) q
= strrchr(p
, '>');
19 if (!p
) p
= strrchr(argv
[0], ':');
24 if (p
) q
= strchr(p
, '.');
25 if (p
&& !q
) q
= p
+ strlen(p
);
28 program
= BUF_strdup("(unknown)");
31 program
= OPENSSL_malloc((q
- p
) + 1);
32 strncpy(program
, p
, q
- p
);
33 program
[q
- p
] = '\0';
36 for(p
= program
; *p
; p
++)
37 if (islower((unsigned char)(*p
)))
38 *p
= toupper((unsigned char)(*p
));
40 q
= strstr(program
, "TEST");
41 if (q
> p
&& q
[-1] == '_') q
--;
44 printf("No %s support\n", program
);
46 OPENSSL_free(program
);