Ignore:
Timestamp:
Feb 16, 2000, 3:28:28 PM (26 years ago)
Author:
sandervl
Message:

Added new logging feature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/oslibdos.cpp

    r2687 r2803  
    1 /* $Id: oslibdos.cpp,v 1.18 2000-02-08 22:29:15 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.19 2000-02-16 14:25:45 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    2727#include "dosqss.h"
    2828
     29#define DBG_LOCALLOG    DBG_oslibdos
     30#include "dbglocal.h"
     31
    2932/***********************************
    3033 * PH: fixups for missing os2win.h *
     
    344347}
    345348//******************************************************************************
     349DWORD WIN32API GetEnvironmentVariableA(LPCSTR, LPSTR, DWORD );
    346350//******************************************************************************
    347351DWORD OSLibDosSearchPath(DWORD cmd, char *path, char *name, char *full_name,
     
    377381  case OSLIB_SEARCHENV:
    378382  {
    379    PCSZ envstring;
    380    CHAR szResult[CCHMAXPATH];
    381 
    382         if(DosScanEnv(path, &envstring) != 0) {
     383   LPSTR envstring;
     384   int   envsize;
     385   CHAR  szResult[CCHMAXPATH];
     386
     387        envsize = GetEnvironmentVariableA(path, NULL, 0);
     388        envstring = (LPSTR)malloc(envsize+1);
     389        GetEnvironmentVariableA(path, envstring, envsize);
     390        if(DosSearchPath(SEARCH_IGNORENETERRS, envstring,
     391                         name, szResult, sizeof(szResult)) != 0) {
     392                free(envstring);
    383393                return 0;
    384394        }
    385         if(DosSearchPath(SEARCH_IGNORENETERRS, envstring,
    386                          name, szResult, sizeof(szResult)) != 0) {
    387                 return 0;
    388         }
     395        free(envstring);
    389396        strcpy(full_name, szResult);
    390397        return strlen(full_name);
Note: See TracChangeset for help on using the changeset viewer.