亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ptlib.cxx

?? windows mobile phone source code
?? CXX
?? 第 1 頁 / 共 2 頁
字號:
/*
 * ptlib.cxx
 *
 * General implementation of classes for Microsoft operating systems.
 *
 * Portable Windows Library
 *
 * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 * the License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is Portable Windows Library.
 *
 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
 *
 * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
 * All Rights Reserved.
 *
 * Contributor(s): ______________________________________.
 *
 * $Log: ptlib.cxx,v $
 * Revision 1.58  2001/09/10 02:51:23  robertj
 * Major change to fix problem with error codes being corrupted in a
 *   PChannel when have simultaneous reads and writes in threads.
 *
 * Revision 1.57  2001/06/04 10:15:01  robertj
 * Fixed bug if tried to get file info on empty file path.
 *
 * Revision 1.56  2001/03/19 05:49:44  robertj
 * Redid int64 stream input to use library conversion function and
 *   set fail bit if no valid integer was found in the input stream.
 *
 * Revision 1.55  2001/03/15 23:49:42  robertj
 * Added missing operators for reading 64 bit integers from streams.
 *
 * Revision 1.54  2001/02/13 04:39:08  robertj
 * Fixed problem with operator= in container classes. Some containers will
 *   break unless the copy is virtual (eg PStringStream's buffer pointers) so
 *   needed to add a new AssignContents() function to all containers.
 *
 * Revision 1.53  2001/01/24 06:38:29  yurik
 * Windows CE port-related changes
 *
 * Revision 1.52  2000/07/09 14:05:46  robertj
 * Added file share options.
 *
 * Revision 1.51  2000/04/29 06:44:17  robertj
 * Added some stuff to make sure symbols included in library.
 *
 * Revision 1.50  2000/02/19 23:46:09  robertj
 * Fixed incorrect values for PFile::Access() function, thanks Stefan Ditscheid.
 *
 * Revision 1.49  1999/08/17 03:46:40  robertj
 * Fixed usage of inlines in optimised version.
 *
 * Revision 1.48  1999/06/14 07:59:38  robertj
 * Enhanced tracing again to add options to trace output (timestamps etc).
 *
 * Revision 1.47  1999/06/13 13:54:07  robertj
 * Added PConsoleChannel class for access to stdin/stdout/stderr.
 *
 * Revision 1.46  1999/06/09 02:05:20  robertj
 * Added ability to open file as standard input, output and error streams.
 *
 * Revision 1.45  1999/05/06 06:11:50  robertj
 * Fixed date to be forgiving of rubbish at end of date string.
 * Fixed PTime::GetHour() etc to not crash on time=-1.
 *
 * Revision 1.44  1998/11/30 07:30:31  robertj
 * Fixed problems with PFilePath parsing functions.
 *
 * Revision 1.43  1998/11/26 10:34:19  robertj
 * Fixed problem with PFileInfo::GetVolume() on UNC paths.
 *
 * Revision 1.42  1998/11/14 23:37:08  robertj
 * Fixed file path directory extraction, not able to return root directory
 *
 * Revision 1.41  1998/10/19 00:20:38  robertj
 * Moved error and trace stream functions to common code.
 *
 * Revision 1.40  1998/10/18 14:27:10  robertj
 * Improved tracing functions.
 *
 * Revision 1.39  1998/10/13 14:13:17  robertj
 * Complete rewrite of memory leak detection code.
 *
 * Revision 1.38  1998/09/24 03:30:53  robertj
 * Added open software license.
 *
 * Revision 1.37  1998/09/14 12:55:06  robertj
 * Changed memory debug to dump leaks not including static globals.
 *
 * Revision 1.36  1998/05/26 01:29:53  robertj
 * Removed assert as this Close() function is now called all the time for Unix reasons.
 *
 * Revision 1.35  1998/05/21 04:27:31  robertj
 * Compensated for MSC run time library bug.
 *
 * Revision 1.34  1998/04/01 01:54:45  robertj
 * Added memory leak checking to debug version.
 *
 * Revision 1.33  1998/03/29 06:16:51  robertj
 * Rearranged initialisation sequence so PProcess descendent constructors can do "things".
 *
 * Revision 1.32  1998/03/20 03:20:16  robertj
 * Added MSVC RT debug support.
 *
 * Revision 1.31  1998/01/26 00:54:15  robertj
 * 64 bit integer string conversions.
 *
 * Revision 1.30  1998/01/05 10:38:25  robertj
 * Unix pthreads compatibility, added threadsafe time functions.
 *
 * Revision 1.29  1997/12/11 10:40:29  robertj
 * Fixed bug in SetType() function of FilePath.
 *
 * Revision 1.28  1997/08/28 12:49:51  robertj
 * Fixed bug where could not change directory to UNC.
 *
 * Revision 1.27  1997/04/27 05:50:26  robertj
 * DLL support.
 *
 * Revision 1.26  1997/01/12 04:23:43  robertj
 * Fixed PDirectory::IsRoot() so works with UNC's
 *
 * Revision 1.25  1996/08/17 10:00:37  robertj
 * Changes for Windows DLL support.
 *
 * Revision 1.24  1996/08/08 10:09:23  robertj
 * Directory structure changes for common files.
 *
 * Revision 1.23  1996/01/28 02:56:16  robertj
 * Fixed bug in PFilePath functions for if path ends in a directory separator.
 *
 * Revision 1.22  1996/01/23 13:23:51  robertj
 * Fixed bug in PFileInfo for if path ends in directory separator.
 *
 * Revision 1.21  1996/01/02 12:56:49  robertj
 * Fixed copy of directories.
 *
 * Revision 1.20  1995/12/10 11:59:33  robertj
 * Changes to main() startup mechanism to support Mac.
 * Fixed bug in time interfval constant variable initialisation. Not guarenteed to work.
 * Moved error code for specific WIN32 and MS-DOS versions.
 *
 * Revision 1.19  1995/10/14 15:12:29  robertj
 * Added function to get parent directory.
 *
 * Revision 1.18  1995/07/31 12:18:11  robertj
 * Removed PContainer from PChannel ancestor.
 *
 * Revision 1.17  1995/06/04 13:10:19  robertj
 * Fixed rename bug.
 *
 * Revision 1.16  1995/06/04 12:48:06  robertj
 * Changed unknown error string to hex.
 * Added missing GetInfo function for directory entries
 *
 * Revision 1.15  1995/04/25 11:33:35  robertj
 * Changes for DLL support.
 *
 * Revision 1.14  1995/04/22 00:53:49  robertj
 * Added Move() function to PFile.
 * Changed semantics of Rename() function in PFile.
 * Changed file path string to use PFilePath object.
 *
 * Revision 1.13  1995/03/12 05:00:08  robertj
 * Re-organisation of DOS/WIN16 and WIN32 platforms to maximise common code.
 * Used built-in equate for WIN32 API (_WIN32).
 *
 * Revision 1.12  1995/02/27  10:37:06  robertj
 * Added GetUserNmae().
 * Removed superfluous Read() and Write() for text files.
 *
 * Revision 1.11  1995/01/06  10:41:43  robertj
 * Moved identifiers into different scope.
 * Changed file size to 64 bit integer.
 *
 * Revision 1.10  1994/12/21  11:36:07  robertj
 * Fixed caseless string for file paths.
 *
 * Revision 1.9  1994/10/30  11:26:54  robertj
 * Fixed set current directory function.
 * Changed PFilePath to be case insignificant according to platform.
 *
 * Revision 1.8  1994/10/23  05:42:39  robertj
 * PipeChannel headers.
 * ConvertOSError function added.
 * Numerous implementation enhancements.
 *
 * Revision 1.7  1994/08/04  13:24:27  robertj
 * Added debug stream.
 *
 * Revision 1.6  1994/07/27  06:00:10  robertj
 * Backup
 *
 * Revision 1.5  1994/07/21  12:35:18  robertj
 * *** empty log message ***
 *
 * Revision 1.4  1994/07/17  11:01:04  robertj
 * Ehancements, implementation, bug fixes etc.
 *
 * Revision 1.3  1994/07/02  03:18:09  robertj
 * Multi-threading implementation.
 *
 * Revision 1.2  1994/06/25  12:13:01  robertj
 * Synchronisation.
 *
// Revision 1.1  1994/04/01  14:39:35  robertj
// Initial revision
//
 */

#include <ptlib.h>

#include <errno.h>
#include <fcntl.h>
#include <share.h>
#include <sys\stat.h>
#include <crtdbg.h>

#if !P_USE_INLINES
#include <ptlib/osutil.inl>
#include <ptlib/ptlib.inl>
#endif


ostream & operator<<(ostream & s, PInt64 v)
{
  char buffer[25];

  if ((s.flags()&ios::hex) != 0)
    return s << _ui64toa(v, buffer, 16);

  if ((s.flags()&ios::oct) != 0)
    return s << _ui64toa(v, buffer, 8);

  if (v < 0) {
    s << '-';
    v = -v;
  }

  return s << _i64toa(v, buffer, 10);
}


ostream & operator<<(ostream & s, PUInt64 v)
{
  char buffer[25];
  return s << _ui64toa(v, buffer, (s.flags()&ios::oct) ? 8 : ((s.flags()&ios::hex) ? 16 : 10));
}


const int MaxDigits = (64+2)/3+1; // Maximum is 22 digit octal number, plus sign

static void GetDigits(BOOL sign, istream & s, char * buffer)
{
  PINDEX count = 0;

  s.eatwhite();

  if (s.peek() == '+')
    s.get(); // Skip leading '+'
  else if (sign && s.peek() == '-')
    s.get(buffer[count++]);

  if ((s.flags()&ios::oct) != 0) {
    while (isdigit(s.peek()) && s.peek() < '8' && count < MaxDigits)
      s.get(buffer[count++]);
  }
  else if ((s.flags()&ios::hex) != 0) {
    while (isxdigit(s.peek()) && count < MaxDigits)
      s.get(buffer[count++]);
  }
  else {
    while (isdigit(s.peek()) && count < MaxDigits)
      s.get(buffer[count++]);
  }

  buffer[count] = '\0';

  if (count > (buffer[0] == '-' ? 1 : 0))
    return;

  s.clear(ios::failbit);
}


istream & operator>>(istream & s, PInt64 & v)
{
  char b[MaxDigits+1];
  GetDigits(TRUE, s, b);
  v = _atoi64(b);
  return s;
}


istream & operator>>(istream & s, PUInt64 & v)
{
  char b[MaxDigits+1];
  GetDigits(FALSE, s, b);
  v = _atoi64(b);
  return s;
}


PInt64 PString::AsInt64(unsigned base) const
{
  if (base == 10)
    return _atoi64(theArray);

  PAssert(base >= 2 && base <= 36, PInvalidParameter);

  PInt64 total = 0;
  const char * ptr = theArray;

  while (isspace(*ptr))
    ptr++;

  BOOL negative = *ptr == '-';
  if (*ptr == '-' || *ptr == '+')
    ptr++;

  for (;;) {
    unsigned c = *ptr++;
    if (c < '0')
      break;

    if (c <= '9')
      c -= '0';
    else
      c = toupper(c) - 'A' + 10;

    if (c >= base)
      break;

    total = base * total + c;

    c = *ptr++;
  }

  if (negative)
    return -total;
  else
    return total;
}


PUInt64 PString::AsUnsigned64(unsigned base) const
{
  PAssert(base >= 2 && base <= 36, PInvalidParameter);

  PUInt64 total = 0;
  const char * ptr = theArray;

  while (isspace(*ptr))
    ptr++;

  for (;;) {
    unsigned c = *ptr++;
    if (c < '0')
      break;

    if (c <= '9')
      c -= '0';
    else
      c = toupper(c) - 'A' + 10;

    if (c >= base)
      break;

    total = base * total + c;

    c = *ptr++;
  }

  return total;
}


///////////////////////////////////////////////////////////////////////////////
// PTime

struct tm * PTime::os_localtime(const time_t * clock, struct tm * tb)
{
  struct tm * tp = ::localtime(clock);
  if (tp != NULL)
    return tp;

  memset(tb, 0, sizeof(*tb));
  return tb;
}


struct tm * PTime::os_gmtime(const time_t * clock, struct tm * tb)
{
  struct tm * tp = ::gmtime(clock);
  if (tp != NULL)
    return tp;

  memset(tb, 0, sizeof(*tb));
  return tb;
}


///////////////////////////////////////////////////////////////////////////////
// PChannel

void PChannel::Construct()
{
}


PString PChannel::GetName() const
{
  PAssertAlways(PUnimplementedFunction);
  return PString();
}


BOOL PChannel::Read(void *, PINDEX)
{
  PAssertAlways(PUnimplementedFunction);
  return FALSE;
}


BOOL PChannel::Write(const void *, PINDEX)
{
  PAssertAlways(PUnimplementedFunction);
  return FALSE;
}


BOOL PChannel::Close()
{
  return FALSE;
}


///////////////////////////////////////////////////////////////////////////////
// Directories

PDirectory PDirectory::GetParent() const
{
  if (IsRoot())
    return *this;
  
  return *this + "..";
}


BOOL PDirectory::Change(const PString & p)
{
  PDirectory d = p;

  if (d[0] != '\\')
    if (_chdrive(toupper(d[0])-'A'+1) != 0)
      return FALSE;

  return _chdir(d + ".") == 0;
}


BOOL PDirectory::Filtered()
{
#if defined(_WIN32)
#ifdef _WIN32_WCE
  USES_CONVERSION;
  char * name = T2A(fileinfo.cFileName);
#else
  char * name = fileinfo.cFileName;
#endif // _WIN32_WCE
#else
  char * name = fileinfo.name;
#endif
  if (strcmp(name, ".") == 0)
    return TRUE;
  if (strcmp(name, "..") == 0)
    return TRUE;
  if (scanMask == PFileInfo::AllPermissions)
    return FALSE;

  PFileInfo inf;
  PAssert(PFile::GetInfo(*this+name, inf), POperatingSystemError);
  return (inf.type&scanMask) == 0;
}


BOOL PDirectory::IsRoot() const
{
  if ((*this)[1] == ':')
    return GetLength() == 3;

  PINDEX pos = FindOneOf("/\\", 2);
  return pos == GetLength();
}


BOOL PDirectory::GetInfo(PFileInfo & info) const
{
  return PFile::GetInfo(*this + GetEntryName(), info);
}


///////////////////////////////////////////////////////////////////////////////
// File Path

PFilePath::PFilePath(const PString & str)
  : PCaselessString(PDirectory::CreateFullPath(str, FALSE))
{
}


PFilePath::PFilePath(const char * cstr)
  : PCaselessString(PDirectory::CreateFullPath(cstr, FALSE))
{
}


PFilePath::PFilePath(const char * prefix, const char * dir)
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
豆国产96在线|亚洲| 欧美伊人精品成人久久综合97| 成人av第一页| 欧美电影一区二区| 亚洲欧美在线另类| 九九九精品视频| 欧美婷婷六月丁香综合色| 久久九九99视频| 日本午夜一区二区| 在线观看免费亚洲| 国产精品乱码一区二区三区软件| 日本欧美久久久久免费播放网| 波多野洁衣一区| 久久综合色之久久综合| 天堂一区二区在线| 色老汉一区二区三区| 国产三级欧美三级| 极品少妇xxxx精品少妇偷拍| 欧美精品vⅰdeose4hd| 亚洲人成亚洲人成在线观看图片 | 欧美国产精品中文字幕| 欧美a级一区二区| 欧美色综合天天久久综合精品| 亚洲日本成人在线观看| 懂色av一区二区在线播放| 精品国产三级电影在线观看| 日韩二区在线观看| 欧美精品v国产精品v日韩精品| 亚洲精品你懂的| 色综合一区二区| 中文字幕一区二区三区在线不卡 | 欧美一卡二卡三卡四卡| 亚洲成人中文在线| 欧美色大人视频| 亚洲成av人在线观看| 欧洲亚洲精品在线| 天天做天天摸天天爽国产一区| 床上的激情91.| 亚洲国产精品成人综合色在线婷婷| 国产在线精品不卡| 久久久久久久久蜜桃| 国产一区二区精品久久99| 久久综合国产精品| 成人免费看黄yyy456| 亚洲欧洲在线观看av| 99精品久久久久久| 亚洲激情图片小说视频| 欧美影院午夜播放| 日韩成人午夜精品| 精品精品国产高清一毛片一天堂| 韩国欧美国产1区| 日本一区二区三区高清不卡| 99久久久久免费精品国产| 亚洲精品亚洲人成人网| 欧美色精品天天在线观看视频| 日韩福利电影在线| 久久久www成人免费无遮挡大片| 高清不卡在线观看av| 亚洲色图在线看| 在线不卡的av| 国产91精品久久久久久久网曝门| 亚洲日穴在线视频| 欧美一区二区网站| 国产很黄免费观看久久| 亚洲三级在线观看| 91精品在线免费观看| 国产成人丝袜美腿| 伊人婷婷欧美激情| 精品久久久久久综合日本欧美| 成人久久18免费网站麻豆| 亚洲一区在线观看免费观看电影高清| 4438成人网| 粉嫩一区二区三区在线看| 亚洲国产欧美在线人成| 久久综合999| 欧美日韩亚洲国产综合| 国产精品一区二区x88av| 亚洲激情综合网| 欧美精品一区二区三区久久久| 色诱视频网站一区| 国精产品一区一区三区mba桃花| 国产精品久久毛片av大全日韩| 欧美日韩亚洲综合一区二区三区| 国产精品77777| 日韩专区中文字幕一区二区| 国产精品国产三级国产aⅴ无密码| 欧美人与z0zoxxxx视频| 99re66热这里只有精品3直播 | 亚洲国产裸拍裸体视频在线观看乱了| 日韩欧美国产三级| 在线观看网站黄不卡| 国产精品综合一区二区三区| 午夜av一区二区三区| 国产精品免费丝袜| 精品国产在天天线2019| 欧美日韩一区成人| 99精品国产热久久91蜜凸| 国产一区二区三区免费看| 午夜欧美电影在线观看| 国产精品电影一区二区三区| 久久久久久麻豆| 日韩一区二区三区电影| 欧美日韩国产高清一区二区三区| 99在线热播精品免费| 国产精品影视天天线| 美女一区二区久久| 日韩不卡一区二区三区| 亚洲一区二区偷拍精品| 亚洲女同一区二区| 最近日韩中文字幕| 国产精品欧美一级免费| 久久久久久久电影| 日韩欧美视频在线| 日韩精品专区在线| 欧美成人三级电影在线| 欧美一级xxx| 欧美精品一级二级| 6080国产精品一区二区| 欧美日韩亚洲另类| 欧美美女视频在线观看| 欧美久久婷婷综合色| 欧美丰满嫩嫩电影| 欧美日韩亚洲综合一区| 欧美福利电影网| 欧美成人高清电影在线| 精品久久久久久久久久久久久久久久久 | 6080国产精品一区二区| 欧美一区在线视频| 日韩午夜激情av| 精品理论电影在线观看| 久久久久久久综合色一本| 亚洲国产经典视频| 亚洲欧美日韩中文播放| 亚洲一区二区三区四区在线| 日韩精品亚洲一区二区三区免费| 香蕉乱码成人久久天堂爱免费| 天天综合网天天综合色| 日韩在线观看一区二区| 成人免费视频视频在线观看免费| 国产精品亚洲一区二区三区妖精 | 欧美日精品一区视频| 欧美夫妻性生活| 2024国产精品视频| ...中文天堂在线一区| 亚洲国产aⅴ成人精品无吗| 免费高清在线一区| 成人一区二区三区视频在线观看| 91视视频在线观看入口直接观看www | 久久久www成人免费无遮挡大片| 中文字幕av不卡| 亚洲一区精品在线| 麻豆专区一区二区三区四区五区| 国产成人精品影视| 欧美色图激情小说| 久久青草国产手机看片福利盒子| 亚洲欧美自拍偷拍色图| 天涯成人国产亚洲精品一区av| 国产suv精品一区二区6| 91福利社在线观看| 久久精品视频免费观看| 亚洲香肠在线观看| 国产成人精品一区二区三区四区| 欧美三级三级三级| 亚洲国产精品二十页| 日韩不卡免费视频| 色综合久久久久久久久久久| 精品免费99久久| 午夜精品视频在线观看| 粉嫩一区二区三区性色av| 3d动漫精品啪啪| 亚洲靠逼com| 国产一区二区调教| 欧美精品在线观看一区二区| 国产精品久久久久婷婷二区次| 久久国产人妖系列| 欧美三级电影在线观看| 成人免费在线视频观看| 久久 天天综合| 欧美色老头old∨ideo| 亚洲欧美精品午睡沙发| 国产福利91精品| 26uuu亚洲综合色欧美 | 91丝袜美腿高跟国产极品老师 | 国产喷白浆一区二区三区| 奇米精品一区二区三区在线观看一| 91啪在线观看| 国产精品无人区| 国产精品亚洲视频| 精品三级在线看| 人禽交欧美网站| 91精品国产麻豆国产自产在线| 亚洲一区在线电影| 在线观看精品一区| 亚洲一区影音先锋| 日本国产一区二区| 亚洲精品水蜜桃| 99精品视频在线观看免费| 中文字幕亚洲在| 91无套直看片红桃| 亚洲精品免费在线播放|