Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 3f1b2c1
  • /
  • dummytest.c
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:554acc221ffcd7ed667a5fb5a0386c5bbf5fcf57
directory badge Iframe embedding
swh:1:dir:3f1b2c1654064c3ad786b524746efdf699199396
dummytest.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <openssl/e_os2.h>
#include <openssl/buffer.h>
#include <openssl/crypto.h>

int main(int argc, char *argv[])
{
    char *p, *q = 0, *program;

    p = strrchr(argv[0], '/');
    if (!p)
        p = strrchr(argv[0], '\\');
#ifdef OPENSSL_SYS_VMS
    if (!p)
        p = strrchr(argv[0], ']');
    if (p)
        q = strrchr(p, '>');
    if (q)
        p = q;
    if (!p)
        p = strrchr(argv[0], ':');
    q = 0;
#endif
    if (p)
        p++;
    if (!p)
        p = argv[0];
    if (p)
        q = strchr(p, '.');
    if (p && !q)
        q = p + strlen(p);

    if (!p)
        program = BUF_strdup("(unknown)");
    else {
        program = OPENSSL_malloc((q - p) + 1);
        strncpy(program, p, q - p);
        program[q - p] = '\0';
    }

    for (p = program; *p; p++)
        if (islower((unsigned char)(*p)))
            *p = toupper((unsigned char)(*p));

    q = strstr(program, "TEST");
    if (q > p && q[-1] == '_')
        q--;
    *q = '\0';

    printf("No %s support\n", program);

    OPENSSL_free(program);
    return (0);
}

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top