javar/jdk8-analysis/src/launcher/version_comp.c
/*
 *      Validates a version string by the extended JSR 56 grammar.
 */
Validates a version string by the extended JSR 56 grammar.
Validates a version string by the extended JSR 56 grammar .
int
JLI_ValidVersionString(char *version_string)
{
    char        *vs;
    char        *m1;
    char        *end;
    if ((version_string == NULL) || (JLI_StrLen(version_string) == 0))
        return (0);
    m1 = vs = JLI_StringDup(version_string);
    do {
        if ((end = JLI_StrChr(vs, ' ')) != NULL)
            *end = '\0';
        if (!valid_element(vs)) {
            JLI_MemFree(m1);
            return (0);
        }
        if (end != NULL)
            vs = end + 1;
    } while (end != NULL);
    JLI_MemFree(m1);
    return (1);
}
int JLI_ValidVersionString ( char * version_string ) { char * vs ; char * m1 ; char * end ; if ( ( version_string == NULL ) || ( JLI_StrLen ( version_string ) == 0 ) ) return ( 0 ) ; m1 = vs = JLI_StringDup ( version_string ) ; do { if ( ( end = JLI_StrChr ( vs , ' ' ) ) != NULL ) * end = ' \0 ' ; if ( ! valid_element ( vs ) ) { JLI_MemFree ( m1 ) ; return ( 0 ) ; } if ( end != NULL ) vs = end + 1 ; } while ( end != NULL ) ; JLI_MemFree ( m1 ) ; return ( 1 ) ; }
Validates a version string by the extended JSR 56 grammar.
Validates a version string by the extended JSR 56 grammar .