Changeset 229 for trunk/src/helpers/dosh.c
- Timestamp:
- Nov 24, 2002, 9:45:05 PM (23 years ago)
- File:
-
- 1 edited
-
trunk/src/helpers/dosh.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/dosh.c
r226 r229 302 302 * buffer, which should be free()'d afterwards. 303 303 * 304 * The returned string is properly null-terminated but 305 * should not end with a line break (\r or \n) if I see 306 * this correctly. 307 * 304 308 * Returns NULL upon errors. 309 * 310 *@@changed V1.0.0 (2002-09-24) [umoeller]: now supporting NET messages as well 305 311 */ 306 312 307 313 PSZ doshQuerySysErrorMsg(APIRET arc) // in: DOS error code 308 314 { 309 PSZ pszReturn = 0;315 PSZ pszReturn = NULL; 310 316 CHAR szDosError[1000]; 311 317 ULONG cbDosError = 0; 312 DosGetMessage(NULL, 0, // no string replacements 313 szDosError, sizeof(szDosError), 314 arc, 315 "OSO001.MSG", // default OS/2 message file 316 &cbDosError); 317 if (cbDosError > 2) 318 PCSZ pcszMsgFile; 319 320 if ( (arc >= 2100) 321 && (arc <= 8000) 322 ) 323 pcszMsgFile = "NET.MSG"; 324 else 325 pcszMsgFile = "OSO001.MSG"; // default OS/2 message file 326 327 if (!DosGetMessage(NULL, 0, // no string replacements 328 szDosError, sizeof(szDosError), 329 arc, 330 (PSZ)pcszMsgFile, 331 &cbDosError)) 318 332 { 319 333 szDosError[cbDosError - 2] = 0; 320 334 pszReturn = strdup(szDosError); 321 335 } 322 return (pszReturn); 336 337 return pszReturn; 323 338 } 324 339 … … 728 743 * CD-ROM drive. 729 744 * 730 *@@added V 0.9.21(2002-08-31) [umoeller]745 *@@added V1.0.0 (2002-08-31) [umoeller] 731 746 */ 732 747 … … 785 800 * to close the device again. 786 801 * 787 *@@added V 0.9.21(2002-08-31) [umoeller]802 *@@added V1.0.0 (2002-08-31) [umoeller] 788 803 */ 789 804 … … 823 838 * 824 839 *@@added V0.9.14 (2001-08-01) [umoeller] 825 *@@changed V 0.9.21(2002-08-31) [umoeller]: removed ulLogicalDrive which was not needed840 *@@changed V1.0.0 (2002-08-31) [umoeller]: removed ulLogicalDrive which was not needed 826 841 */ 827 842 … … 852 867 else 853 868 { 854 #pragma pack(1) // V 0.9.21(2002-08-31) [umoeller]869 #pragma pack(1) // V1.0.0 (2002-08-31) [umoeller] 855 870 856 871 struct { … … 959 974 * to find out if the door is open with OS/2. 960 975 * 961 *@@added V 0.9.21(2002-08-31) [umoeller]976 *@@added V1.0.0 (2002-08-31) [umoeller] 962 977 */ 963 978 … … 1146 1161 HFILE hf; 1147 1162 1148 // exported this code to doshOpenDrive V 0.9.21(2002-08-31) [umoeller]1163 // exported this code to doshOpenDrive V1.0.0 (2002-08-31) [umoeller] 1149 1164 arc = doshOpenDrive(ulLogicalDrive, 1150 1165 &hf);
Note:
See TracChangeset
for help on using the changeset viewer.
