Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
vercheck.c File Reference
#include "prinit.h"
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main ()
 main()

Variables

static char * compatible_version []
static char * incompatible_version []

Function Documentation

int main ( void  )

main()

Definition at line 84 of file vercheck.c.

{
    int idx;
    int num_compatible = sizeof(compatible_version) / sizeof(char *);
    int num_incompatible = sizeof(incompatible_version) / sizeof(char *);

    printf("NSPR release %s:\n", PR_VERSION);
    for (idx = 0; idx < num_compatible; idx++) {
        if (PR_VersionCheck(compatible_version[idx]) == PR_FALSE) {
            fprintf(stderr, "Should be compatible with version %s\n",
                    compatible_version[idx]);
            exit(1);
        }
        printf("Compatible with version %s\n", compatible_version[idx]);
    }

    for (idx = 0; idx < num_incompatible; idx++) {
        if (PR_VersionCheck(incompatible_version[idx]) == PR_TRUE) {
            fprintf(stderr, "Should be incompatible with version %s\n",
                    incompatible_version[idx]);
            exit(1);
        }
        printf("Incompatible with version %s\n", incompatible_version[idx]);
    }

    printf("PASS\n");
    return 0;
}

Here is the call graph for this function:


Variable Documentation

char* compatible_version[] [static]
Initial value:
 {
    "4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3",
    "4.2", "4.2.1", "4.2.2", "4.3", "4.4", "4.4.1",
    "4.5", "4.5.1", "4.6", "4.6.1", "4.6.2", "4.6.3",
    "4.6.4", "4.6.5", "4.6.6", "4.6.7", PR_VERSION
}

Definition at line 60 of file vercheck.c.

char* incompatible_version[] [static]
Initial value:
 {
    "2.1 19980529",
    "3.0", "3.0.1",
    "3.1", "3.1.1", "3.1.2", "3.1.3",
    "3.5", "3.5.1",
    "4.6.99",
    "4.7", "4.7.1",
    "10.0", "11.1", "12.14.20"
}

Definition at line 74 of file vercheck.c.