]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/dummytest.c
Rename some BUF_xxx to OPENSSL_xxx
[thirdparty/openssl.git] / test / dummytest.c
CommitLineData
1cc67fa8
RL
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <ctype.h>
a3654f05 5#include <openssl/crypto.h>
1cc67fa8
RL
6#include <openssl/e_os2.h>
7#include <openssl/buffer.h>
1cc67fa8
RL
8
9int main(int argc, char *argv[])
0f113f3e
MC
10{
11 char *p, *q = 0, *program;
1cc67fa8 12
0f113f3e
MC
13 p = strrchr(argv[0], '/');
14 if (!p)
15 p = strrchr(argv[0], '\\');
1cc67fa8 16#ifdef OPENSSL_SYS_VMS
0f113f3e
MC
17 if (!p)
18 p = strrchr(argv[0], ']');
19 if (p)
20 q = strrchr(p, '>');
21 if (q)
22 p = q;
23 if (!p)
24 p = strrchr(argv[0], ':');
25 q = 0;
1cc67fa8 26#endif
0f113f3e
MC
27 if (p)
28 p++;
29 if (!p)
30 p = argv[0];
31 if (p)
32 q = strchr(p, '.');
33 if (p && !q)
34 q = p + strlen(p);
1cc67fa8 35
0f113f3e 36 if (!p)
7644a9ae 37 program = OPENSSL_strdup("(unknown)");
0f113f3e
MC
38 else {
39 program = OPENSSL_malloc((q - p) + 1);
40 strncpy(program, p, q - p);
41 program[q - p] = '\0';
42 }
1cc67fa8 43
0f113f3e
MC
44 for (p = program; *p; p++)
45 if (islower((unsigned char)(*p)))
46 *p = toupper((unsigned char)(*p));
1cc67fa8 47
0f113f3e
MC
48 q = strstr(program, "TEST");
49 if (q > p && q[-1] == '_')
50 q--;
51 *q = '\0';
1cc67fa8 52
0f113f3e 53 printf("No %s support\n", program);
1cc67fa8 54
0f113f3e
MC
55 OPENSSL_free(program);
56 return (0);
57}