Sha256: 8f794ee1b1382204fa461a91e6360b50862fb33a26f51bff61ee958a866b63c2

Contents?: true

Size: 1.93 KB

Versions: 48

Compression:

Stored size: 1.93 KB

Contents

#include <stdio.h>

// Support Windows 2000 and later,
// this is needed for 'GetLongPathNameW' (both of the following defines)
#ifndef WINVER
#define WINVER 0x0500 
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif

// Exclude rarely-used stuff from Windows headers (both of the following defines)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN        
#endif

#include <Windows.h>

#include <ruby.h>
#include <ruby/encoding.h>

#ifndef WDM_H
#define WDM_H

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

// ---------------------------------------------------------
// Constants
// ---------------------------------------------------------

#define WDM_DEBUG_ENABLED FALSE

#define WDM_BUFFER_SIZE 16384 // 2^14 or 16Kb

// The maximum WCHAR's for buffers used in functions that have
// a unicode variant and require to prepend "\\?\" to the path
#define WDM_MAX_WCHAR_LONG_PATH 32767

// ---------------------------------------------------------
// Macros
// ---------------------------------------------------------

#if WDM_DEBUG_ENABLED == TRUE
    #define WDM_DEBUG(str, ...) \
        fprintf(stderr, "[DEBUG] (%s@%d): " str "\n", __FILE__, __LINE__, ##__VA_ARGS__)

    #define WDM_WDEBUG(str, ...) \
        fwprintf(stderr, L"[DEBUG] (%S@%d): " str "\n", __FILE__, __LINE__, ##__VA_ARGS__)

#else
    #define WDM_DEBUG(str, ...)
    #define WDM_WDEBUG(str, ...)
#endif

// ----------------------------------------------------------
// Extern global variables
// ----------------------------------------------------------

extern VALUE mWDM;

extern VALUE eWDM_Error;

extern rb_encoding *wdm_rb_enc_utf8;

// ---------------------------------------------------------
// Prototypes
// ---------------------------------------------------------

void Init_wdm_ext();

// ---------------------------------------------------------

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // WDM_H

Version data entries

48 entries across 40 versions & 5 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/wdm-0.1.1/ext/wdm/wdm.h
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/wdm-0.1.1/ext/wdm/wdm.h