utilities.hxx (ed2f6d3b) utilities.hxx (781fd7ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 26 unchanged lines hidden (view full) ---

35#pragma warning(pop)
36#endif
37#include <stdio.h>
38#include <fcntl.h>
39#include <io.h>
40#include "internal/types.hxx"
41
42#include <string>
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 26 unchanged lines hidden (view full) ---

35#pragma warning(pop)
36#endif
37#include <stdio.h>
38#include <fcntl.h>
39#include <io.h>
40#include "internal/types.hxx"
41
42#include <string>
43#ifndef OS2
43#define STRSAFE_NO_DEPRECATE
44#include <strsafe.h>
44#define STRSAFE_NO_DEPRECATE
45#include <strsafe.h>
46#endif
45
46//---------------------------------
47/** Convert a string to a wstring
48 using CP_ACP
49*/
50std::wstring StringToWString(const std::string& String);
51
52//---------------------------------

--- 32 unchanged lines hidden (view full) ---

85*/
86std::wstring getShortPathName( const std::wstring& aLongName );
87
88
89#ifndef OS2
90LCID LocaleSetToLCID( const LocaleSet_t & Locale );
91#endif
92
47
48//---------------------------------
49/** Convert a string to a wstring
50 using CP_ACP
51*/
52std::wstring StringToWString(const std::string& String);
53
54//---------------------------------

--- 32 unchanged lines hidden (view full) ---

87*/
88std::wstring getShortPathName( const std::wstring& aLongName );
89
90
91#ifndef OS2
92LCID LocaleSetToLCID( const LocaleSet_t & Locale );
93#endif
94
95#ifdef OS2
96typedef const char *LPCSTR;
97#endif
98
93//----------------------------------------------------------
94#ifdef DEBUG
95inline void OutputDebugStringFormat( LPCSTR pFormat, ... )
96{
97 CHAR buffer[1024];
98 va_list args;
99
99//----------------------------------------------------------
100#ifdef DEBUG
101inline void OutputDebugStringFormat( LPCSTR pFormat, ... )
102{
103 CHAR buffer[1024];
104 va_list args;
105
106#ifndef OS2
100 va_start( args, pFormat );
101 StringCchVPrintfA( buffer, sizeof(buffer), pFormat, args );
102 OutputDebugStringA( buffer );
107 va_start( args, pFormat );
108 StringCchVPrintfA( buffer, sizeof(buffer), pFormat, args );
109 OutputDebugStringA( buffer );
110#endif
103}
104#else
105static inline void OutputDebugStringFormat( LPCSTR, ... )
106{
107}
108#endif
109//----------------------------------------------------------
110
111
112#endif
111}
112#else
113static inline void OutputDebugStringFormat( LPCSTR, ... )
114{
115}
116#endif
117//----------------------------------------------------------
118
119
120#endif