Changeset 317 for branches/branch-1-0/src/helpers/dosh.c
- Timestamp:
- May 31, 2006, 12:03:38 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1-0/src/helpers/dosh.c
r311 r317 30 30 31 31 /* 32 * This file Copyright (C) 1997-200 0Ulrich Mller.32 * This file Copyright (C) 1997-2006 Ulrich Mller. 33 33 * This file is part of the "XWorkplace helpers" source package. 34 34 * This is free software; you can redistribute it and/or modify … … 233 233 234 234 return brc; 235 }236 237 /*238 *@@ doshIsWarp4:239 * checks the OS/2 system version number.240 *241 * Returns:242 *243 * -- 0 (FALSE): OS/2 2.x or Warp 3 is running.244 *245 * -- 1: Warp 4.0 is running.246 *247 * -- 2: Warp 4.5 is running (WSeB or Warp 4 FP 13+ or eCS248 * or ACP/MCP), or even something newer.249 *250 *@@changed V0.9.2 (2000-03-05) [umoeller]: reported TRUE on Warp 3 also; fixed251 *@@changed V0.9.6 (2000-10-16) [umoeller]: patched for speed252 *@@changed V0.9.9 (2001-04-04) [umoeller]: now returning 2 for Warp 4.5 and above253 */254 255 ULONG doshIsWarp4(VOID)256 {257 static BOOL s_fQueried = FALSE;258 static ULONG s_ulrc = 0;259 260 if (!s_fQueried)261 {262 // first call:263 ULONG aulBuf[3];264 265 DosQuerySysInfo(QSV_VERSION_MAJOR, // 11266 QSV_VERSION_MINOR, // 12267 &aulBuf, sizeof(aulBuf));268 // Warp 3 is reported as 20.30269 // Warp 4 is reported as 20.40270 // Aurora is reported as 20.45 (regardless of convenience packs)271 272 if ( (aulBuf[0] > 20) // major > 20; not the case with Warp 3, 4, 5273 || ( (aulBuf[0] == 20) // major == 20 and minor >= 45274 && (aulBuf[1] >= 45)275 )276 )277 // Warp 4.5 or newer:278 s_ulrc = 2;279 else if ( (aulBuf[0] == 20) // major == 20 and minor == 40280 && (aulBuf[1] == 40)281 )282 // Warp 4:283 s_ulrc = 1;284 285 s_fQueried = TRUE;286 }287 288 return (s_ulrc);289 235 } 290 236
Note:
See TracChangeset
for help on using the changeset viewer.