diff options
author | Paweł Kołodziejski | 2009-02-21 12:43:37 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2009-02-21 12:43:37 +0000 |
commit | d11948a01cc234c84f122f7c9febc69b39a00d8f (patch) | |
tree | 8440bfe42996fa7671652dba96176d2cf6b623b8 /engines/sci/scicore | |
parent | c0b2ec8dd2ef2585e4d1c1df759a92e709b453df (diff) | |
download | scummvm-rg350-d11948a01cc234c84f122f7c9febc69b39a00d8f.tar.gz scummvm-rg350-d11948a01cc234c84f122f7c9febc69b39a00d8f.tar.bz2 scummvm-rg350-d11948a01cc234c84f122f7c9febc69b39a00d8f.zip |
formating
svn-id: r38693
Diffstat (limited to 'engines/sci/scicore')
-rw-r--r-- | engines/sci/scicore/versions.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/engines/sci/scicore/versions.cpp b/engines/sci/scicore/versions.cpp index d956c56a54..8706a5d54b 100644 --- a/engines/sci/scicore/versions.cpp +++ b/engines/sci/scicore/versions.cpp @@ -34,14 +34,12 @@ namespace Sci { -void -version_require_earlier_than(EngineState *s, sci_version_t version) { +void version_require_earlier_than(EngineState *s, sci_version_t version) { if (s->version_lock_flag) return; if (version <= s->min_version) { - sciprintf("Version autodetect conflict: Less than %d.%03d.%03d was requested, but " - "%d.%03d.%03d is the current minimum\n", + sciprintf("Version autodetect conflict: Less than %d.%03d.%03d was requested, but %d.%03d.%03d is the current minimum\n", SCI_VERSION_MAJOR(version), SCI_VERSION_MINOR(version), SCI_VERSION_PATCHLEVEL(version), SCI_VERSION_MAJOR(s->min_version), SCI_VERSION_MINOR(s->min_version), SCI_VERSION_PATCHLEVEL(s->min_version)); @@ -53,8 +51,7 @@ version_require_earlier_than(EngineState *s, sci_version_t version) { } } -void -version_require_later_than(EngineState *s, sci_version_t version) { +void version_require_later_than(EngineState *s, sci_version_t version) { if (s->version_lock_flag) return; @@ -72,20 +69,19 @@ version_require_later_than(EngineState *s, sci_version_t version) { } } -int -version_parse(const char *vn, sci_version_t *result) { +int version_parse(const char *vn, sci_version_t *result) { char *endptr[3]; int major = strtol(vn, &endptr[0], 10); int minor = strtol(vn + 2, &endptr[1], 10); int patchlevel = strtol(vn + 6, &endptr[2], 10); - if (endptr[0] != vn + 1 || endptr[1] != vn + 5 - || *endptr[2] != '\0') { + if (endptr[0] != vn + 1 || endptr[1] != vn + 5 || *endptr[2] != '\0') { sciprintf("Warning: Failed to parse version string '%s'\n", vn); return 1; } *result = SCI_VERSION(major, minor, patchlevel); + return 0; } |