sheltered-girl 4.0.7.7 → 4.0.7.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d856f063b698f1a7ee43bf86521d7b3e6fc17c6f955408ade26ab020cb81b7a6
4
- data.tar.gz: 80636ef9fe69cbdf2963f3322cb912768c36e4f741f5abcaa6f76e00175d5825
3
+ metadata.gz: 727a4239fefe6498b9ded4fc576dc25b467623b2741a27962f68c28ecfa68e20
4
+ data.tar.gz: 4000944b8ec3a27fce4a5fe2f6cde486749c422fb50d0ec528cb23decf7dc524
5
5
  SHA512:
6
- metadata.gz: cc62005a15686411b0009474f11c63992faac98fd4d4eb194dfd75a6f5bc9225b71a69bd34f82275a8151bcd6ddb01ddffd31fb9256e31b24d666bc7d85369c2
7
- data.tar.gz: 25b747a8facb6e6a422e0cf546a6539e5b3954beb077ad9da085932eda3e27749c87d9d9e1b053adc64a5122e80c4408a9daba147c3320f2cdff3789962bf03a
6
+ metadata.gz: 66e3b6821e1a580b455c0e6854d939e5eca50dc01994f30c6b3d2f50dc9e5afa1bbc00b1347c9c983f6767b571c0093bb3410f93a578f452f30076afe191211a
7
+ data.tar.gz: a83018c40ec4c87ae44d9f734d73189af94593f85aea050608d429bfc2e75ca6103c263ba66e53c188bf4367bcec615fa8b0a844011548304310f78a5afb0dbf
data/.gitignore CHANGED
@@ -1,4 +1,11 @@
1
- /coverage
1
+ # Ignore, RubyMine
2
2
  .idea/*
3
+
4
+ # Ignore, Gemfile.lock
3
5
  Gemfile.lock
4
- zinbeijett-*.gem
6
+
7
+ # Ignore, sheltered-girl-*.gem
8
+ sheltered-girl-*.gem
9
+
10
+ # Ignore.
11
+ coverage/*
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # source 'https://rubygems.org'
3
+ # source 'https://rubygems.org'
data/bin/aqua CHANGED
@@ -95,8 +95,8 @@ class EngineLeft
95
95
  puts ' Feed End '.center(60, '-')
96
96
  end
97
97
 
98
- def self.not_found
99
- puts '❎️ No function has been assigned.'
98
+ def self.himekuri2_run
99
+ require 'himekuri2'
100
100
  end
101
101
 
102
102
  def self.version_info
@@ -185,7 +185,7 @@ begin
185
185
  elsif one.match?(a)
186
186
  EngineLeft.search_txi
187
187
  elsif one.match?(b)
188
- EngineLeft.not_found
188
+ EngineLeft.himekuri2_run
189
189
  elsif one.match?(c)
190
190
  EngineLeft.calendar_view
191
191
  elsif one.match?(d)
@@ -237,8 +237,9 @@ begin
237
237
  end
238
238
  rescue Exception => e
239
239
  puts e.backtrace
240
+ tanraku_execute
240
241
  ensure
241
- GC.compact
242
+ GC.auto_compact
242
243
  end
243
244
 
244
245
  __END__
data/bin/sheltered-girl CHANGED
@@ -194,7 +194,7 @@ module Sheltered_girl
194
194
  AND Search.
195
195
 
196
196
  $ aqua -b
197
- ❎️ No function has been assigned.
197
+ Using rubygems/rice, Transplant himekuri2 function.
198
198
 
199
199
  $ aqua -c
200
200
  Calendar views. Today now.
data/lib/Makefile ADDED
@@ -0,0 +1,273 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ V0 = $(V:0=)
7
+ Q1 = $(V:1=)
8
+ Q = $(Q1:0=@)
9
+ ECHO1 = $(V:1=@ :)
10
+ ECHO = $(ECHO1:0=@ echo)
11
+ NULLCMD = :
12
+
13
+ #### Start of system configuration section. ####
14
+
15
+ srcdir = .
16
+ topdir = /home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0
17
+ hdrdir = $(topdir)
18
+ arch_hdrdir = /home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/x86_64-linux
19
+ PATH_SEPARATOR = :
20
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
21
+ prefix = $(DESTDIR)/home/takkii/.anyenv/envs/rbenv/versions/4.0.3
22
+ rubysitearchprefix = $(rubylibprefix)/$(sitearch)
23
+ rubyarchprefix = $(rubylibprefix)/$(arch)
24
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
25
+ exec_prefix = $(prefix)
26
+ vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
27
+ sitearchhdrdir = $(sitehdrdir)/$(sitearch)
28
+ rubyarchhdrdir = $(rubyhdrdir)/$(arch)
29
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
30
+ sitehdrdir = $(rubyhdrdir)/site_ruby
31
+ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
32
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
33
+ vendorlibdir = $(vendordir)/$(ruby_version)
34
+ vendordir = $(rubylibprefix)/vendor_ruby
35
+ sitearchdir = $(sitelibdir)/$(sitearch)
36
+ sitelibdir = $(sitedir)/$(ruby_version)
37
+ sitedir = $(rubylibprefix)/site_ruby
38
+ rubyarchdir = $(rubylibdir)/$(arch)
39
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
40
+ sitearchincludedir = $(includedir)/$(sitearch)
41
+ archincludedir = $(includedir)/$(arch)
42
+ sitearchlibdir = $(libdir)/$(sitearch)
43
+ archlibdir = $(libdir)/$(arch)
44
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
45
+ modular_gc_dir = $(DESTDIR)
46
+ mandir = $(datarootdir)/man
47
+ localedir = $(datarootdir)/locale
48
+ libdir = $(exec_prefix)/lib
49
+ psdir = $(docdir)
50
+ pdfdir = $(docdir)
51
+ dvidir = $(docdir)
52
+ htmldir = $(docdir)
53
+ infodir = $(datarootdir)/info
54
+ docdir = $(datarootdir)/doc/$(PACKAGE)
55
+ oldincludedir = $(DESTDIR)/usr/include
56
+ includedir = $(prefix)/include
57
+ runstatedir = $(localstatedir)/run
58
+ localstatedir = $(prefix)/var
59
+ sharedstatedir = $(prefix)/com
60
+ sysconfdir = $(prefix)/etc
61
+ datadir = $(datarootdir)
62
+ datarootdir = $(prefix)/share
63
+ libexecdir = $(exec_prefix)/libexec
64
+ sbindir = $(exec_prefix)/sbin
65
+ bindir = $(exec_prefix)/bin
66
+ archdir = $(rubyarchdir)
67
+
68
+
69
+ CC_WRAPPER =
70
+ CC = gcc
71
+ CXX = g++
72
+ LIBRUBY = $(LIBRUBY_SO)
73
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
74
+ LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
75
+ LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS)
76
+ empty =
77
+ OUTFLAG = -o $(empty)
78
+ COUTFLAG = -o $(empty)
79
+ CSRCFLAG = $(empty)
80
+
81
+ RUBY_EXTCONF_H =
82
+ cflags = $(hardenflags) $(optflags) $(debugflags) $(warnflags)
83
+ cxxflags =
84
+ optflags = -O3 -fno-fast-math
85
+ debugflags = -ggdb3
86
+ warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wmisleading-indentation -Wundef
87
+ cppflags =
88
+ CCDLFLAGS = -fPIC
89
+ CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
90
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib/ruby/gems/4.0.0/gems/rice-4.12.0/include
91
+ DEFS =
92
+ CPPFLAGS = $(DEFS) $(cppflags)
93
+ CXXFLAGS = $(CCDLFLAGS) -DRICE_VERSION_MAJOR=4 -DRICE_VERSION_MINOR=12 -DRICE_VERSION_PATCH=0 -std=c++17 -Wno-array-bounds $(ARCH_FLAG)
94
+ ldflags = -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
95
+ dldflags = -Wl,--compress-debug-sections=zlib
96
+ ARCH_FLAG =
97
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
98
+ LDSHARED = $(CC) -shared
99
+ LDSHAREDXX = $(CXX) -shared
100
+ POSTLINK = :
101
+ AR = gcc-ar
102
+ LD = ld
103
+ EXEEXT =
104
+
105
+ RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
106
+ RUBY_SO_NAME = ruby
107
+ RUBYW_INSTALL_NAME =
108
+ RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
109
+ RUBYW_BASE_NAME = rubyw
110
+ RUBY_BASE_NAME = ruby
111
+
112
+ arch = x86_64-linux
113
+ sitearch = $(arch)
114
+ ruby_version = 4.0.0
115
+ ruby = $(bindir)/$(RUBY_BASE_NAME)
116
+ RUBY = $(ruby)
117
+ BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
118
+ ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
119
+
120
+ RM = rm -f
121
+ RM_RF = rm -fr
122
+ RMDIRS = rmdir --ignore-fail-on-non-empty -p
123
+ MAKEDIRS = /usr/bin/mkdir -p
124
+ INSTALL = /usr/bin/install -c
125
+ INSTALL_PROG = $(INSTALL) -m 0755
126
+ INSTALL_DATA = $(INSTALL) -m 644
127
+ COPY = cp
128
+ TOUCH = exit >
129
+
130
+ #### End of system configuration section. ####
131
+
132
+ preload =
133
+ libpath = . $(libdir)
134
+ LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
135
+ DEFFILE =
136
+
137
+ CLEANFILES = mkmf.log
138
+ DISTCLEANFILES =
139
+ DISTCLEANDIRS =
140
+
141
+ extout =
142
+ extout_prefix =
143
+ target_prefix =
144
+ LOCAL_LIBS =
145
+ LIBS = $(LIBRUBYARG_SHARED) -lstdc++fs -lm -lpthread -lc
146
+ ORIG_SRCS = himekuri.cpp
147
+ SRCS = $(ORIG_SRCS)
148
+ OBJS = himekuri.o
149
+ HDRS = $(srcdir)/all.h
150
+ LOCAL_HDRS =
151
+ TARGET = himekuri
152
+ TARGET_NAME = himekuri
153
+ TARGET_ENTRY = Init_$(TARGET_NAME)
154
+ DLLIB = $(TARGET).so
155
+ EXTSTATIC =
156
+ STATIC_LIB =
157
+
158
+ TIMESTAMP_DIR = .
159
+ BINDIR = $(bindir)
160
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
161
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
162
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
163
+ HDRDIR = $(sitehdrdir)$(target_prefix)
164
+ ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix)
165
+ TARGET_SO_DIR =
166
+ TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
167
+ CLEANLIBS = $(TARGET_SO)
168
+ CLEANOBJS = $(OBJS) *.bak
169
+ TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time
170
+
171
+ all: $(DLLIB)
172
+ static: $(STATIC_LIB)
173
+ .PHONY: all install static install-so install-rb
174
+ .PHONY: clean clean-so clean-static clean-rb
175
+
176
+ clean-static::
177
+ clean-rb-default::
178
+ clean-rb::
179
+ clean-so::
180
+ clean: clean-so clean-static clean-rb-default clean-rb
181
+ -$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
182
+
183
+ distclean-rb-default::
184
+ distclean-rb::
185
+ distclean-so::
186
+ distclean-static::
187
+ distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
188
+ -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
189
+ -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
190
+ -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
191
+
192
+ realclean: distclean
193
+ install: install-so install-rb
194
+
195
+ install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
196
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
197
+ clean-static::
198
+ -$(Q)$(RM) $(STATIC_LIB)
199
+ install-rb: pre-install-rb do-install-rb install-rb-default
200
+ install-rb-default: pre-install-rb-default do-install-rb-default
201
+ pre-install-rb: Makefile
202
+ pre-install-rb-default: Makefile
203
+ do-install-rb:
204
+ do-install-rb-default:
205
+ pre-install-rb-default:
206
+ @$(NULLCMD)
207
+ $(TARGET_SO_DIR_TIMESTAMP):
208
+ $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
209
+ $(Q) $(TOUCH) $@
210
+
211
+ site-install: site-install-so site-install-rb
212
+ site-install-so: install-so
213
+ site-install-rb: install-rb
214
+
215
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
216
+
217
+ .cc.o:
218
+ $(ECHO) compiling $(<)
219
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
220
+
221
+ .cc.S:
222
+ $(ECHO) translating $(<)
223
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
224
+
225
+ .mm.o:
226
+ $(ECHO) compiling $(<)
227
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
228
+
229
+ .mm.S:
230
+ $(ECHO) translating $(<)
231
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
232
+
233
+ .cxx.o:
234
+ $(ECHO) compiling $(<)
235
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
236
+
237
+ .cxx.S:
238
+ $(ECHO) translating $(<)
239
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
240
+
241
+ .cpp.o:
242
+ $(ECHO) compiling $(<)
243
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
244
+
245
+ .cpp.S:
246
+ $(ECHO) translating $(<)
247
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
248
+
249
+ .c.o:
250
+ $(ECHO) compiling $(<)
251
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
252
+
253
+ .c.S:
254
+ $(ECHO) translating $(<)
255
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
256
+
257
+ .m.o:
258
+ $(ECHO) compiling $(<)
259
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
260
+
261
+ .m.S:
262
+ $(ECHO) translating $(<)
263
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
264
+
265
+ $(TARGET_SO): $(OBJS) Makefile
266
+ $(ECHO) linking shared-object $(DLLIB)
267
+ -$(Q)$(RM) $(@)
268
+ $(Q) $(LDSHAREDXX) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
269
+ $(Q) $(POSTLINK)
270
+
271
+
272
+
273
+ $(OBJS): $(HDRS) $(ruby_headers)
data/lib/all.h ADDED
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Copyright © 2020 Takayuki, Kamiyama
3
+ */
4
+
5
+ /*
6
+ * File: all.h
7
+ * Author: Takayuki, Kamiyama
8
+ *
9
+ * Created on 2020年7月10日, 12:02
10
+ */
11
+
12
+ #pragma once
13
+
14
+ #include <cstddef>
15
+ #include <limits>
16
+ #include <climits>
17
+ #include <cfloat>
18
+ #include <cstdint>
19
+ #include <cstdlib>
20
+ #include <new>
21
+ #include <typeinfo>
22
+ #include <exception>
23
+ #include <initializer_list>
24
+ #include <stdexcept>
25
+ #include <cassert>
26
+ #include <cerrno>
27
+ #include <system_error>
28
+ #include <string>
29
+
30
+ #if __has_include(<string_view>)
31
+ #include <string_view>
32
+ #endif
33
+
34
+ #include <array>
35
+ #include <deque>
36
+ #include <forward_list>
37
+ #include <list>
38
+ #include <vector>
39
+ #include <map>
40
+ #include <set>
41
+ #include <unordered_map>
42
+ #include <unordered_set>
43
+ #include <queue>
44
+ #include <stack>
45
+ #include <iterator>
46
+ #include <algorithm>
47
+ #include <cfenv>
48
+ #include <random>
49
+ #include <numeric>
50
+ #include <cmath>
51
+ #include <iosfwd>
52
+ #include <iostream>
53
+ #include <ios>
54
+ #include <streambuf>
55
+ #include <istream>
56
+ #include <ostream>
57
+ #include <iomanip>
58
+ #include <sstream>
59
+ #include <fstream>
60
+
61
+ #if __has_include(<filesystem>)
62
+ #include <filesystem>
63
+ #endif
64
+
65
+ #include <cstdio>
66
+ #include <cinttypes>
67
+ #include <regex>
68
+ #include <atomic>
69
+ #include <thread>
70
+ #include <mutex>
71
+ #include <shared_mutex>
72
+ #include <condition_variable>
73
+ #include <future>
74
+
75
+ // rice extensions
76
+ #include <rice/rice.hpp>
77
+ using namespace Rice;
78
+
79
+ // using namespace std::literals;
80
+ using namespace std;
data/lib/extconf.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'mkmf-rice'
2
+
3
+ create_makefile('himekuri')
data/lib/himekuri.cpp ADDED
@@ -0,0 +1,133 @@
1
+ #include <all.h>
2
+
3
+ namespace Rice::detail {
4
+ class Himekuri {
5
+ public:
6
+ Himekuri() {};
7
+ void cal() {
8
+ try
9
+ {
10
+ time_t now = time(nullptr);
11
+ const tm* nowlt = localtime(&now);
12
+
13
+ stringstream x;
14
+ x<<"R0";
15
+ x<<nowlt->tm_year-118;
16
+ x<<".";
17
+ x<<nowlt->tm_mon+1;
18
+ x<<".";
19
+ x<<nowlt->tm_mday;
20
+
21
+ string result_r = x.str();
22
+
23
+ stringstream y;
24
+ y<<"令和";
25
+ y<<nowlt->tm_year-118;
26
+ y<<"年";
27
+ y<<nowlt->tm_mon+1;
28
+ y<<"月";
29
+ y<<nowlt->tm_mday;
30
+ y<<"日";
31
+
32
+ string result_reiwa = y.str();
33
+
34
+
35
+ stringstream z;
36
+ z<<"20";
37
+ z<<nowlt->tm_year-100;
38
+ z<<"年";
39
+ z<<nowlt->tm_mon+1;
40
+ z<<"月";
41
+ z<<nowlt->tm_mday;
42
+ z<<"日" << " : ";
43
+ z<<nowlt->tm_hour;
44
+ z<<"時";
45
+ z<<nowlt->tm_min;
46
+ z<<"分";
47
+ z<<nowlt->tm_sec;
48
+ z<<"秒";
49
+
50
+ string result = z.str();
51
+
52
+ // OneYear → 365 days.
53
+ int OneYear_Days = 365;
54
+
55
+ int redays = nowlt->tm_yday;
56
+ int redays_mini = OneYear_Days - redays;
57
+
58
+ string tim = "時刻を表示";
59
+ string gantan = "来年の1月1日まであと";
60
+ string aisatu = " 日です";
61
+ string number = "日めくり数え番号";
62
+ string week = "曜日";
63
+
64
+ // week Sun ~ Sat
65
+ time_t timer;
66
+ struct tm *t_st;
67
+ const char *wday[] = {"日", "月", "火", "水", "木", "金", "土"};
68
+
69
+ // Month 和風月
70
+ const char* wmonth[] = { "睦月", "如月", "弥生", "卯月", "皐月", "水無月", "文月", "葉月", "長月", "神無月", "霜月", "師走"
71
+ };
72
+
73
+ time(&timer);
74
+ t_st = localtime(&timer);
75
+
76
+ stringstream ss;
77
+ stringstream ssd;
78
+
79
+ // version number
80
+ ss << 1;
81
+ ssd << 2;
82
+ string str_num = ss.str();
83
+ string str_dd = ssd.str();
84
+ string comma = " : ";
85
+
86
+ // version number comma
87
+ string number_comma = ".1.";
88
+
89
+ string himekuri = number + comma + str_num + number_comma + str_dd;
90
+
91
+ cout << tim << comma << result << comma << wday[t_st->tm_wday] << week << comma << wmonth[t_st->tm_mon] << endl;
92
+
93
+ cout << gantan << comma << redays_mini << aisatu << endl;
94
+ cout << result_reiwa << comma << result_r << endl;
95
+ cout << himekuri << endl;
96
+
97
+ // C++ version info.
98
+ long cpp17 = 201703L;
99
+ long cpp14 = 201402L;
100
+ long cpp11 = 201103L;
101
+ long cpp98 = 199711L;
102
+
103
+ // long type → string type.
104
+ string cpp_ver = to_string(__cplusplus);
105
+
106
+ if (cpp_ver.compare(to_string(cpp17)) == 0)
107
+ cout << "現在の C++ : C++17" << endl;
108
+ else if (cpp_ver.compare(to_string(cpp14)) == 0)
109
+ cout << "現在の C++ : C++14" << endl;
110
+ else if (cpp_ver.compare(to_string(cpp11)) == 0)
111
+ cout << "現在の C++ : C++11" << endl;
112
+ else if (cpp_ver.compare(to_string(cpp98)) == 0)
113
+ cout << "現在の C++ : C++98" << endl;
114
+ else
115
+ cout << "現在の C++ : pre-standard C++" << endl;
116
+
117
+ } catch (runtime_error& e) {
118
+ cout << "runtime error : " << e.what() << endl;
119
+ } catch (const exception& e) {
120
+ cout << "some exception : " << e.what() << endl;
121
+ }
122
+ exit(0);
123
+ }
124
+ };
125
+
126
+ extern "C" {
127
+ void Init_himekuri() {
128
+ Data_Type<Himekuri> rb_cHimekuri = define_class<Himekuri>("Himekuri")
129
+ .define_constructor(Constructor<Himekuri>())
130
+ .define_method("cal", &Himekuri::cal);
131
+ }
132
+ }
133
+ }
data/lib/himekuri.o ADDED
Binary file
data/lib/himekuri.so ADDED
Binary file
data/lib/himekuri2.rb ADDED
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+ require 'rbconfig'
7
+ require 'tanraku'
8
+
9
+ begin
10
+ host_os = RbConfig::CONFIG['host_os']
11
+ case host_os
12
+ when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
13
+ begin
14
+ exec("#{File.dirname(__FILE__) + '/himekuri2_win.exe'}")
15
+ rescue Exception => e
16
+ puts e.backtrace
17
+ end
18
+ when /darwin|mac os/
19
+ require 'himekuri.o'
20
+ Himekuri.new.cal
21
+ when /linux/
22
+ require 'himekuri.o'
23
+ Himekuri.new.cal
24
+ end
25
+ rescue StandardError => e
26
+ puts e.printStackTrace
27
+ tanraku_execute
28
+ rescue Exception => e
29
+ puts e.printStackTrace
30
+ tanraku_execute
31
+ ensure
32
+ GC.auto_compact
33
+ end
Binary file
data/lib/mkmf.log ADDED
@@ -0,0 +1,59 @@
1
+ find_header: checking for rice/rice.hpp in /home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib/ruby/gems/4.0.0/gems/rice-4.12.0/include... -------------------- yes
2
+
3
+ LD_LIBRARY_PATH=.:/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib LSAN_OPTIONS=detect_leaks=0 "g++ -o conftest -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/x86_64-linux -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/ruby/backward -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0 -I. conftest.cc -L. -L/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -Wl,-rpath,/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -L/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -lruby -lm -lpthread -lc"
4
+ checked program was:
5
+ /* begin */
6
+ 1: #include "ruby.h"
7
+ 2:
8
+ 3: int main(int argc, char **argv)
9
+ 4: {
10
+ 5: return !!argv[argc];
11
+ 6: }
12
+ /* end */
13
+
14
+ LD_LIBRARY_PATH=.:/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib LSAN_OPTIONS=detect_leaks=0 "g++ -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/x86_64-linux -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/ruby/backward -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0 -I. -DRICE_VERSION_MAJOR=4 -DRICE_VERSION_MINOR=12 -DRICE_VERSION_PATCH=0 -std=c++17 -Wno-array-bounds -c conftest.cc"
15
+ conftest.cc:3:10: 致命的エラー: rice/rice.hpp: そのようなファイルやディレクトリはありません
16
+ 3 | #include <rice/rice.hpp>
17
+ | ^~~~~~~~~~~~~~~
18
+ コンパイルを停止しました。
19
+ checked program was:
20
+ /* begin */
21
+ 1: #include "ruby.h"
22
+ 2:
23
+ 3: #include <rice/rice.hpp>
24
+ /* end */
25
+
26
+ LD_LIBRARY_PATH=.:/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib LSAN_OPTIONS=detect_leaks=0 "g++ -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/x86_64-linux -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/ruby/backward -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0 -I. -DRICE_VERSION_MAJOR=4 -DRICE_VERSION_MINOR=12 -DRICE_VERSION_PATCH=0 -std=c++17 -Wno-array-bounds -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib/ruby/gems/4.0.0/gems/rice-4.12.0/include -c conftest.cc"
27
+ checked program was:
28
+ /* begin */
29
+ 1: #include "ruby.h"
30
+ 2:
31
+ 3: #include <rice/rice.hpp>
32
+ /* end */
33
+
34
+ --------------------
35
+
36
+ have_library: checking for -lstdc++fs... -------------------- yes
37
+
38
+ LD_LIBRARY_PATH=.:/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib LSAN_OPTIONS=detect_leaks=0 "g++ -o conftest -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/x86_64-linux -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0/ruby/backward -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/include/ruby-4.0.0 -I. -I/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib/ruby/gems/4.0.0/gems/rice-4.12.0/include conftest.cc -L. -L/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -Wl,-rpath,/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -L/home/takkii/.anyenv/envs/rbenv/versions/4.0.3/lib -lruby -lstdc++fs -lm -lpthread -lc"
39
+ checked program was:
40
+ /* begin */
41
+ 1: #include "ruby.h"
42
+ 2:
43
+ 3: /*top*/
44
+ 4: extern int t(void);
45
+ 5: int main(int argc, char **argv)
46
+ 6: {
47
+ 7: if (argc > 1000000) {
48
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
49
+ 9: printf("%d", (*tp)());
50
+ 10: }
51
+ 11:
52
+ 12: return !!argv[argc];
53
+ 13: }
54
+ 14:
55
+ 15: int t(void) { ; return 0; }
56
+ /* end */
57
+
58
+ --------------------
59
+
data/lib/version.rb CHANGED
@@ -6,7 +6,7 @@ require 'tanraku'
6
6
  class EngineLeft
7
7
  def self.version
8
8
  # 'x.x.x.x'.to_s < '5.x.x.x'.to_s
9
- '4.0.7.7'.to_s
9
+ '4.0.7.8'.to_s
10
10
  end
11
11
  end
12
12
 
data/runner/full.rb CHANGED
@@ -22,9 +22,15 @@ class MiniTestFile
22
22
  # Don't have Macintosh PC.
23
23
  when /linux/
24
24
  begin
25
- # FullW, Switch ON / (true, string, string).
26
- @mini_test = FullW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_test')
27
- @mini_unit = FullW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_unit')
25
+ if Dir.exist?('/mnt/c/Users/sudok')
26
+ # FullW, Switch ON / (true, string, string).
27
+ @mini_test = FullW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_test')
28
+ @mini_unit = FullW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_unit')
29
+ else
30
+ # FullW, Switch ON / (true, string, string) for Ubuntu Other Linux Kernel.
31
+ @mini_test = FullW(true, '/home/takkii', '/GitHub/sheltered-girl/mini_test')
32
+ @mini_unit = FullW(true, '/home/takkii', '/GitHub/sheltered-girl/mini_unit')
33
+ end
28
34
  rescue
29
35
  tanraku_execute
30
36
  end
@@ -51,7 +57,7 @@ rescue
51
57
  puts 'Tanraku_VERSION: '.to_s + Tanraku::VERSION
52
58
  tanraku_execute
53
59
  ensure
54
- GC.compact
60
+ GC.auto_compact
55
61
  end
56
62
 
57
63
  __END__
data/runner/mini.rb CHANGED
@@ -18,13 +18,17 @@ class MiniTestFile
18
18
  rescue
19
19
  tanraku_execute
20
20
  end
21
- when /darwin|mac os/
22
- # Don't have Macintosh PC.
23
21
  when /linux/
24
22
  begin
25
- # MiniW, Switch ON / (true, string, string).
26
- @mini_test = MiniW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_test')
27
- @mini_unit = MiniW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_unit')
23
+ if Dir.exist?('/mnt/c/Users/sudok')
24
+ # MiniW, Switch ON / (true, string, string).
25
+ @mini_test = MiniW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_test')
26
+ @mini_unit = MiniW(true, '/mnt/c/Users/sudok', '/GitHub/sheltered-girl/mini_unit')
27
+ else
28
+ # MiniW, Switch ON / (true, string, string).
29
+ @mini_test = MiniW(true, '/home/takkii', '/GitHub/sheltered-girl/mini_test')
30
+ @mini_unit = MiniW(true, '/home/takkii', '/GitHub/sheltered-girl/mini_unit')
31
+ end
28
32
  rescue
29
33
  tanraku_execute
30
34
  end
@@ -51,7 +55,7 @@ rescue
51
55
  puts 'Tanraku_VERSION: '.to_s + Tanraku::VERSION
52
56
  tanraku_execute
53
57
  ensure
54
- GC.compact
58
+ GC.auto_compact
55
59
  end
56
60
 
57
61
  __END__
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.add_runtime_dependency('simplecov', '~> 0.22')
40
40
  s.add_runtime_dependency('rinku', '~> 2.0')
41
41
  s.add_runtime_dependency('sanitize', '~> 7.0')
42
+ s.add_runtime_dependency('rice', '~> 4.12')
42
43
 
43
44
  if s.respond_to? :specification_version
44
45
  s.specification_version = 4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sheltered-girl
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.7.7
4
+ version: 4.0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takayuki Kamiyama
@@ -177,6 +177,20 @@ dependencies:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
179
  version: '7.0'
180
+ - !ruby/object:Gem::Dependency
181
+ name: rice
182
+ requirement: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: '4.12'
187
+ type: :runtime
188
+ prerelease: false
189
+ version_requirements: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: '4.12'
180
194
  description: 箱入り娘, All in One Packages.
181
195
  email: karuma.reason@gmail.com
182
196
  executables:
@@ -214,6 +228,8 @@ files:
214
228
  - bin/tenji_log
215
229
  - bin/tweet
216
230
  - images/nyasocom_two.gif
231
+ - lib/Makefile
232
+ - lib/all.h
217
233
  - lib/all.rb
218
234
  - lib/all_log.rb
219
235
  - lib/and.rb
@@ -226,11 +242,17 @@ files:
226
242
  - lib/decript.rb
227
243
  - lib/druby_erb.rb
228
244
  - lib/druby_reci.rb
245
+ - lib/extconf.rb
229
246
  - lib/feed.rb
230
247
  - lib/frame.rb
231
248
  - lib/frame_version.rb
232
249
  - lib/gc.rb
250
+ - lib/himekuri.cpp
251
+ - lib/himekuri.o
233
252
  - lib/himekuri.rb
253
+ - lib/himekuri.so
254
+ - lib/himekuri2.rb
255
+ - lib/himekuri2_win.exe
234
256
  - lib/himekuri_version.rb
235
257
  - lib/hyaku.rb
236
258
  - lib/install.rb
@@ -241,6 +263,7 @@ files:
241
263
  - lib/mini.rb
242
264
  - lib/minitest/full_runner.rb
243
265
  - lib/minitest/runner.rb
266
+ - lib/mkmf.log
244
267
  - lib/not.rb
245
268
  - lib/or.rb
246
269
  - lib/require_sec_seiki.rb