evecache 0.42.1 → 0.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/evecache.gemspec +1 -1
- data/ext/evecache/evecache.cxx +443 -477
- data/ext/evecache/evecache/config.hpp +1 -1
- data/ext/evecache/evecache/market.hpp +1 -1
- data/ext/evecache/market.cpp +7 -1
- data/ext/evecache/parser.cpp +2 -1
- data/ext/evecache/reader.cpp +10 -2
- metadata +6 -7
- data/ext/evecache/Makefile +0 -237
@@ -144,7 +144,7 @@ namespace EveCache {
|
|
144
144
|
public:
|
145
145
|
MarketParser(const SNode *stream);
|
146
146
|
MarketParser(const char* fileName);
|
147
|
-
MarketParser(const std::string fileName);
|
147
|
+
MarketParser(const std::string& fileName);
|
148
148
|
~MarketParser();
|
149
149
|
MarketList getList() const;
|
150
150
|
void parse();
|
data/ext/evecache/market.cpp
CHANGED
@@ -111,7 +111,7 @@ namespace EveCache {
|
|
111
111
|
}
|
112
112
|
}
|
113
113
|
|
114
|
-
MarketParser::MarketParser(const std::string fileName) : _valid(false)
|
114
|
+
MarketParser::MarketParser(const std::string& fileName) : _valid(false)
|
115
115
|
{
|
116
116
|
try{
|
117
117
|
initWithFile(fileName);
|
@@ -126,7 +126,13 @@ namespace EveCache {
|
|
126
126
|
|
127
127
|
void MarketParser::initWithFile(const std::string& fileName)
|
128
128
|
{
|
129
|
+
#ifdef WIN32
|
130
|
+
std::wstring wFileName;
|
131
|
+
wFileName.assign(fileName.begin(), fileName.end());
|
132
|
+
CacheFile cF(wFileName);
|
133
|
+
#else
|
129
134
|
CacheFile cF(fileName);
|
135
|
+
#endif
|
130
136
|
if (cF.readFile() == false) {
|
131
137
|
throw new ParseException("Can't open file" + fileName);
|
132
138
|
}
|
data/ext/evecache/parser.cpp
CHANGED
@@ -848,7 +848,8 @@ namespace EveCache {
|
|
848
848
|
//
|
849
849
|
// f.ex. dbutil.RowList -> keep reading rows until you hit the 0x2d marker
|
850
850
|
//
|
851
|
-
if (! oclass.compare("dbutil.RowList")
|
851
|
+
if (! oclass.compare("dbutil.RowList") ||
|
852
|
+
! oclass.compare("eve.common.script.sys.rowset.RowList")) {
|
852
853
|
try {
|
853
854
|
SNode *row;
|
854
855
|
while ( (row = parseone()) ) {
|
data/ext/evecache/reader.cpp
CHANGED
@@ -26,6 +26,11 @@
|
|
26
26
|
#include <cstring>
|
27
27
|
#include <assert.h>
|
28
28
|
#include <vector>
|
29
|
+
#include <stdlib.h>
|
30
|
+
|
31
|
+
#ifdef WIN32
|
32
|
+
#include <windows.h>
|
33
|
+
#endif
|
29
34
|
|
30
35
|
namespace EveCache {
|
31
36
|
|
@@ -82,9 +87,12 @@ namespace EveCache {
|
|
82
87
|
{
|
83
88
|
using namespace std;
|
84
89
|
#ifdef WIN32
|
85
|
-
|
86
|
-
|
90
|
+
char f[MAX_PATH];
|
91
|
+
wcstombs(f, wfilename.c_str(), MAX_PATH);
|
92
|
+
ifstream file(f, ios::in | ios::binary | ios::ate);
|
93
|
+
#else
|
87
94
|
ifstream file(filename.c_str(), ios::in | ios::binary | ios::ate);
|
95
|
+
#endif
|
88
96
|
if (file.is_open())
|
89
97
|
{
|
90
98
|
ifstream::pos_type size;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evecache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.42.
|
4
|
+
version: 0.42.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marvin Frick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby binding to libevecache to access Eve Online market cache files.
|
14
14
|
Does nothing more.
|
@@ -19,11 +19,10 @@ extensions:
|
|
19
19
|
- ext/evecache/extconf.rb
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
|
-
- .gitignore
|
22
|
+
- ".gitignore"
|
23
23
|
- README.md
|
24
24
|
- Rakefile
|
25
25
|
- evecache.gemspec
|
26
|
-
- ext/evecache/Makefile
|
27
26
|
- ext/evecache/dbtypes.cpp
|
28
27
|
- ext/evecache/evecache.cxx
|
29
28
|
- ext/evecache/evecache/config.hpp
|
@@ -50,17 +49,17 @@ require_paths:
|
|
50
49
|
- lib
|
51
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
51
|
requirements:
|
53
|
-
- -
|
52
|
+
- - ">="
|
54
53
|
- !ruby/object:Gem::Version
|
55
54
|
version: 1.9.3
|
56
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
56
|
requirements:
|
58
|
-
- -
|
57
|
+
- - ">="
|
59
58
|
- !ruby/object:Gem::Version
|
60
59
|
version: 1.3.6
|
61
60
|
requirements: []
|
62
61
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.
|
62
|
+
rubygems_version: 2.2.2
|
64
63
|
signing_key:
|
65
64
|
specification_version: 4
|
66
65
|
summary: A Ruby binding to libevecache to access Eve Online market cache files.
|
data/ext/evecache/Makefile
DELETED
@@ -1,237 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
# V=0 quiet, V=1 verbose. other values don't work.
|
5
|
-
V = 0
|
6
|
-
Q1 = $(V:1=)
|
7
|
-
Q = $(Q1:0=@)
|
8
|
-
ECHO1 = $(V:1=@:)
|
9
|
-
ECHO = $(ECHO1:0=@echo)
|
10
|
-
|
11
|
-
#### Start of system configuration section. ####
|
12
|
-
|
13
|
-
srcdir = .
|
14
|
-
topdir = $(includedir)/$(RUBY_VERSION_NAME)
|
15
|
-
hdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
16
|
-
arch_hdrdir = $(rubyhdrdir)/$(arch)
|
17
|
-
PATH_SEPARATOR = :
|
18
|
-
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
19
|
-
prefix = $(DESTDIR)/Users/marv/.rvm/rubies/ruby-2.0.0-p0
|
20
|
-
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
21
|
-
rubyarchprefix = $(rubylibprefix)/$(arch)
|
22
|
-
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
23
|
-
exec_prefix = $(prefix)
|
24
|
-
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
25
|
-
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
26
|
-
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
27
|
-
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
28
|
-
sitehdrdir = $(rubyhdrdir)/site_ruby
|
29
|
-
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
30
|
-
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
31
|
-
vendorlibdir = $(vendordir)/$(ruby_version)
|
32
|
-
vendordir = $(rubylibprefix)/vendor_ruby
|
33
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
34
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
35
|
-
sitedir = $(rubylibprefix)/site_ruby
|
36
|
-
rubyarchdir = $(rubylibdir)/$(arch)
|
37
|
-
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
38
|
-
sitearchincludedir = $(includedir)/$(sitearch)
|
39
|
-
archincludedir = $(includedir)/$(arch)
|
40
|
-
sitearchlibdir = $(libdir)/$(sitearch)
|
41
|
-
archlibdir = $(libdir)/$(arch)
|
42
|
-
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
43
|
-
mandir = $(datarootdir)/man
|
44
|
-
localedir = $(datarootdir)/locale
|
45
|
-
libdir = $(exec_prefix)/lib
|
46
|
-
psdir = $(docdir)
|
47
|
-
pdfdir = $(docdir)
|
48
|
-
dvidir = $(docdir)
|
49
|
-
htmldir = $(docdir)
|
50
|
-
infodir = $(datarootdir)/info
|
51
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
52
|
-
oldincludedir = $(DESTDIR)/usr/include
|
53
|
-
includedir = $(prefix)/include
|
54
|
-
localstatedir = $(prefix)/var
|
55
|
-
sharedstatedir = $(prefix)/com
|
56
|
-
sysconfdir = $(prefix)/etc
|
57
|
-
datadir = $(datarootdir)
|
58
|
-
datarootdir = $(prefix)/share
|
59
|
-
libexecdir = $(exec_prefix)/libexec
|
60
|
-
sbindir = $(exec_prefix)/sbin
|
61
|
-
bindir = $(exec_prefix)/bin
|
62
|
-
archdir = $(rubyarchdir)
|
63
|
-
|
64
|
-
|
65
|
-
CC = clang
|
66
|
-
CXX = g++
|
67
|
-
LIBRUBY = $(LIBRUBY_SO)
|
68
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
69
|
-
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
70
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
71
|
-
empty =
|
72
|
-
OUTFLAG = -o $(empty)
|
73
|
-
COUTFLAG = -o $(empty)
|
74
|
-
|
75
|
-
RUBY_EXTCONF_H =
|
76
|
-
cflags = $(optflags) $(debugflags) $(warnflags)
|
77
|
-
optflags = -O3 -fno-fast-math
|
78
|
-
debugflags = -ggdb3
|
79
|
-
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration
|
80
|
-
CFLAGS = -fno-common -O3 -march=nocona -O2 -pipe -fno-common $(ARCH_FLAG)
|
81
|
-
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
82
|
-
DEFS =
|
83
|
-
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/Cellar/libyaml/0.1.4/include -I/usr/local/opt/readline/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/libxslt/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include $(DEFS) $(cppflags)
|
84
|
-
CXXFLAGS = $(CFLAGS) $(cxxflags)
|
85
|
-
ldflags = -L. -fstack-protector -L/usr/local/lib -L/usr/local/Cellar/libyaml/0.1.4/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib
|
86
|
-
dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/Cellar/libyaml/0.1.4/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib
|
87
|
-
ARCH_FLAG =
|
88
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
89
|
-
LDSHARED = $(CC) -dynamic -bundle
|
90
|
-
LDSHAREDXX = $(CXX) -dynamic -bundle
|
91
|
-
AR = ar
|
92
|
-
EXEEXT =
|
93
|
-
|
94
|
-
RUBY_INSTALL_NAME = ruby
|
95
|
-
RUBY_SO_NAME = ruby.2.0.0
|
96
|
-
RUBYW_INSTALL_NAME =
|
97
|
-
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
98
|
-
RUBYW_BASE_NAME = rubyw
|
99
|
-
RUBY_BASE_NAME = ruby
|
100
|
-
|
101
|
-
arch = x86_64-darwin12.2.1
|
102
|
-
sitearch = $(arch)
|
103
|
-
ruby_version = 2.0.0
|
104
|
-
ruby = $(bindir)/ruby
|
105
|
-
RUBY = $(ruby)
|
106
|
-
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h
|
107
|
-
|
108
|
-
RM = rm -f
|
109
|
-
RM_RF = $(RUBY) -run -e rm -- -rf
|
110
|
-
RMDIRS = rmdir -p
|
111
|
-
MAKEDIRS = mkdir -p
|
112
|
-
INSTALL = /usr/bin/install -c
|
113
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
114
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
115
|
-
COPY = cp
|
116
|
-
TOUCH = exit >
|
117
|
-
|
118
|
-
#### End of system configuration section. ####
|
119
|
-
|
120
|
-
preload =
|
121
|
-
|
122
|
-
libpath = . $(libdir) /usr/local/Cellar/libyaml/0.1.4/lib /usr/local/opt/readline/lib /usr/local/opt/libxml2/lib /usr/local/opt/libxslt/lib /usr/local/opt/openssl/lib /usr/local/opt/sqlite/lib
|
123
|
-
LIBPATH = -L. -L$(libdir) -L/usr/local/Cellar/libyaml/0.1.4/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/libxslt/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib
|
124
|
-
DEFFILE =
|
125
|
-
|
126
|
-
CLEANFILES = mkmf.log
|
127
|
-
DISTCLEANFILES =
|
128
|
-
DISTCLEANDIRS =
|
129
|
-
|
130
|
-
extout =
|
131
|
-
extout_prefix =
|
132
|
-
target_prefix =
|
133
|
-
LOCAL_LIBS =
|
134
|
-
LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc
|
135
|
-
ORIG_SRCS = evecache.cxx dbtypes.cpp exceptions.cpp market.cpp parser.cpp reader.cpp
|
136
|
-
SRCS = $(ORIG_SRCS)
|
137
|
-
OBJS = evecache.o dbtypes.o exceptions.o market.o parser.o reader.o
|
138
|
-
HDRS =
|
139
|
-
TARGET = evecache
|
140
|
-
TARGET_NAME = evecache
|
141
|
-
TARGET_ENTRY = Init_$(TARGET_NAME)
|
142
|
-
DLLIB = $(TARGET).bundle
|
143
|
-
EXTSTATIC =
|
144
|
-
STATIC_LIB =
|
145
|
-
|
146
|
-
BINDIR = $(bindir)
|
147
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
148
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
149
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
150
|
-
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
151
|
-
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
152
|
-
|
153
|
-
TARGET_SO = $(DLLIB)
|
154
|
-
CLEANLIBS = $(TARGET).bundle
|
155
|
-
CLEANOBJS = *.o *.bak
|
156
|
-
|
157
|
-
all: $(DLLIB)
|
158
|
-
static: $(STATIC_LIB)
|
159
|
-
.PHONY: all install static install-so install-rb
|
160
|
-
.PHONY: clean clean-so clean-static clean-rb
|
161
|
-
|
162
|
-
clean-static::
|
163
|
-
clean-rb-default::
|
164
|
-
clean-rb::
|
165
|
-
clean-so::
|
166
|
-
clean: clean-so clean-static clean-rb-default clean-rb
|
167
|
-
-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
168
|
-
|
169
|
-
distclean-rb-default::
|
170
|
-
distclean-rb::
|
171
|
-
distclean-so::
|
172
|
-
distclean-static::
|
173
|
-
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
174
|
-
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
175
|
-
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
176
|
-
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
177
|
-
|
178
|
-
realclean: distclean
|
179
|
-
install: install-so install-rb
|
180
|
-
|
181
|
-
install-so: $(DLLIB) ./.RUBYARCHDIR.time
|
182
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
183
|
-
clean-static::
|
184
|
-
-$(Q)$(RM) $(STATIC_LIB)
|
185
|
-
install-rb: pre-install-rb install-rb-default
|
186
|
-
install-rb-default: pre-install-rb-default
|
187
|
-
pre-install-rb: Makefile
|
188
|
-
pre-install-rb-default: Makefile
|
189
|
-
pre-install-rb-default:
|
190
|
-
$(ECHO) installing default evecache libraries
|
191
|
-
./.RUBYARCHDIR.time:
|
192
|
-
$(Q) $(MAKEDIRS) $(RUBYARCHDIR)
|
193
|
-
$(Q) $(TOUCH) $@
|
194
|
-
|
195
|
-
site-install: site-install-so site-install-rb
|
196
|
-
site-install-so: install-so
|
197
|
-
site-install-rb: install-rb
|
198
|
-
|
199
|
-
.SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
|
200
|
-
|
201
|
-
.cc.o:
|
202
|
-
$(ECHO) compiling $(<)
|
203
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
204
|
-
|
205
|
-
.mm.o:
|
206
|
-
$(ECHO) compiling $(<)
|
207
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
208
|
-
|
209
|
-
.cxx.o:
|
210
|
-
$(ECHO) compiling $(<)
|
211
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
212
|
-
|
213
|
-
.cpp.o:
|
214
|
-
$(ECHO) compiling $(<)
|
215
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
216
|
-
|
217
|
-
.C.o:
|
218
|
-
$(ECHO) compiling $(<)
|
219
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
220
|
-
|
221
|
-
.c.o:
|
222
|
-
$(ECHO) compiling $(<)
|
223
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
224
|
-
|
225
|
-
.m.o:
|
226
|
-
$(ECHO) compiling $(<)
|
227
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
228
|
-
|
229
|
-
$(DLLIB): $(OBJS) Makefile
|
230
|
-
$(ECHO) linking shared-object $(DLLIB)
|
231
|
-
-$(Q)$(RM) $(@)
|
232
|
-
$(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
233
|
-
$(Q) test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' -f $@
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
$(OBJS): $(HDRS) $(ruby_headers)
|