Ignore:
Timestamp:
Nov 24, 2002, 9:45:05 PM (23 years ago)
Author:
umoeller
Message:

Sources as of 1.0.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/dosh.c

    r226 r229  
    302302 *      buffer, which should be free()'d afterwards.
    303303 *
     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 *
    304308 *      Returns NULL upon errors.
     309 *
     310 *@@changed V1.0.0 (2002-09-24) [umoeller]: now supporting NET messages as well
    305311 */
    306312
    307313PSZ doshQuerySysErrorMsg(APIRET arc)    // in: DOS error code
    308314{
    309     PSZ     pszReturn = 0;
     315    PSZ     pszReturn = NULL;
    310316    CHAR    szDosError[1000];
    311317    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))
    318332    {
    319333        szDosError[cbDosError - 2] = 0;
    320334        pszReturn = strdup(szDosError);
    321335    }
    322     return (pszReturn);
     336
     337    return pszReturn;
    323338}
    324339
     
    728743 *      CD-ROM drive.
    729744 *
    730  *@@added V0.9.21 (2002-08-31) [umoeller]
     745 *@@added V1.0.0 (2002-08-31) [umoeller]
    731746 */
    732747
     
    785800 *      to close the device again.
    786801 *
    787  *@@added V0.9.21 (2002-08-31) [umoeller]
     802 *@@added V1.0.0 (2002-08-31) [umoeller]
    788803 */
    789804
     
    823838 *
    824839 *@@added V0.9.14 (2001-08-01) [umoeller]
    825  *@@changed V0.9.21 (2002-08-31) [umoeller]: removed ulLogicalDrive which was not needed
     840 *@@changed V1.0.0 (2002-08-31) [umoeller]: removed ulLogicalDrive which was not needed
    826841 */
    827842
     
    852867        else
    853868        {
    854             #pragma pack(1)         // V0.9.21 (2002-08-31) [umoeller]
     869            #pragma pack(1)         // V1.0.0 (2002-08-31) [umoeller]
    855870
    856871            struct {
     
    959974 *      to find out if the door is open with OS/2.
    960975 *
    961  *@@added V0.9.21 (2002-08-31) [umoeller]
     976 *@@added V1.0.0 (2002-08-31) [umoeller]
    962977 */
    963978
     
    11461161    HFILE   hf;
    11471162
    1148     // exported this code to doshOpenDrive V0.9.21 (2002-08-31) [umoeller]
     1163    // exported this code to doshOpenDrive V1.0.0 (2002-08-31) [umoeller]
    11491164    arc = doshOpenDrive(ulLogicalDrive,
    11501165                        &hf);
Note: See TracChangeset for help on using the changeset viewer.