├── .gitignore ├── .gitmodules ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── app ├── .gitignore ├── CMakeLists.txt ├── build.gradle ├── include │ └── duktape │ │ ├── duk_config.h │ │ └── duktape.h ├── libs │ └── lib-badge.aar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── cn │ │ └── gen │ │ └── gsv2 │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── resources │ │ │ └── ruby │ │ │ └── t_root │ │ │ ├── aes.js │ │ │ ├── cipher-core.js │ │ │ ├── config.rb │ │ │ ├── core.js │ │ │ ├── crypto.js │ │ │ ├── enc-base64.js │ │ │ ├── library.rb │ │ │ ├── reader.rb │ │ │ ├── settings.rb │ │ │ └── types.json │ ├── cpp │ │ ├── duktape │ │ │ ├── duk_config.h │ │ │ ├── duktape.c │ │ │ └── duktape.h │ │ ├── gumbo-query │ │ │ ├── Document.cpp │ │ │ ├── Document.h │ │ │ ├── Node.cpp │ │ │ ├── Node.h │ │ │ ├── Object.cpp │ │ │ ├── Object.h │ │ │ ├── Parser.cpp │ │ │ ├── Parser.h │ │ │ ├── QueryUtil.cpp │ │ │ ├── QueryUtil.h │ │ │ ├── Selection.cpp │ │ │ ├── Selection.h │ │ │ ├── Selector.cpp │ │ │ └── Selector.h │ │ ├── gumbo │ │ │ ├── attribute.c │ │ │ ├── attribute.h │ │ │ ├── char_ref.c │ │ │ ├── char_ref.h │ │ │ ├── error.c │ │ │ ├── error.h │ │ │ ├── gumbo.h │ │ │ ├── insertion_mode.h │ │ │ ├── parser.c │ │ │ ├── parser.h │ │ │ ├── string_buffer.c │ │ │ ├── string_buffer.h │ │ │ ├── string_piece.c │ │ │ ├── string_piece.h │ │ │ ├── tag.c │ │ │ ├── tag_enum.h │ │ │ ├── tag_gperf.h │ │ │ ├── tag_sizes.h │ │ │ ├── tag_strings.h │ │ │ ├── token_type.h │ │ │ ├── tokenizer.c │ │ │ ├── tokenizer.h │ │ │ ├── tokenizer_states.h │ │ │ ├── utf8.c │ │ │ ├── utf8.h │ │ │ ├── util.c │ │ │ ├── util.h │ │ │ ├── vector.c │ │ │ └── vector.h │ │ ├── iconv │ │ │ ├── aliases.h │ │ │ ├── aliases2.h │ │ │ ├── aliases_aix.h │ │ │ ├── aliases_aix_sysaix.h │ │ │ ├── aliases_dos.h │ │ │ ├── aliases_extra.h │ │ │ ├── aliases_osf1.h │ │ │ ├── aliases_osf1_sysosf1.h │ │ │ ├── aliases_sysaix.h │ │ │ ├── aliases_syshpux.h │ │ │ ├── aliases_sysosf1.h │ │ │ ├── aliases_syssolaris.h │ │ │ ├── alloca.h │ │ │ ├── alloca.in.h │ │ │ ├── allocator.c │ │ │ ├── allocator.h │ │ │ ├── areadlink.c │ │ │ ├── areadlink.h │ │ │ ├── arg-nonnull.h │ │ │ ├── armscii_8.h │ │ │ ├── ascii.h │ │ │ ├── atarist.h │ │ │ ├── basename-lgpl.c │ │ │ ├── big5.h │ │ │ ├── big5_2003.h │ │ │ ├── big5hkscs1999.h │ │ │ ├── big5hkscs2001.h │ │ │ ├── big5hkscs2004.h │ │ │ ├── big5hkscs2008.h │ │ │ ├── binary-io.c │ │ │ ├── binary-io.h │ │ │ ├── c++defs.h │ │ │ ├── c-ctype.c │ │ │ ├── c-ctype.h │ │ │ ├── c99.h │ │ │ ├── canonical.h │ │ │ ├── canonical_aix.h │ │ │ ├── canonical_aix_sysaix.h │ │ │ ├── canonical_dos.h │ │ │ ├── canonical_extra.h │ │ │ ├── canonical_local.h │ │ │ ├── canonical_local_sysaix.h │ │ │ ├── canonical_local_syshpux.h │ │ │ ├── canonical_local_sysosf1.h │ │ │ ├── canonical_local_syssolaris.h │ │ │ ├── canonical_osf1.h │ │ │ ├── canonical_osf1_sysosf1.h │ │ │ ├── canonical_sysaix.h │ │ │ ├── canonical_syshpux.h │ │ │ ├── canonical_sysosf1.h │ │ │ ├── canonical_syssolaris.h │ │ │ ├── careadlinkat.c │ │ │ ├── careadlinkat.h │ │ │ ├── ces_big5.h │ │ │ ├── ces_gbk.h │ │ │ ├── cjk_variants.h │ │ │ ├── cns11643.h │ │ │ ├── cns11643_1.h │ │ │ ├── cns11643_15.h │ │ │ ├── cns11643_2.h │ │ │ ├── cns11643_3.h │ │ │ ├── cns11643_4.h │ │ │ ├── cns11643_4a.h │ │ │ ├── cns11643_4b.h │ │ │ ├── cns11643_5.h │ │ │ ├── cns11643_6.h │ │ │ ├── cns11643_7.h │ │ │ ├── cns11643_inv.h │ │ │ ├── config.h │ │ │ ├── converters.h │ │ │ ├── cp1046.h │ │ │ ├── cp1124.h │ │ │ ├── cp1125.h │ │ │ ├── cp1129.h │ │ │ ├── cp1131.h │ │ │ ├── cp1133.h │ │ │ ├── cp1161.h │ │ │ ├── cp1162.h │ │ │ ├── cp1163.h │ │ │ ├── cp1250.h │ │ │ ├── cp1251.h │ │ │ ├── cp1252.h │ │ │ ├── cp1253.h │ │ │ ├── cp1254.h │ │ │ ├── cp1255.h │ │ │ ├── cp1256.h │ │ │ ├── cp1257.h │ │ │ ├── cp1258.h │ │ │ ├── cp437.h │ │ │ ├── cp50221_0208_ext.h │ │ │ ├── cp50221_0212_ext.h │ │ │ ├── cp737.h │ │ │ ├── cp775.h │ │ │ ├── cp850.h │ │ │ ├── cp852.h │ │ │ ├── cp853.h │ │ │ ├── cp855.h │ │ │ ├── cp856.h │ │ │ ├── cp857.h │ │ │ ├── cp858.h │ │ │ ├── cp860.h │ │ │ ├── cp861.h │ │ │ ├── cp862.h │ │ │ ├── cp863.h │ │ │ ├── cp864.h │ │ │ ├── cp865.h │ │ │ ├── cp866.h │ │ │ ├── cp869.h │ │ │ ├── cp874.h │ │ │ ├── cp922.h │ │ │ ├── cp932.h │ │ │ ├── cp932ext.h │ │ │ ├── cp936.h │ │ │ ├── cp936ext.h │ │ │ ├── cp943.h │ │ │ ├── cp949.h │ │ │ ├── cp950.h │ │ │ ├── cp950ext.h │ │ │ ├── dec_hanyu.h │ │ │ ├── dec_kanji.h │ │ │ ├── dirname-lgpl.c │ │ │ ├── dirname.h │ │ │ ├── dosname.h │ │ │ ├── encodings.def │ │ │ ├── encodings_aix.def │ │ │ ├── encodings_dos.def │ │ │ ├── encodings_extra.def │ │ │ ├── encodings_local.def │ │ │ ├── encodings_osf1.def │ │ │ ├── errno.in.h │ │ │ ├── error.c │ │ │ ├── error.h │ │ │ ├── euc_cn.h │ │ │ ├── euc_jisx0213.h │ │ │ ├── euc_jp.h │ │ │ ├── euc_kr.h │ │ │ ├── euc_tw.h │ │ │ ├── fcntl.h │ │ │ ├── fcntl.in.h │ │ │ ├── flags.h │ │ │ ├── flushwc.h │ │ │ ├── gb12345.h │ │ │ ├── gb12345ext.h │ │ │ ├── gb18030.h │ │ │ ├── gb18030ext.h │ │ │ ├── gb18030uni.h │ │ │ ├── gb2312.h │ │ │ ├── gbk.h │ │ │ ├── gbkext1.h │ │ │ ├── gbkext2.h │ │ │ ├── gbkext_inv.h │ │ │ ├── genaliases.c │ │ │ ├── genaliases2.c │ │ │ ├── genflags.c │ │ │ ├── gentranslit.c │ │ │ ├── georgian_academy.h │ │ │ ├── georgian_ps.h │ │ │ ├── getprogname.c │ │ │ ├── getprogname.h │ │ │ ├── gettext.h │ │ │ ├── hkscs1999.h │ │ │ ├── hkscs2001.h │ │ │ ├── hkscs2004.h │ │ │ ├── hkscs2008.h │ │ │ ├── hp_roman8.h │ │ │ ├── hz.h │ │ │ ├── iconv.c │ │ │ ├── iconv_open1.h │ │ │ ├── iconv_open2.h │ │ │ ├── intprops.h │ │ │ ├── iso2022_cn.h │ │ │ ├── iso2022_cnext.h │ │ │ ├── iso2022_jp.h │ │ │ ├── iso2022_jp1.h │ │ │ ├── iso2022_jp2.h │ │ │ ├── iso2022_jp3.h │ │ │ ├── iso2022_jpms.h │ │ │ ├── iso2022_kr.h │ │ │ ├── iso646_cn.h │ │ │ ├── iso646_jp.h │ │ │ ├── iso8859_1.h │ │ │ ├── iso8859_10.h │ │ │ ├── iso8859_11.h │ │ │ ├── iso8859_13.h │ │ │ ├── iso8859_14.h │ │ │ ├── iso8859_15.h │ │ │ ├── iso8859_16.h │ │ │ ├── iso8859_2.h │ │ │ ├── iso8859_3.h │ │ │ ├── iso8859_4.h │ │ │ ├── iso8859_5.h │ │ │ ├── iso8859_6.h │ │ │ ├── iso8859_7.h │ │ │ ├── iso8859_8.h │ │ │ ├── iso8859_9.h │ │ │ ├── isoir165.h │ │ │ ├── isoir165ext.h │ │ │ ├── java.h │ │ │ ├── jisx0201.h │ │ │ ├── jisx0208.h │ │ │ ├── jisx0212.h │ │ │ ├── jisx0213.h │ │ │ ├── johab.h │ │ │ ├── johab_hangul.h │ │ │ ├── koi8_r.h │ │ │ ├── koi8_ru.h │ │ │ ├── koi8_t.h │ │ │ ├── koi8_u.h │ │ │ ├── ksc5601.h │ │ │ ├── libcharset.h │ │ │ ├── limits.h │ │ │ ├── limits.in.h │ │ │ ├── localcharset.c │ │ │ ├── localcharset.h │ │ │ ├── loop_unicode.h │ │ │ ├── loop_wchar.h │ │ │ ├── loops.h │ │ │ ├── lstat.c │ │ │ ├── mac_arabic.h │ │ │ ├── mac_centraleurope.h │ │ │ ├── mac_croatian.h │ │ │ ├── mac_cyrillic.h │ │ │ ├── mac_greek.h │ │ │ ├── mac_hebrew.h │ │ │ ├── mac_iceland.h │ │ │ ├── mac_roman.h │ │ │ ├── mac_romania.h │ │ │ ├── mac_thai.h │ │ │ ├── mac_turkish.h │ │ │ ├── mac_ukraine.h │ │ │ ├── malloc.c │ │ │ ├── malloca.c │ │ │ ├── malloca.h │ │ │ ├── msvc-inval.c │ │ │ ├── msvc-inval.h │ │ │ ├── msvc-nothrow.c │ │ │ ├── msvc-nothrow.h │ │ │ ├── mulelao.h │ │ │ ├── nextstep.h │ │ │ ├── pathmax.h │ │ │ ├── progname.c │ │ │ ├── progname.h │ │ │ ├── progreloc.c │ │ │ ├── pt154.h │ │ │ ├── raise.c │ │ │ ├── read.c │ │ │ ├── readlink.c │ │ │ ├── relocatable.c │ │ │ ├── relocatable.h │ │ │ ├── riscos1.h │ │ │ ├── rk1048.h │ │ │ ├── safe-read.c │ │ │ ├── safe-read.h │ │ │ ├── setenv.c │ │ │ ├── shift_jisx0213.h │ │ │ ├── signal.h │ │ │ ├── signal.in.h │ │ │ ├── sjis.h │ │ │ ├── stat.c │ │ │ ├── stdbool.in.h │ │ │ ├── stddef.in.h │ │ │ ├── stdint.h │ │ │ ├── stdint.in.h │ │ │ ├── stdio-write.c │ │ │ ├── stdio.h │ │ │ ├── stdio.in.h │ │ │ ├── stdlib.h │ │ │ ├── stdlib.in.h │ │ │ ├── streq.h │ │ │ ├── strerror-override.c │ │ │ ├── strerror-override.h │ │ │ ├── strerror.c │ │ │ ├── string.h │ │ │ ├── string.in.h │ │ │ ├── stripslash.c │ │ │ ├── sys │ │ │ │ ├── stat.h │ │ │ │ ├── time.h │ │ │ │ └── types.h │ │ │ ├── sys_stat.in.h │ │ │ ├── sys_time.in.h │ │ │ ├── sys_types.in.h │ │ │ ├── tcvn.h │ │ │ ├── tds565.h │ │ │ ├── time.h │ │ │ ├── time.in.h │ │ │ ├── tis620.h │ │ │ ├── translit.h │ │ │ ├── ucs2.h │ │ │ ├── ucs2be.h │ │ │ ├── ucs2internal.h │ │ │ ├── ucs2le.h │ │ │ ├── ucs2swapped.h │ │ │ ├── ucs4.h │ │ │ ├── ucs4be.h │ │ │ ├── ucs4internal.h │ │ │ ├── ucs4le.h │ │ │ ├── ucs4swapped.h │ │ │ ├── uhc_1.h │ │ │ ├── uhc_2.h │ │ │ ├── unistd.c │ │ │ ├── unistd.h │ │ │ ├── unistd.in.h │ │ │ ├── unitypes.h │ │ │ ├── unitypes.in.h │ │ │ ├── uniwidth.h │ │ │ ├── uniwidth.in.h │ │ │ ├── uniwidth │ │ │ │ ├── .dirstamp │ │ │ │ ├── cjk.h │ │ │ │ ├── width.c │ │ │ │ └── width.o │ │ │ ├── unlocked-io.h │ │ │ ├── utf16.h │ │ │ ├── utf16be.h │ │ │ ├── utf16le.h │ │ │ ├── utf32.h │ │ │ ├── utf32be.h │ │ │ ├── utf32le.h │ │ │ ├── utf7.h │ │ │ ├── utf8.h │ │ │ ├── verify.h │ │ │ ├── vietcomb.h │ │ │ ├── viscii.h │ │ │ ├── warn-on-use.h │ │ │ ├── xalloc-oversized.h │ │ │ ├── xalloc.h │ │ │ ├── xmalloc.c │ │ │ ├── xreadlink.c │ │ │ ├── xreadlink.h │ │ │ └── xstrdup.c │ │ ├── libxml2 │ │ │ ├── DOCBparser.c │ │ │ ├── HTMLparser.c │ │ │ ├── HTMLtree.c │ │ │ ├── SAX.c │ │ │ ├── SAX2.c │ │ │ ├── buf.c │ │ │ ├── buf.h │ │ │ ├── c14n.c │ │ │ ├── catalog.c │ │ │ ├── chvalid.c │ │ │ ├── config.h │ │ │ ├── debugXML.c │ │ │ ├── dict.c │ │ │ ├── elfgcchack.h │ │ │ ├── enc.h │ │ │ ├── encoding.c │ │ │ ├── entities.c │ │ │ ├── error.c │ │ │ ├── globals.c │ │ │ ├── hash.c │ │ │ ├── include │ │ │ │ ├── libxml │ │ │ │ │ ├── DOCBparser.h │ │ │ │ │ ├── HTMLparser.h │ │ │ │ │ ├── HTMLtree.h │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── SAX.h │ │ │ │ │ ├── SAX2.h │ │ │ │ │ ├── c14n.h │ │ │ │ │ ├── catalog.h │ │ │ │ │ ├── chvalid.h │ │ │ │ │ ├── debugXML.h │ │ │ │ │ ├── dict.h │ │ │ │ │ ├── encoding.h │ │ │ │ │ ├── entities.h │ │ │ │ │ ├── globals.h │ │ │ │ │ ├── hash.h │ │ │ │ │ ├── list.h │ │ │ │ │ ├── nanoftp.h │ │ │ │ │ ├── nanohttp.h │ │ │ │ │ ├── parser.h │ │ │ │ │ ├── parserInternals.h │ │ │ │ │ ├── pattern.h │ │ │ │ │ ├── relaxng.h │ │ │ │ │ ├── schemasInternals.h │ │ │ │ │ ├── schematron.h │ │ │ │ │ ├── threads.h │ │ │ │ │ ├── tree.h │ │ │ │ │ ├── uri.h │ │ │ │ │ ├── valid.h │ │ │ │ │ ├── xinclude.h │ │ │ │ │ ├── xlink.h │ │ │ │ │ ├── xmlIO.h │ │ │ │ │ ├── xmlautomata.h │ │ │ │ │ ├── xmlerror.h │ │ │ │ │ ├── xmlexports.h │ │ │ │ │ ├── xmlmemory.h │ │ │ │ │ ├── xmlmodule.h │ │ │ │ │ ├── xmlreader.h │ │ │ │ │ ├── xmlregexp.h │ │ │ │ │ ├── xmlsave.h │ │ │ │ │ ├── xmlschemas.h │ │ │ │ │ ├── xmlschemastypes.h │ │ │ │ │ ├── xmlstring.h │ │ │ │ │ ├── xmlunicode.h │ │ │ │ │ ├── xmlversion.h.in │ │ │ │ │ ├── xmlwin32version.h │ │ │ │ │ ├── xmlwin32version.h.in │ │ │ │ │ ├── xmlwriter.h │ │ │ │ │ ├── xpath.h │ │ │ │ │ ├── xpathInternals.h │ │ │ │ │ └── xpointer.h │ │ │ │ ├── win32config.h │ │ │ │ └── wsockcompat.h │ │ │ ├── legacy.c │ │ │ ├── libxml.h │ │ │ ├── list.c │ │ │ ├── nanoftp.c │ │ │ ├── nanohttp.c │ │ │ ├── parser.c │ │ │ ├── parserInternals.c │ │ │ ├── pattern.c │ │ │ ├── relaxng.c │ │ │ ├── rngparser.c │ │ │ ├── save.h │ │ │ ├── schematron.c │ │ │ ├── threads.c │ │ │ ├── timsort.h │ │ │ ├── tree.c │ │ │ ├── triodef.h │ │ │ ├── trionan.c │ │ │ ├── trionan.h │ │ │ ├── triop.h │ │ │ ├── triostr.c │ │ │ ├── triostr.h │ │ │ ├── uri.c │ │ │ ├── valid.c │ │ │ ├── xinclude.c │ │ │ ├── xlink.c │ │ │ ├── xmlIO.c │ │ │ ├── xmlcatalog.c │ │ │ ├── xmllint.c │ │ │ ├── xmlmemory.c │ │ │ ├── xmlmodule.c │ │ │ ├── xmlreader.c │ │ │ ├── xmlregexp.c │ │ │ ├── xmlsave.c │ │ │ ├── xmlschemas.c │ │ │ ├── xmlschemastypes.c │ │ │ ├── xmlstring.c │ │ │ ├── xmlunicode.c │ │ │ ├── xmlwriter.c │ │ │ ├── xpath.c │ │ │ ├── xpointer.c │ │ │ ├── xzlib.c │ │ │ └── xzlib.h │ │ ├── mruby │ │ │ ├── include │ │ │ │ ├── mrbconf.h │ │ │ │ ├── mruby.h │ │ │ │ └── mruby │ │ │ │ │ ├── array.h │ │ │ │ │ ├── boxing_nan.h │ │ │ │ │ ├── boxing_no.h │ │ │ │ │ ├── boxing_word.h │ │ │ │ │ ├── class.h │ │ │ │ │ ├── common.h │ │ │ │ │ ├── compile.h │ │ │ │ │ ├── data.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── dump.h │ │ │ │ │ ├── error.h │ │ │ │ │ ├── gc.h │ │ │ │ │ ├── hash.h │ │ │ │ │ ├── irep.h │ │ │ │ │ ├── khash.h │ │ │ │ │ ├── numeric.h │ │ │ │ │ ├── object.h │ │ │ │ │ ├── opcode.h │ │ │ │ │ ├── proc.h │ │ │ │ │ ├── range.h │ │ │ │ │ ├── re.h │ │ │ │ │ ├── string.h │ │ │ │ │ ├── throw.h │ │ │ │ │ ├── value.h │ │ │ │ │ ├── variable.h │ │ │ │ │ └── version.h │ │ │ ├── lib │ │ │ │ └── mruby │ │ │ │ │ └── source.rb │ │ │ ├── mrbgems │ │ │ │ ├── gem_init.c │ │ │ │ ├── mruby-array-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── array.rb │ │ │ │ │ └── src │ │ │ │ │ │ └── array.c │ │ │ │ ├── mruby-compiler │ │ │ │ │ ├── bintest │ │ │ │ │ │ └── mrbc.rb │ │ │ │ │ ├── core │ │ │ │ │ │ ├── codegen.c │ │ │ │ │ │ ├── keywords │ │ │ │ │ │ ├── lex.def │ │ │ │ │ │ ├── node.h │ │ │ │ │ │ └── y.tab.c │ │ │ │ │ └── mrbgem.rake │ │ │ │ ├── mruby-dir │ │ │ │ │ ├── gem_init.c │ │ │ │ │ └── src │ │ │ │ │ │ └── dir.c │ │ │ │ ├── mruby-enum-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── enum.rb │ │ │ │ │ └── test │ │ │ │ │ │ └── enum.rb │ │ │ │ ├── mruby-enum-lazy │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── lazy.rb │ │ │ │ │ └── test │ │ │ │ │ │ └── lazy.rb │ │ │ │ ├── mruby-enumerator │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── enumerator.rb │ │ │ │ │ └── test │ │ │ │ │ │ └── enumerator.rb │ │ │ │ ├── mruby-env │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── gem_init.c │ │ │ │ │ └── src │ │ │ │ │ │ └── env.c │ │ │ │ ├── mruby-eval │ │ │ │ │ ├── gem_init.c │ │ │ │ │ └── src │ │ │ │ │ │ └── eval.c │ │ │ │ ├── mruby-fiber │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── src │ │ │ │ │ │ └── fiber.c │ │ │ │ │ └── test │ │ │ │ │ │ └── fiber.rb │ │ │ │ ├── mruby-hash-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── hash.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── hash-ext.c │ │ │ │ │ └── test │ │ │ │ │ │ └── hash.rb │ │ │ │ ├── mruby-http │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── include │ │ │ │ │ │ ├── http_parser.h │ │ │ │ │ │ └── mrb_http.h │ │ │ │ │ └── src │ │ │ │ │ │ ├── http_parser.c │ │ │ │ │ │ └── mrb_http.c │ │ │ │ ├── mruby-io │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── include │ │ │ │ │ │ └── mruby │ │ │ │ │ │ │ └── ext │ │ │ │ │ │ │ └── io.h │ │ │ │ │ └── src │ │ │ │ │ │ ├── file.c │ │ │ │ │ │ ├── file_test.c │ │ │ │ │ │ ├── io.c │ │ │ │ │ │ └── mruby_io_gem.c │ │ │ │ ├── mruby-json │ │ │ │ │ ├── gem_init.c │ │ │ │ │ └── src │ │ │ │ │ │ ├── mrb_json.c │ │ │ │ │ │ ├── parson.c │ │ │ │ │ │ └── parson.h │ │ │ │ ├── mruby-kernel-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── src │ │ │ │ │ │ └── kernel.c │ │ │ │ │ └── test │ │ │ │ │ │ └── kernel.rb │ │ │ │ ├── mruby-math │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── src │ │ │ │ │ │ └── math.c │ │ │ │ │ └── test │ │ │ │ │ │ └── math.rb │ │ │ │ ├── mruby-numeric-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── numeric_ext.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── numeric_ext.c │ │ │ │ │ └── test │ │ │ │ │ │ └── numeric.rb │ │ │ │ ├── mruby-object-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── object.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── object.c │ │ │ │ │ └── test │ │ │ │ │ │ ├── nil.rb │ │ │ │ │ │ └── object.rb │ │ │ │ ├── mruby-objectspace │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── src │ │ │ │ │ │ └── mruby_objectspace.c │ │ │ │ │ └── test │ │ │ │ │ │ └── objectspace.rb │ │ │ │ ├── mruby-onig-regexp │ │ │ │ │ ├── gem_init.c │ │ │ │ │ └── src │ │ │ │ │ │ └── mruby_onig_regexp.c │ │ │ │ ├── mruby-print │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── print.rb │ │ │ │ │ └── src │ │ │ │ │ │ └── print.c │ │ │ │ ├── mruby-proc-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── proc.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── proc.c │ │ │ │ │ └── test │ │ │ │ │ │ ├── proc.c │ │ │ │ │ │ └── proc.rb │ │ │ │ ├── mruby-random │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── src │ │ │ │ │ │ ├── mt19937ar.c │ │ │ │ │ │ ├── mt19937ar.h │ │ │ │ │ │ ├── random.c │ │ │ │ │ │ └── random.h │ │ │ │ │ └── test │ │ │ │ │ │ └── random.rb │ │ │ │ ├── mruby-range-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── src │ │ │ │ │ │ └── range.c │ │ │ │ │ └── test │ │ │ │ │ │ └── range.rb │ │ │ │ ├── mruby-require │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ └── src │ │ │ │ │ │ └── require.c │ │ │ │ ├── mruby-sprintf │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── string.rb │ │ │ │ │ ├── src │ │ │ │ │ │ ├── kernel.c │ │ │ │ │ │ └── sprintf.c │ │ │ │ │ └── test │ │ │ │ │ │ └── sprintf.rb │ │ │ │ ├── mruby-string-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── string.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── string.c │ │ │ │ │ └── test │ │ │ │ │ │ └── string.rb │ │ │ │ ├── mruby-struct │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── struct.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── struct.c │ │ │ │ │ └── test │ │ │ │ │ │ └── struct.rb │ │ │ │ ├── mruby-symbol-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── symbol.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── symbol.c │ │ │ │ │ └── test │ │ │ │ │ │ └── symbol.rb │ │ │ │ ├── mruby-tempfile │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── gem_init.c │ │ │ │ │ └── src │ │ │ │ │ │ └── tempfile.c │ │ │ │ ├── mruby-time │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ │ └── time.rb │ │ │ │ │ ├── src │ │ │ │ │ │ └── time.c │ │ │ │ │ └── test │ │ │ │ │ │ └── time.rb │ │ │ │ └── mruby-toplevel-ext │ │ │ │ │ ├── gem_init.c │ │ │ │ │ ├── mrbgem.rake │ │ │ │ │ ├── mrblib │ │ │ │ │ └── toplevel.rb │ │ │ │ │ └── test │ │ │ │ │ └── toplevel.rb │ │ │ ├── mrblib │ │ │ │ └── mrblib.c │ │ │ └── src │ │ │ │ ├── array.c │ │ │ │ ├── backtrace.c │ │ │ │ ├── class.c │ │ │ │ ├── codedump.c │ │ │ │ ├── compar.c │ │ │ │ ├── crc.c │ │ │ │ ├── debug.c │ │ │ │ ├── dump.c │ │ │ │ ├── enum.c │ │ │ │ ├── error.c │ │ │ │ ├── error.h │ │ │ │ ├── etc.c │ │ │ │ ├── ext │ │ │ │ └── .gitkeep │ │ │ │ ├── fmt_fp.c │ │ │ │ ├── gc.c │ │ │ │ ├── hash.c │ │ │ │ ├── init.c │ │ │ │ ├── kernel.c │ │ │ │ ├── load.c │ │ │ │ ├── mruby_core.rake │ │ │ │ ├── numeric.c │ │ │ │ ├── object.c │ │ │ │ ├── opcode.h │ │ │ │ ├── pool.c │ │ │ │ ├── print.c │ │ │ │ ├── proc.c │ │ │ │ ├── range.c │ │ │ │ ├── state.c │ │ │ │ ├── string.c │ │ │ │ ├── symbol.c │ │ │ │ ├── value_array.h │ │ │ │ ├── variable.c │ │ │ │ ├── version.c │ │ │ │ └── vm.c │ │ ├── onigmo │ │ │ ├── config.h │ │ │ ├── enc │ │ │ │ ├── ascii.c │ │ │ │ ├── big5.c │ │ │ │ ├── casefold.h │ │ │ │ ├── euc_jp.c │ │ │ │ ├── euc_kr.c │ │ │ │ ├── euc_tw.c │ │ │ │ ├── gb18030.c │ │ │ │ ├── iso_8859.h │ │ │ │ ├── iso_8859_1.c │ │ │ │ ├── iso_8859_10.c │ │ │ │ ├── iso_8859_11.c │ │ │ │ ├── iso_8859_13.c │ │ │ │ ├── iso_8859_14.c │ │ │ │ ├── iso_8859_15.c │ │ │ │ ├── iso_8859_16.c │ │ │ │ ├── iso_8859_2.c │ │ │ │ ├── iso_8859_3.c │ │ │ │ ├── iso_8859_4.c │ │ │ │ ├── iso_8859_5.c │ │ │ │ ├── iso_8859_6.c │ │ │ │ ├── iso_8859_7.c │ │ │ │ ├── iso_8859_8.c │ │ │ │ ├── iso_8859_9.c │ │ │ │ ├── jis │ │ │ │ │ ├── props.h │ │ │ │ │ └── props.kwd │ │ │ │ ├── koi8_r.c │ │ │ │ ├── koi8_u.c │ │ │ │ ├── mktable.c │ │ │ │ ├── name2ctype.h │ │ │ │ ├── shift_jis.c │ │ │ │ ├── unicode.c │ │ │ │ ├── utf_16be.c │ │ │ │ ├── utf_16le.c │ │ │ │ ├── utf_32be.c │ │ │ │ ├── utf_32le.c │ │ │ │ ├── utf_8.c │ │ │ │ ├── windows_1250.c │ │ │ │ ├── windows_1251.c │ │ │ │ ├── windows_1252.c │ │ │ │ ├── windows_1253.c │ │ │ │ ├── windows_1254.c │ │ │ │ ├── windows_1257.c │ │ │ │ └── windows_31j.c │ │ │ ├── onigmo.h │ │ │ ├── onigmognu.h │ │ │ ├── onigmoposix.h │ │ │ ├── regcomp.c │ │ │ ├── regenc.c │ │ │ ├── regenc.h │ │ │ ├── regerror.c │ │ │ ├── regexec.c │ │ │ ├── regext.c │ │ │ ├── reggnu.c │ │ │ ├── regint.h │ │ │ ├── regparse.c │ │ │ ├── regparse.h │ │ │ ├── regposerr.c │ │ │ ├── regposix.c │ │ │ ├── regsyntax.c │ │ │ ├── regtrav.c │ │ │ ├── regversion.c │ │ │ ├── st.c │ │ │ └── st.h │ │ ├── program │ │ │ └── boost.cpp │ │ └── sqlite3 │ │ │ ├── alter.c │ │ │ ├── analyze.c │ │ │ ├── attach.c │ │ │ ├── auth.c │ │ │ ├── backup.c │ │ │ ├── bitvec.c │ │ │ ├── btmutex.c │ │ │ ├── btree.c │ │ │ ├── btree.h │ │ │ ├── btreeInt.h │ │ │ ├── build.c │ │ │ ├── callback.c │ │ │ ├── complete.c │ │ │ ├── ctime.c │ │ │ ├── date.c │ │ │ ├── dbpage.c │ │ │ ├── dbstat.c │ │ │ ├── delete.c │ │ │ ├── expr.c │ │ │ ├── fault.c │ │ │ ├── fkey.c │ │ │ ├── func.c │ │ │ ├── global.c │ │ │ ├── hash.c │ │ │ ├── hash.h │ │ │ ├── hwtime.h │ │ │ ├── in-operator.md │ │ │ ├── insert.c │ │ │ ├── keywordhash.h │ │ │ ├── legacy.c │ │ │ ├── loadext.c │ │ │ ├── main.c │ │ │ ├── malloc.c │ │ │ ├── mem0.c │ │ │ ├── mem1.c │ │ │ ├── mem2.c │ │ │ ├── mem3.c │ │ │ ├── mem5.c │ │ │ ├── memdb.c │ │ │ ├── memjournal.c │ │ │ ├── msvc.h │ │ │ ├── mutex.c │ │ │ ├── mutex.h │ │ │ ├── mutex_noop.c │ │ │ ├── mutex_unix.c │ │ │ ├── mutex_w32.c │ │ │ ├── notify.c │ │ │ ├── opcodes.c │ │ │ ├── opcodes.h │ │ │ ├── os.c │ │ │ ├── os.h │ │ │ ├── os_common.h │ │ │ ├── os_setup.h │ │ │ ├── os_unix.c │ │ │ ├── os_win.c │ │ │ ├── os_win.h │ │ │ ├── pager.c │ │ │ ├── pager.h │ │ │ ├── parse.c │ │ │ ├── parse.h │ │ │ ├── parse.y │ │ │ ├── pcache.c │ │ │ ├── pcache.h │ │ │ ├── pcache1.c │ │ │ ├── pragma.c │ │ │ ├── pragma.h │ │ │ ├── prepare.c │ │ │ ├── printf.c │ │ │ ├── random.c │ │ │ ├── resolve.c │ │ │ ├── rowset.c │ │ │ ├── select.c │ │ │ ├── shell.c.in │ │ │ ├── sqlite.h.in │ │ │ ├── sqlite3.h │ │ │ ├── sqlite3.rc │ │ │ ├── sqlite3ext.h │ │ │ ├── sqliteInt.h │ │ │ ├── sqliteLimit.h │ │ │ ├── status.c │ │ │ ├── table.c │ │ │ ├── threads.c │ │ │ ├── tokenize.c │ │ │ ├── treeview.c │ │ │ ├── trigger.c │ │ │ ├── update.c │ │ │ ├── upsert.c │ │ │ ├── utf.c │ │ │ ├── util.c │ │ │ ├── vacuum.c │ │ │ ├── vdbe.c │ │ │ ├── vdbe.h │ │ │ ├── vdbeInt.h │ │ │ ├── vdbeapi.c │ │ │ ├── vdbeaux.c │ │ │ ├── vdbeblob.c │ │ │ ├── vdbemem.c │ │ │ ├── vdbesort.c │ │ │ ├── vdbetrace.c │ │ │ ├── vtab.c │ │ │ ├── vxworks.h │ │ │ ├── wal.c │ │ │ ├── wal.h │ │ │ ├── walker.c │ │ │ ├── where.c │ │ │ ├── whereInt.h │ │ │ ├── wherecode.c │ │ │ └── whereexpr.c │ ├── java │ │ ├── app │ │ │ └── dinus │ │ │ │ └── com │ │ │ │ └── loadingdrawable │ │ │ │ ├── DensityUtil.java │ │ │ │ └── render │ │ │ │ ├── LoadingDrawable.java │ │ │ │ ├── LoadingRenderer.java │ │ │ │ └── circle │ │ │ │ └── rotate │ │ │ │ ├── GearLoadingRenderer.java │ │ │ │ ├── LevelLoadingRenderer.java │ │ │ │ ├── MaterialLoadingRenderer.java │ │ │ │ └── WhorlLoadingRenderer.java │ │ ├── cn │ │ │ └── gen │ │ │ │ └── gsv2 │ │ │ │ ├── MainActivity.java │ │ │ │ ├── SplashActivity.java │ │ │ │ ├── controllers │ │ │ │ ├── BookController.java │ │ │ │ ├── HistoryController.java │ │ │ │ ├── LibraryController.java │ │ │ │ ├── LikesController.java │ │ │ │ ├── LocalBookController.java │ │ │ │ ├── MainSettingsController.java │ │ │ │ ├── PostTopicController.java │ │ │ │ ├── ProcessController.java │ │ │ │ ├── SearchController.java │ │ │ │ ├── SettingsController.java │ │ │ │ ├── ShelfController.java │ │ │ │ ├── ShopController.java │ │ │ │ ├── ShopsController.java │ │ │ │ ├── SocialController.java │ │ │ │ ├── TopicController.java │ │ │ │ ├── TopicsController.java │ │ │ │ ├── ViewController.java │ │ │ │ └── WebViewController.java │ │ │ │ ├── models │ │ │ │ ├── ArtBasket.java │ │ │ │ ├── Book.java │ │ │ │ ├── Chapter.java │ │ │ │ ├── HTTPClient.java │ │ │ │ ├── History.java │ │ │ │ ├── KeyValue.java │ │ │ │ ├── Library.java │ │ │ │ ├── Page.java │ │ │ │ ├── Reader.java │ │ │ │ ├── SearchTip.java │ │ │ │ ├── Settings.java │ │ │ │ └── Shop.java │ │ │ │ ├── utils │ │ │ │ ├── Analysis.java │ │ │ │ ├── ArtSpan.java │ │ │ │ ├── ExceptionHandler.java │ │ │ │ └── ResourceCache.java │ │ │ │ └── views │ │ │ │ ├── ArrowCell.java │ │ │ │ ├── ArtCell.java │ │ │ │ ├── ArtView.java │ │ │ │ ├── BookCell.java │ │ │ │ ├── BookHeaderCell.java │ │ │ │ ├── BooksCover.java │ │ │ │ ├── ButtonCell.java │ │ │ │ ├── CategoryCell.java │ │ │ │ ├── ChapterCell.java │ │ │ │ ├── CheckCell.java │ │ │ │ ├── CommentsCell.java │ │ │ │ ├── DescriptionCell.java │ │ │ │ ├── DividerCell.java │ │ │ │ ├── ImageView.java │ │ │ │ ├── InputCell.java │ │ │ │ ├── ListViewCell.java │ │ │ │ ├── LoadingCell.java │ │ │ │ ├── LoadingView.java │ │ │ │ ├── PagerAdapter.java │ │ │ │ ├── PictureView.java │ │ │ │ ├── ProcessCell.java │ │ │ │ ├── ScrollBorderView.java │ │ │ │ ├── SearchHistoryCell.java │ │ │ │ ├── SelectButton.java │ │ │ │ ├── StatusView.java │ │ │ │ ├── SwitchCell.java │ │ │ │ ├── TopicCell.java │ │ │ │ ├── TopicDisplayView.java │ │ │ │ ├── TouchPanel.java │ │ │ │ └── ViewPager.java │ │ └── com │ │ │ └── gr │ │ │ ├── Activity.java │ │ │ ├── Helper.java │ │ │ ├── NativeClass.java │ │ │ ├── Request.java │ │ │ ├── RequestResultListener.java │ │ │ └── classes │ │ │ ├── Array.java │ │ │ ├── Callback.java │ │ │ ├── Map.java │ │ │ ├── NotificationCenter.java │ │ │ └── Renderer.java │ └── res │ │ ├── drawable-v21 │ │ └── white_repple.xml │ │ ├── drawable-xhdpi │ │ ├── add_dialog.png │ │ ├── arrow_down.png │ │ ├── arrow_right.png │ │ ├── book.png │ │ ├── cancel2.png │ │ ├── clock.png │ │ ├── done.png │ │ ├── download.png │ │ ├── failed.png │ │ ├── home.png │ │ ├── like.png │ │ ├── liked.png │ │ ├── list.png │ │ ├── menu.png │ │ ├── menu_2.png │ │ ├── no_image.png │ │ ├── pause.png │ │ ├── play.png │ │ ├── remove.png │ │ ├── search.png │ │ ├── setting.png │ │ ├── share.png │ │ ├── squares.png │ │ └── tri.png │ │ ├── drawable │ │ ├── background.xml │ │ ├── border.xml │ │ ├── chapter.xml │ │ ├── chaptet_text.xml │ │ ├── circle.xml │ │ ├── corner.xml │ │ ├── launch.webp │ │ ├── logo.png │ │ ├── side_nav_bar.xml │ │ ├── white.xml │ │ └── white_repple.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── activity_splash.xml │ │ ├── app_bar_main.xml │ │ ├── cell_book_header.xml │ │ ├── cell_chapters.xml │ │ ├── cell_description.xml │ │ ├── cell_topic.xml │ │ ├── content_main.xml │ │ ├── controller_book.xml │ │ ├── controller_history.xml │ │ ├── controller_library.xml │ │ ├── controller_likes.xml │ │ ├── controller_local_book.xml │ │ ├── controller_main_settings.xml │ │ ├── controller_post_topic.xml │ │ ├── controller_process.xml │ │ ├── controller_search.xml │ │ ├── controller_settings.xml │ │ ├── controller_shelf.xml │ │ ├── controller_shop.xml │ │ ├── controller_shops.xml │ │ ├── controller_social.xml │ │ ├── controller_topic.xml │ │ ├── controller_topics.xml │ │ ├── controller_view.xml │ │ ├── controller_web_view.xml │ │ ├── nav_header_main.xml │ │ ├── view_art.xml │ │ ├── view_status.xml │ │ └── view_topic_title.xml │ │ ├── menu │ │ ├── activity_main_drawer.xml │ │ ├── book_local.xml │ │ ├── book_online.xml │ │ └── main.xml │ │ ├── mipmap-hdpi │ │ └── icon.png │ │ ├── mipmap-mdpi │ │ └── icon.png │ │ ├── mipmap-xhdpi │ │ └── icon.png │ │ ├── mipmap-xxhdpi │ │ └── icon.png │ │ ├── mipmap-xxxhdpi │ │ └── icon.png │ │ ├── values-zh │ │ └── strings.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── drawables.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── cn │ └── gen │ └── gsv2 │ └── ExampleUnitTest.java ├── build.gradle ├── controller ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── apps │ │ └── gen │ │ └── lib │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── apps │ │ └── gen │ │ └── lib │ │ ├── Activity.java │ │ ├── controllers │ │ ├── Controller.java │ │ ├── NavigationController.java │ │ └── TabController.java │ │ ├── database │ │ ├── Model.java │ │ ├── PrimaryKey.java │ │ ├── Property.java │ │ ├── Query.java │ │ └── Table.java │ │ ├── operation │ │ ├── Operation.java │ │ └── Queue.java │ │ ├── utils │ │ ├── CacheAdapter.java │ │ ├── Configs.java │ │ ├── H.java │ │ ├── NotificationCenter.java │ │ └── ResourcePool.java │ │ └── views │ │ ├── ListCell.java │ │ ├── NavigationBar.java │ │ └── TabBar.java │ └── res │ ├── drawable-hdpi │ └── ic_action_back.png │ ├── drawable-mdpi │ └── ic_action_back.png │ ├── drawable-v21 │ └── ripple.xml │ ├── drawable-xhdpi │ └── ic_action_back.png │ ├── drawable-xxhdpi │ └── ic_action_back.png │ ├── drawable │ ├── ripple.xml │ └── trans.xml │ └── values │ ├── color.xml │ ├── ids.xml │ ├── string.xml │ └── styles.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── fichardu │ └── interpolator │ ├── EaseInBackInterpolator.java │ ├── EaseInBounceInterpolator.java │ ├── EaseInCircInterpolator.java │ ├── EaseInCubicInterpolator.java │ ├── EaseInElasticInterpolator.java │ ├── EaseInExpoInterpolator.java │ ├── EaseInOutBackInterpolator.java │ ├── EaseInOutBounceInterpolator.java │ ├── EaseInOutCircInterpolator.java │ ├── EaseInOutCubicInterpolator.java │ ├── EaseInOutElasticInterpolator.java │ ├── EaseInOutExpoInterpolator.java │ ├── EaseInOutQuadInterpolator.java │ ├── EaseInOutQuartInterpolator.java │ ├── EaseInOutQuintInterpolator.java │ ├── EaseInOutSineInterpolator.java │ ├── EaseInQuadInterpolator.java │ ├── EaseInQuartInterpolator.java │ ├── EaseInQuintInterpolator.java │ ├── EaseInSineInterpolator.java │ ├── EaseOutBackInterpolator.java │ ├── EaseOutBounceInterpolator.java │ ├── EaseOutCircInterpolator.java │ ├── EaseOutCubicInterpolator.java │ ├── EaseOutElasticInterpolator.java │ ├── EaseOutExpoInterpolator.java │ ├── EaseOutQuadInterpolator.java │ ├── EaseOutQuartInterpolator.java │ ├── EaseOutQuintInterpolator.java │ └── EaseOutSineInterpolator.java ├── pinchimageview ├── .gitignore ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── boycy815 │ └── pinchimageview │ └── PinchImageView.java └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | out/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Log Files 26 | *.log 27 | 28 | # Android Studio Navigation editor temp files 29 | .navigation/ 30 | 31 | # Android Studio captures folder 32 | captures/ 33 | 34 | # Intellij 35 | *.iml 36 | .idea/workspace.xml 37 | .idea/tasks.xml 38 | .idea/gradle.xml 39 | .idea/dictionaries 40 | .idea/libraries 41 | 42 | # Keystore files 43 | *.jks 44 | 45 | # External native build folder generated in Android Studio 2.2 and later 46 | .externalNativeBuild 47 | 48 | # Google Services (e.g. APIs or Firebase) 49 | google-services.json 50 | 51 | # Freeline 52 | freeline.py 53 | freeline/ 54 | freeline_project_description.json 55 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "app/src/main/cpp/grender"] 2 | path = app/src/main/cpp/grender 3 | url = https://github.com/dbsGen/grender.git 4 | [submodule "app/src/main/assets/resources/ruby/hiengine"] 5 | path = app/src/main/assets/resources/ruby/hiengine 6 | url = https://github.com/dbsGen/GenShelf_Ruby.git 7 | [submodule "app/src/main/cpp/program/common"] 8 | path = app/src/main/cpp/program/common 9 | url = https://github.com/dbsGen/GenShelf_Common.git 10 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/libs/lib-badge.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/libs/lib-badge.aar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/mac/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/cn/gen/gsv2/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("cn.gen.gsv2", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/assets/resources/ruby/t_root/config.rb: -------------------------------------------------------------------------------- 1 | require 'library' 2 | require 'reader' 3 | require 'settings' 4 | 5 | $config = { 6 | library: Library, 7 | reader: Reader, 8 | settings: Settings 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/assets/resources/ruby/t_root/crypto.js: -------------------------------------------------------------------------------- 1 | 2 | var common = { 3 | isMove: false, 4 | TimerShow: null, 5 | isEffectEnd: false, 6 | curPngIndex: 0, 7 | isMoveEnd: true, 8 | isDefaultMoveEnd: true, 9 | key: "a0845e4f6b011cda8ceba737c85c251e", 10 | iv: "3c7d5684e36b6c65c1e256d37640d73d" 11 | }; 12 | common.decrypt = function(code, page) { 13 | function b(i) { 14 | var h = CryptoJS.AES.decrypt(i, CryptoJS.enc.Utf8.parse(common.key), { 15 | iv: CryptoJS.enc.Utf8.parse(common.iv), 16 | mode: CryptoJS.mode.CBC, 17 | padding: CryptoJS.pad.Pkcs7 18 | }); 19 | return h.toString(CryptoJS.enc.Utf8) 20 | } 21 | var g = [-1]; 22 | var f = ""; 23 | f = code; 24 | for (var a = 0; a < f.length; a++) { 25 | if (f[a] == ",") { 26 | g.push(a) 27 | } 28 | } 29 | var e = page; 30 | var d = (f.substring(g[e] + 1, g[e + 1])); 31 | return new Array(b(d), g.length) 32 | }; 33 | common.decryptCode = function(code) { 34 | var h = CryptoJS.AES.decrypt(code, CryptoJS.enc.Utf8.parse(common.key), { 35 | iv: CryptoJS.enc.Utf8.parse(common.iv), 36 | mode: CryptoJS.mode.CBC, 37 | padding: CryptoJS.pad.Pkcs7 38 | }); 39 | return h.toString(CryptoJS.enc.Utf8) 40 | } -------------------------------------------------------------------------------- /app/src/main/assets/resources/ruby/t_root/settings.rb: -------------------------------------------------------------------------------- 1 | require 'models' 2 | 3 | class Settings < HiEngine::Object 4 | def process 5 | begin 6 | 7 | p "Setting begin!" 8 | item = SettingItem.new 9 | item.name = '类别' 10 | item.type = 1 11 | item.params = JSON.parse(file('types.json').text).keys 12 | addItem item 13 | 14 | rescue Exception => e 15 | p e 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/src/main/assets/resources/ruby/t_root/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "漫画": { 3 | "t": "shaonv", 4 | "n": 2 5 | }, 6 | "同人": { 7 | "t": "manhua", 8 | "n": 1 9 | }, 10 | "GIF": { 11 | "t": "dongtai", 12 | "n": 3 13 | }, 14 | "内涵": { 15 | "t": "neihan", 16 | "n": 4 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Document.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #include "Document.h" 17 | 18 | CDocument::CDocument() 19 | { 20 | mpOutput = NULL; 21 | } 22 | 23 | void CDocument::parse(const std::string& aInput) 24 | { 25 | reset(); 26 | mpOutput = gumbo_parse(aInput.c_str()); 27 | } 28 | 29 | CDocument::~CDocument() 30 | { 31 | reset(); 32 | } 33 | 34 | CSelection CDocument::find(std::string aSelector) 35 | { 36 | if (mpOutput == NULL) 37 | { 38 | throw "document not initialized"; 39 | } 40 | 41 | CSelection sel(mpOutput->root); 42 | return sel.find(aSelector); 43 | } 44 | 45 | void CDocument::reset() 46 | { 47 | if (mpOutput != NULL) 48 | { 49 | gumbo_destroy_output(&kGumboDefaultOptions, mpOutput); 50 | mpOutput = NULL; 51 | } 52 | } 53 | 54 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Document.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #ifndef DOCUMENT_H_ 17 | #define DOCUMENT_H_ 18 | 19 | #include 20 | #include 21 | #include "Selection.h" 22 | 23 | class CDocument: public CObject 24 | { 25 | public: 26 | 27 | CDocument(); 28 | 29 | void parse(const std::string& aInput); 30 | 31 | virtual ~CDocument(); 32 | 33 | CSelection find(std::string aSelector); 34 | 35 | private: 36 | 37 | void reset(); 38 | 39 | private: 40 | 41 | GumboOutput* mpOutput; 42 | }; 43 | 44 | #endif /* DOCUMENT_H_ */ 45 | 46 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 47 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Node.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #ifndef NODE_H_ 17 | #define NODE_H_ 18 | 19 | #include 20 | #include 21 | 22 | class CSelection; 23 | 24 | class CNode 25 | { 26 | public: 27 | 28 | CNode(GumboNode* apNode = NULL); 29 | 30 | virtual ~CNode(); 31 | 32 | public: 33 | 34 | bool valid(); 35 | 36 | CNode parent(); 37 | 38 | CNode nextSibling(); 39 | 40 | CNode prevSibling(); 41 | 42 | unsigned int childNum(); 43 | 44 | CNode childAt(size_t i); 45 | 46 | std::string attribute(std::string key); 47 | 48 | std::string text(); 49 | 50 | std::string ownText(); 51 | 52 | size_t startPos(); 53 | 54 | size_t endPos(); 55 | 56 | size_t startPosOuter(); 57 | 58 | size_t endPosOuter(); 59 | 60 | std::string tag(); 61 | 62 | CSelection find(std::string aSelector); 63 | 64 | private: 65 | 66 | GumboNode* mpNode; 67 | }; 68 | 69 | #endif /* NODE_H_ */ 70 | 71 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 72 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Object.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #include "Object.h" 17 | 18 | CObject::CObject() 19 | { 20 | mReferences = 1; 21 | } 22 | 23 | CObject::~CObject() 24 | { 25 | if (mReferences != 1) 26 | { 27 | throw "something wrong, reference count not zero"; 28 | } 29 | } 30 | 31 | void CObject::retain() 32 | { 33 | mReferences++; 34 | } 35 | 36 | void CObject::release() 37 | { 38 | if (mReferences < 0) 39 | { 40 | throw "something wrong, reference count is negative"; 41 | } 42 | 43 | if (mReferences == 1) 44 | { 45 | delete this; 46 | } 47 | else 48 | { 49 | mReferences--; 50 | } 51 | } 52 | 53 | unsigned int CObject::references() 54 | { 55 | return mReferences; 56 | } 57 | 58 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Object.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #ifndef OBJECT_H_ 17 | #define OBJECT_H_ 18 | 19 | class CObject 20 | { 21 | public: 22 | 23 | CObject(); 24 | 25 | virtual ~CObject(); 26 | 27 | public: 28 | 29 | virtual void retain(); 30 | 31 | virtual void release(); 32 | 33 | unsigned int references(); 34 | 35 | private: 36 | 37 | int mReferences; 38 | }; 39 | 40 | #endif /* OBJECT_H_ */ 41 | 42 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 43 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/QueryUtil.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #ifndef QUERYUTIL_H_ 17 | #define QUERYUTIL_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | class CQueryUtil 24 | { 25 | public: 26 | 27 | static std::string tolower(std::string s); 28 | 29 | static std::vector unionNodes(std::vector aNodes1, 30 | std::vector aNode2); 31 | 32 | static bool nodeExists(std::vector aNodes, GumboNode* apNode); 33 | 34 | static std::string nodeText(GumboNode* apNode); 35 | 36 | static std::string nodeOwnText(GumboNode* apNode); 37 | 38 | private: 39 | 40 | static void writeNodeText(GumboNode* apNode, std::string& aText); 41 | 42 | 43 | }; 44 | 45 | #endif /* QUERYUTIL_H_ */ 46 | 47 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 48 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Selection.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #include "Selection.h" 17 | #include "Parser.h" 18 | #include "QueryUtil.h" 19 | #include "Node.h" 20 | 21 | CSelection::CSelection(GumboNode* apNode) 22 | { 23 | mNodes.push_back(apNode); 24 | } 25 | 26 | CSelection::CSelection(std::vector aNodes) 27 | { 28 | mNodes = aNodes; 29 | } 30 | 31 | CSelection::~CSelection() 32 | { 33 | } 34 | 35 | CSelection CSelection::find(std::string aSelector) 36 | { 37 | CSelector* sel = CParser::create(aSelector); 38 | std::vector ret; 39 | for (std::vector::iterator it = mNodes.begin(); it != mNodes.end(); it++) 40 | { 41 | GumboNode* pNode = *it; 42 | std::vector matched = sel->matchAll(pNode); 43 | ret = CQueryUtil::unionNodes(ret, matched); 44 | } 45 | sel->release(); 46 | return CSelection(ret); 47 | } 48 | 49 | CNode CSelection::nodeAt(size_t i) 50 | { 51 | if (i >= mNodes.size()) 52 | { 53 | return CNode(); 54 | } 55 | 56 | return CNode(mNodes[i]); 57 | } 58 | 59 | size_t CSelection::nodeNum() 60 | { 61 | return mNodes.size(); 62 | } 63 | 64 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo-query/Selection.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * 3 | * $Id$ 4 | * 5 | **************************************************************************/ 6 | 7 | /** 8 | * @file $HeadURL$ 9 | * @author $Author$(hoping@baimashi.com) 10 | * @date $Date$ 11 | * @version $Revision$ 12 | * @brief 13 | * 14 | **/ 15 | 16 | #ifndef SELECTION_H_ 17 | #define SELECTION_H_ 18 | 19 | #include "Object.h" 20 | #include 21 | #include 22 | #include 23 | 24 | class CNode; 25 | 26 | class CSelection: public CObject 27 | { 28 | 29 | public: 30 | 31 | CSelection(GumboNode* apNode); 32 | 33 | CSelection(std::vector aNodes); 34 | 35 | virtual ~CSelection(); 36 | 37 | public: 38 | 39 | CSelection find(std::string aSelector); 40 | 41 | CNode nodeAt(size_t i); 42 | 43 | size_t nodeNum(); 44 | 45 | private: 46 | 47 | std::vector mNodes; 48 | }; 49 | 50 | #endif /* SELECTION_H_ */ 51 | 52 | /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ 53 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo/attribute.c: -------------------------------------------------------------------------------- 1 | // Copyright 2010 Google Inc. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // Author: jdtang@google.com (Jonathan Tang) 16 | 17 | #include "attribute.h" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include "util.h" 25 | 26 | struct GumboInternalParser; 27 | 28 | GumboAttribute* gumbo_get_attribute( 29 | const GumboVector* attributes, const char* name) { 30 | for (unsigned int i = 0; i < attributes->length; ++i) { 31 | GumboAttribute* attr = attributes->data[i]; 32 | if (!strcasecmp(attr->name, name)) { 33 | return attr; 34 | } 35 | } 36 | return NULL; 37 | } 38 | 39 | void gumbo_destroy_attribute( 40 | struct GumboInternalParser* parser, GumboAttribute* attribute) { 41 | gumbo_parser_deallocate(parser, (void*) attribute->name); 42 | gumbo_parser_deallocate(parser, (void*) attribute->value); 43 | gumbo_parser_deallocate(parser, (void*) attribute); 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo/attribute.h: -------------------------------------------------------------------------------- 1 | // Copyright 2010 Google Inc. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // Author: jdtang@google.com (Jonathan Tang) 16 | 17 | #ifndef GUMBO_ATTRIBUTE_H_ 18 | #define GUMBO_ATTRIBUTE_H_ 19 | 20 | #include "gumbo.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | struct GumboInternalParser; 27 | 28 | // Release the memory used for an GumboAttribute, including the attribute 29 | // itself. 30 | void gumbo_destroy_attribute( 31 | struct GumboInternalParser* parser, GumboAttribute* attribute); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif // GUMBO_ATTRIBUTE_H_ 38 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo/string_piece.h: -------------------------------------------------------------------------------- 1 | // Copyright 2010 Google Inc. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // Author: jdtang@google.com (Jonathan Tang) 16 | 17 | #ifndef GUMBO_STRING_PIECE_H_ 18 | #define GUMBO_STRING_PIECE_H_ 19 | 20 | #include "gumbo.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | struct GumboInternalParser; 27 | 28 | // Performs a deep-copy of an GumboStringPiece, allocating a fresh buffer in the 29 | // destination and copying over the characters from source. Dest should be 30 | // empty, with no buffer allocated; otherwise, this leaks it. 31 | void gumbo_string_copy(struct GumboInternalParser* parser, 32 | GumboStringPiece* dest, const GumboStringPiece* source); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif // GUMBO_STRING_PIECE_H_ 39 | -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo/tag_sizes.h: -------------------------------------------------------------------------------- 1 | // Generated via `gentags.py src/tag.in`. 2 | // Do not edit; edit src/tag.in instead. 3 | // clang-format off 4 | 4, 4, 5, 4, 4, 4, 5, 6, 8, 8, 4, 7, 7, 3, 5, 2, 2, 2, 2, 2, 2, 6, 6, 6, 7, 1, 2, 3, 10, 2, 2, 2, 2, 2, 2, 6, 10, 4, 3, 1, 2, 6, 5, 1, 4, 1, 3, 4, 4, 4, 4, 3, 4, 3, 3, 3, 1, 1, 1, 4, 4, 2, 2, 3, 3, 4, 2, 3, 3, 3, 5, 3, 6, 5, 6, 5, 5, 5, 6, 5, 6, 3, 4, 4, 2, 2, 2, 2, 5, 6, 10, 14, 3, 13, 4, 5, 7, 8, 3, 5, 5, 5, 2, 2, 2, 4, 8, 6, 5, 5, 6, 6, 8, 8, 6, 8, 6, 6, 8, 5, 7, 7, 4, 8, 6, 7, 7, 3, 5, 8, 8, 7, 7, 3, 6, 7, 9, 2, 6, 8, 3, 5, 6, 4, 7, 8, 4, 6, 2, 3, -------------------------------------------------------------------------------- /app/src/main/cpp/gumbo/token_type.h: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // Author: jdtang@google.com (Jonathan Tang) 16 | 17 | #ifndef GUMBO_TOKEN_TYPE_H_ 18 | #define GUMBO_TOKEN_TYPE_H_ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | // An enum representing the type of token. 25 | typedef enum { 26 | GUMBO_TOKEN_DOCTYPE, 27 | GUMBO_TOKEN_START_TAG, 28 | GUMBO_TOKEN_END_TAG, 29 | GUMBO_TOKEN_COMMENT, 30 | GUMBO_TOKEN_WHITESPACE, 31 | GUMBO_TOKEN_CHARACTER, 32 | GUMBO_TOKEN_CDATA, 33 | GUMBO_TOKEN_NULL, 34 | GUMBO_TOKEN_EOF 35 | } GumboTokenType; 36 | 37 | #ifdef __cplusplus 38 | } // extern C 39 | #endif 40 | 41 | #endif // GUMBO_TOKEN_TYPE_H_ 42 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/aliases2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2003, 2008 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | #ifdef USE_AIX 21 | # if defined _AIX 22 | # include "aliases_aix_sysaix.h" 23 | # else 24 | # include "aliases_aix.h" 25 | # endif 26 | #endif 27 | #ifdef USE_OSF1 28 | # if defined __osf__ 29 | # include "aliases_osf1_sysosf1.h" 30 | # else 31 | # include "aliases_osf1.h" 32 | # endif 33 | #endif 34 | #ifdef USE_DOS 35 | # include "aliases_dos.h" 36 | #endif 37 | #ifdef USE_EXTRA 38 | # include "aliases_extra.h" 39 | #endif 40 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/aliases_aix.h: -------------------------------------------------------------------------------- 1 | S(aix_0, "CP856", ei_cp856 ) 2 | S(aix_1, "CP922", ei_cp922 ) 3 | S(aix_2, "CP943", ei_cp943 ) 4 | S(aix_3, "CP1046", ei_cp1046 ) 5 | S(aix_4, "CP1124", ei_cp1124 ) 6 | S(aix_5, "CP1129", ei_cp1129 ) 7 | S(aix_6, "CP1161", ei_cp1161 ) 8 | S(aix_7, "IBM1161", ei_cp1161 ) 9 | S(aix_8, "IBM-1161", ei_cp1161 ) 10 | S(aix_9, "CSIBM1161", ei_cp1161 ) 11 | S(aix_10, "CP1162", ei_cp1162 ) 12 | S(aix_11, "IBM1162", ei_cp1162 ) 13 | S(aix_12, "IBM-1162", ei_cp1162 ) 14 | S(aix_13, "CSIBM1162", ei_cp1162 ) 15 | S(aix_14, "CP1163", ei_cp1163 ) 16 | S(aix_15, "IBM1163", ei_cp1163 ) 17 | S(aix_16, "IBM-1163", ei_cp1163 ) 18 | S(aix_17, "CSIBM1163", ei_cp1163 ) 19 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/aliases_aix_sysaix.h: -------------------------------------------------------------------------------- 1 | S(aix_0, "CP856", ei_cp856 ) 2 | S(aix_1, "IBM-856", ei_cp856 ) 3 | S(aix_2, "CP922", ei_cp922 ) 4 | S(aix_3, "IBM-922", ei_cp922 ) 5 | S(aix_4, "CP943", ei_cp943 ) 6 | S(aix_5, "IBM-943", ei_cp943 ) 7 | S(aix_6, "CP1046", ei_cp1046 ) 8 | S(aix_7, "IBM-1046", ei_cp1046 ) 9 | S(aix_8, "CP1124", ei_cp1124 ) 10 | S(aix_9, "IBM-1124", ei_cp1124 ) 11 | S(aix_10, "CP1129", ei_cp1129 ) 12 | S(aix_11, "IBM-1129", ei_cp1129 ) 13 | S(aix_12, "CP1161", ei_cp1161 ) 14 | S(aix_13, "IBM1161", ei_cp1161 ) 15 | S(aix_14, "IBM-1161", ei_cp1161 ) 16 | S(aix_15, "CSIBM1161", ei_cp1161 ) 17 | S(aix_16, "CP1162", ei_cp1162 ) 18 | S(aix_17, "IBM1162", ei_cp1162 ) 19 | S(aix_18, "IBM-1162", ei_cp1162 ) 20 | S(aix_19, "CSIBM1162", ei_cp1162 ) 21 | S(aix_20, "CP1163", ei_cp1163 ) 22 | S(aix_21, "IBM1163", ei_cp1163 ) 23 | S(aix_22, "IBM-1163", ei_cp1163 ) 24 | S(aix_23, "CSIBM1163", ei_cp1163 ) 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/aliases_extra.h: -------------------------------------------------------------------------------- 1 | S(extra_0, "EUC-JISX0213", ei_euc_jisx0213 ) 2 | S(extra_1, "EUC-JIS-2004", ei_euc_jisx0213 ) 3 | S(extra_2, "SHIFT_JISX0213", ei_shift_jisx0213 ) 4 | S(extra_3, "SHIFT_JIS-2004", ei_shift_jisx0213 ) 5 | S(extra_4, "ISO-2022-JP-3", ei_iso2022_jp3 ) 6 | S(extra_5, "ISO-2022-JP-2004", ei_iso2022_jp3 ) 7 | S(extra_6, "BIG5-2003", ei_big5_2003 ) 8 | S(extra_7, "TDS565", ei_tds565 ) 9 | S(extra_8, "ISO-IR-230", ei_tds565 ) 10 | S(extra_9, "ATARIST", ei_atarist ) 11 | S(extra_10, "ATARI", ei_atarist ) 12 | S(extra_11, "RISCOS-LATIN1", ei_riscos1 ) 13 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/aliases_osf1.h: -------------------------------------------------------------------------------- 1 | S(osf1_0, "DEC-KANJI", ei_dec_kanji ) 2 | S(osf1_1, "DEC-HANYU", ei_dec_hanyu ) 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/aliases_osf1_sysosf1.h: -------------------------------------------------------------------------------- 1 | S(osf1_0, "DEC-KANJI", ei_dec_kanji ) 2 | S(osf1_1, "DECKANJI", ei_dec_kanji ) 3 | S(osf1_2, "DEC-HANYU", ei_dec_hanyu ) 4 | S(osf1_3, "DECHANYU", ei_dec_hanyu ) 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/allocator.c: -------------------------------------------------------------------------------- 1 | #define _GL_USE_STDLIB_ALLOC 1 2 | #include "config.h" 3 | #include "allocator.h" 4 | #include 5 | struct allocator const stdlib_allocator = { malloc, realloc, free, NULL }; 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/areadlink.h: -------------------------------------------------------------------------------- 1 | /* Read symbolic links without size limitation. 2 | 3 | Copyright (C) 2001, 2003-2004, 2007, 2009-2017 Free Software Foundation, 4 | Inc. 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . */ 18 | 19 | /* Written by Jim Meyering */ 20 | 21 | #include 22 | 23 | extern char *areadlink (char const *filename); 24 | extern char *areadlink_with_size (char const *filename, size_t size_hint); 25 | 26 | #if GNULIB_AREADLINKAT 27 | extern char *areadlinkat (int fd, char const *filename); 28 | #endif 29 | 30 | #if GNULIB_AREADLINKAT_WITH_SIZE 31 | extern char *areadlinkat_with_size (int fd, char const *filename, 32 | size_t size_hint); 33 | #endif 34 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/arg-nonnull.h: -------------------------------------------------------------------------------- 1 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools 2 | that the values passed as arguments n, ..., m must be non-NULL pointers. 3 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ 4 | #ifndef _GL_ARG_NONNULL 5 | # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 6 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 7 | # else 8 | # define _GL_ARG_NONNULL(params) 9 | # endif 10 | #endif 11 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/ascii.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * ASCII 22 | */ 23 | 24 | static int 25 | ascii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n) 26 | { 27 | unsigned char c = *s; 28 | if (c < 0x80) { 29 | *pwc = (ucs4_t) c; 30 | return 1; 31 | } 32 | return RET_ILSEQ; 33 | } 34 | 35 | static int 36 | ascii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n) 37 | { 38 | if (wc < 0x0080) { 39 | *r = wc; 40 | return 1; 41 | } 42 | return RET_ILUNI; 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/binary-io.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #define BINARY_IO_INLINE _GL_EXTERN_INLINE 3 | #include "binary-io.h" 4 | typedef int dummy; 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/c-ctype.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #define C_CTYPE_INLINE _GL_EXTERN_INLINE 3 | #include "c-ctype.h" 4 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_aix.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0, 2 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_1, 3 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2, 4 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_3, 5 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4, 6 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_5, 7 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6, 8 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10, 9 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_14, 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_aix_sysaix.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0, 2 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2, 3 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4, 4 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6, 5 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_8, 6 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10, 7 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_12, 8 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_16, 9 | (int)(long)&((struct stringpool2_t *)0)->stringpool_aix_20, 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_dos.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_0, 2 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_4, 3 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_5, 4 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_8, 5 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_12, 6 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_13, 7 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_17, 8 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_21, 9 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_22, 10 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_26, 11 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_31, 12 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_35, 13 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_38, 14 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_42, 15 | (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_47, 16 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_extra.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_0, 2 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_2, 3 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_4, 4 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_6, 5 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_7, 6 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_9, 7 | (int)(long)&((struct stringpool2_t *)0)->stringpool_extra_11, 8 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_local.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool_t *)0)->stringpool_str193, 2 | (int)(long)&((struct stringpool_t *)0)->stringpool_str496, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_local_sysaix.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool_t *)0)->stringpool_str15, 2 | (int)(long)&((struct stringpool_t *)0)->stringpool_str484, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_local_syshpux.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool_t *)0)->stringpool_str171, 2 | (int)(long)&((struct stringpool_t *)0)->stringpool_str723, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_local_sysosf1.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool_t *)0)->stringpool_str193, 2 | (int)(long)&((struct stringpool_t *)0)->stringpool_str457, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_local_syssolaris.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool_t *)0)->stringpool_str112, 2 | (int)(long)&((struct stringpool_t *)0)->stringpool_str491, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_osf1.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0, 2 | (int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_1, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/canonical_osf1_sysosf1.h: -------------------------------------------------------------------------------- 1 | (int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0, 2 | (int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_2, 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/cns11643.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * CNS 11643-1992 22 | */ 23 | 24 | /* ISO-2022-CN and EUC-TW use CNS 11643-1992 planes 1 to 7. We also 25 | * have a table for the older plane 15. We use a trick to keep the 26 | * Unicode -> CNS 11643 table as small as possible (see cns11643_inv.h). 27 | */ 28 | 29 | #include "cns11643_1.h" 30 | #include "cns11643_2.h" 31 | #include "cns11643_3.h" 32 | #include "cns11643_4.h" 33 | #include "cns11643_5.h" 34 | #include "cns11643_6.h" 35 | #include "cns11643_7.h" 36 | #include "cns11643_15.h" 37 | #include "cns11643_inv.h" 38 | 39 | /* Returns the plane number (1,...,7,15) in r[0], the two bytes in r[1],r[2]. */ 40 | #define cns11643_wctomb cns11643_inv_wctomb 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/cp943.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * IBM CP943 22 | */ 23 | 24 | /* This is essentially CP932, with many mappings missing in the AIX conversion 25 | table. We just pretend it were the same as CP932. */ 26 | 27 | #define cp943_mbtowc cp932_mbtowc 28 | #define cp943_wctomb cp932_wctomb 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/encodings_local.def: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000-2001 Free Software Foundation, Inc. 2 | This file is part of the GNU LIBICONV Library. 3 | 4 | The GNU LIBICONV Library is free software; you can redistribute it 5 | and/or modify it under the terms of the GNU Library General Public 6 | License as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | The GNU LIBICONV Library is distributed in the hope that it will be 10 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with the GNU LIBICONV Library; see the file COPYING.LIB. 16 | If not, see . */ 17 | 18 | /* Names for locale dependent encodings. */ 19 | 20 | DEFENCODING(( "CHAR", 21 | ), 22 | local_char, 23 | { NULL, NULL }, { NULL, NULL }) 24 | 25 | DEFENCODING(( "WCHAR_T", /* glibc */ 26 | ), 27 | local_wchar_t, 28 | { NULL, NULL }, { NULL, NULL }) 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/encodings_osf1.def: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2008 Free Software Foundation, Inc. 2 | This file is part of the GNU LIBICONV Library. 3 | 4 | The GNU LIBICONV Library is free software; you can redistribute it 5 | and/or modify it under the terms of the GNU Library General Public 6 | License as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | The GNU LIBICONV Library is distributed in the hope that it will be 10 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with the GNU LIBICONV Library; see the file COPYING.LIB. 16 | If not, see . */ 17 | 18 | /* Encodings used by system dependent locales on OSF/1 a.k.a. Tru64. */ 19 | 20 | DEFENCODING(( "DEC-KANJI", 21 | ), 22 | dec_kanji, 23 | { dec_kanji_mbtowc, NULL }, { dec_kanji_wctomb, NULL }) 24 | #ifdef USE_OSF1_ALIASES 25 | DEFALIAS( "DECKANJI", /* OSF/1 */ 26 | dec_kanji) 27 | #endif 28 | 29 | DEFENCODING(( "DEC-HANYU", 30 | ), 31 | dec_hanyu, 32 | { dec_hanyu_mbtowc, NULL }, { dec_hanyu_wctomb, NULL }) 33 | #ifdef USE_OSF1_ALIASES 34 | DEFALIAS( "DECHANYU", /* OSF/1 */ 35 | dec_hanyu) 36 | #endif 37 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/flushwc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | #ifndef _FLUSHWC_H 21 | #define _FLUSHWC_H 22 | 23 | static int 24 | normal_flushwc (conv_t conv, ucs4_t *pwc) 25 | { 26 | ucs4_t last_wc = conv->istate; 27 | if (last_wc) { 28 | /* Output the buffered character. */ 29 | conv->istate = 0; 30 | *pwc = (ucs4_t) last_wc; 31 | return 1; 32 | } else 33 | return 0; 34 | } 35 | 36 | #endif /* _FLUSHWC_H */ 37 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/getprogname.h: -------------------------------------------------------------------------------- 1 | /* Program name management. 2 | Copyright (C) 2016-2017 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | #ifndef _GL_GETPROGNAME_H 18 | #define _GL_GETPROGNAME_H 19 | 20 | #include "stdlib.h" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /* Return the base name of the executing program. 27 | On native Windows this will usually end in ".exe" or ".EXE". */ 28 | #ifndef HAVE_GETPROGNAME 29 | extern char const *getprogname (void) 30 | # ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME 31 | _GL_ATTRIBUTE_PURE 32 | # endif 33 | ; 34 | #endif 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/iso8859_1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * ISO-8859-1 22 | */ 23 | 24 | static int 25 | iso8859_1_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n) 26 | { 27 | unsigned char c = *s; 28 | *pwc = (ucs4_t) c; 29 | return 1; 30 | } 31 | 32 | static int 33 | iso8859_1_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n) 34 | { 35 | if (wc < 0x0100) { 36 | *r = wc; 37 | return 1; 38 | } 39 | return RET_ILUNI; 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/localcharset.h: -------------------------------------------------------------------------------- 1 | /* Determine a canonical name for the current locale's character encoding. 2 | Copyright (C) 2000-2003 Free Software Foundation, Inc. 3 | This file is part of the GNU CHARSET Library. 4 | 5 | This program is free software; you can redistribute it and/or modify it 6 | under the terms of the GNU Library General Public License as published 7 | by the Free Software Foundation; either version 2, or (at your option) 8 | any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public License 16 | along with this program; if not, see . */ 17 | 18 | #ifndef _LOCALCHARSET_H 19 | #define _LOCALCHARSET_H 20 | 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | 27 | /* Determine the current locale's character encoding, and canonicalize it 28 | into one of the canonical names listed in config.charset. 29 | The result must not be freed; it is statically allocated. 30 | If the canonical name cannot be determined, the result is a non-canonical 31 | name. */ 32 | extern const char * locale_charset (void); 33 | 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | 40 | #endif /* _LOCALCHARSET_H */ 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/loops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2000 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* This file defines all the loops. */ 21 | 22 | #include "loop_unicode.h" 23 | #include "loop_wchar.h" 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/msvc-nothrow.c: -------------------------------------------------------------------------------- 1 | /* Wrappers that don't throw invalid parameter notifications 2 | with MSVC runtime libraries. 3 | Copyright (C) 2011-2017 Free Software Foundation, Inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 3, or (at your option) 8 | any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, see . */ 17 | 18 | #include "config.h" 19 | 20 | /* Specification. */ 21 | #include "msvc-nothrow.h" 22 | 23 | /* Get declarations of the native Windows API functions. */ 24 | #define WIN32_LEAN_AND_MEAN 25 | 26 | #include "msvc-inval.h" 27 | 28 | #undef _get_osfhandle 29 | 30 | #if HAVE_MSVC_INVALID_PARAMETER_HANDLER 31 | #include 32 | intptr_t 33 | _gl_nothrow_get_osfhandle (int fd) 34 | { 35 | intptr_t result; 36 | 37 | TRY_MSVC_INVAL 38 | { 39 | result = _get_osfhandle (fd); 40 | } 41 | CATCH_MSVC_INVAL 42 | { 43 | result = (intptr_t) INVALID_HANDLE_VALUE; 44 | } 45 | DONE_MSVC_INVAL; 46 | 47 | return result; 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/ucs4be.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000, 2016 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * UCS-4BE = UCS-4 big endian 22 | */ 23 | 24 | static int 25 | ucs4be_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n) 26 | { 27 | if (n >= 4) { 28 | *pwc = (s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3]; 29 | return 4; 30 | } 31 | return RET_TOOFEW(0); 32 | } 33 | 34 | static int 35 | ucs4be_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n) 36 | { 37 | if (n >= 4) { 38 | r[0] = (unsigned char) (wc >> 24); 39 | r[1] = (unsigned char) (wc >> 16); 40 | r[2] = (unsigned char) (wc >> 8); 41 | r[3] = (unsigned char) wc; 42 | return 4; 43 | } else 44 | return RET_TOOSMALL; 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/ucs4internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000, 2016 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * UCS-4-INTERNAL = UCS-4 with machine dependent endianness and alignment 22 | */ 23 | 24 | static int 25 | ucs4internal_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n) 26 | { 27 | if (n >= 4) { 28 | *pwc = *(const unsigned int *)s; 29 | return 4; 30 | } 31 | return RET_TOOFEW(0); 32 | } 33 | 34 | static int 35 | ucs4internal_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n) 36 | { 37 | if (n >= 4) { 38 | *(unsigned int *)r = wc; 39 | return 4; 40 | } else 41 | return RET_TOOSMALL; 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/ucs4le.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000, 2016 Free Software Foundation, Inc. 3 | * This file is part of the GNU LIBICONV Library. 4 | * 5 | * The GNU LIBICONV Library is free software; you can redistribute it 6 | * and/or modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * The GNU LIBICONV Library is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with the GNU LIBICONV Library; see the file COPYING.LIB. 17 | * If not, see . 18 | */ 19 | 20 | /* 21 | * UCS-4LE = UCS-4 little endian 22 | */ 23 | 24 | static int 25 | ucs4le_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n) 26 | { 27 | if (n >= 4) { 28 | *pwc = s[0] + (s[1] << 8) + (s[2] << 16) + (s[3] << 24); 29 | return 4; 30 | } 31 | return RET_TOOFEW(0); 32 | } 33 | 34 | static int 35 | ucs4le_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n) 36 | { 37 | if (n >= 4) { 38 | r[0] = (unsigned char) wc; 39 | r[1] = (unsigned char) (wc >> 8); 40 | r[2] = (unsigned char) (wc >> 16); 41 | r[3] = (unsigned char) (wc >> 24); 42 | return 4; 43 | } else 44 | return RET_TOOSMALL; 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/unistd.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE 3 | #include "unistd.h" 4 | typedef int dummy; 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/uniwidth/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/cpp/iconv/uniwidth/.dirstamp -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/uniwidth/width.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/cpp/iconv/uniwidth/width.o -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/xreadlink.h: -------------------------------------------------------------------------------- 1 | /* Reading symbolic links without size limitation. 2 | 3 | Copyright (C) 2001, 2003-2004, 2007, 2009-2017 Free Software Foundation, 4 | Inc. 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . */ 18 | 19 | /* Written by Jim Meyering */ 20 | 21 | extern char *xreadlink (char const *filename); 22 | 23 | #if GNULIB_XREADLINKAT 24 | extern char *xreadlinkat (int fd, char const *filename); 25 | #endif 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/iconv/xstrdup.c: -------------------------------------------------------------------------------- 1 | /* xstrdup.c -- copy a string with out of memory checking 2 | Copyright (C) 1990, 1996, 2000-2003, 2005-2006 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include "config.h" 18 | 19 | /* Specification. */ 20 | #include "xalloc.h" 21 | 22 | #include 23 | 24 | /* Return a newly allocated copy of the N bytes of memory starting at P. */ 25 | 26 | void * 27 | xmemdup (const void *p, size_t n) 28 | { 29 | void *q = xmalloc (n); 30 | memcpy (q, p, n); 31 | return q; 32 | } 33 | 34 | /* Return a newly allocated copy of STRING. */ 35 | 36 | char * 37 | xstrdup (const char *string) 38 | { 39 | return strcpy (XNMALLOC (strlen (string) + 1, char), string); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/libxml2/enc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Summary: Internal Interfaces for encoding in libxml2 3 | * Description: this module describes a few interfaces which were 4 | * addded along with the API changes in 2.9.0 5 | * those are private routines at this point 6 | * 7 | * Copy: See Copyright for the status of this software. 8 | * 9 | * Author: Daniel Veillard 10 | */ 11 | 12 | #ifndef __XML_ENC_H__ 13 | #define __XML_ENC_H__ 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | int xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, 22 | xmlBufferPtr in, int len); 23 | int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len); 24 | int xmlCharEncInput(xmlParserInputBufferPtr input, int flush); 25 | int xmlCharEncOutput(xmlOutputBufferPtr output, int init); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* __XML_ENC_H__ */ 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/cpp/libxml2/include/libxml/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | xmlincdir = $(includedir)/libxml2/libxml 4 | 5 | xmlinc_HEADERS = \ 6 | SAX.h \ 7 | entities.h \ 8 | encoding.h \ 9 | parser.h \ 10 | parserInternals.h \ 11 | xmlerror.h \ 12 | HTMLparser.h \ 13 | HTMLtree.h \ 14 | debugXML.h \ 15 | tree.h \ 16 | list.h \ 17 | hash.h \ 18 | xpath.h \ 19 | xpathInternals.h \ 20 | xpointer.h \ 21 | xinclude.h \ 22 | xmlIO.h \ 23 | xmlmemory.h \ 24 | nanohttp.h \ 25 | nanoftp.h \ 26 | uri.h \ 27 | valid.h \ 28 | xlink.h \ 29 | xmlversion.h \ 30 | DOCBparser.h \ 31 | catalog.h \ 32 | threads.h \ 33 | globals.h \ 34 | c14n.h \ 35 | xmlautomata.h \ 36 | xmlregexp.h \ 37 | xmlmodule.h \ 38 | xmlschemas.h \ 39 | schemasInternals.h \ 40 | xmlschemastypes.h \ 41 | xmlstring.h \ 42 | xmlunicode.h \ 43 | xmlreader.h \ 44 | relaxng.h \ 45 | dict.h \ 46 | SAX2.h \ 47 | xmlexports.h \ 48 | xmlwriter.h \ 49 | chvalid.h \ 50 | pattern.h \ 51 | xmlsave.h \ 52 | schematron.h 53 | 54 | EXTRA_DIST = xmlversion.h.in 55 | -------------------------------------------------------------------------------- /app/src/main/cpp/libxml2/include/libxml/xmlmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Summary: dynamic module loading 3 | * Description: basic API for dynamic module loading, used by 4 | * libexslt added in 2.6.17 5 | * 6 | * Copy: See Copyright for the status of this software. 7 | * 8 | * Author: Joel W. Reed 9 | */ 10 | 11 | #ifndef __XML_MODULE_H__ 12 | #define __XML_MODULE_H__ 13 | 14 | #include 15 | 16 | #ifdef LIBXML_MODULES_ENABLED 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /** 23 | * xmlModulePtr: 24 | * 25 | * A handle to a dynamically loaded module 26 | */ 27 | typedef struct _xmlModule xmlModule; 28 | typedef xmlModule *xmlModulePtr; 29 | 30 | /** 31 | * xmlModuleOption: 32 | * 33 | * enumeration of options that can be passed down to xmlModuleOpen() 34 | */ 35 | typedef enum { 36 | XML_MODULE_LAZY = 1, /* lazy binding */ 37 | XML_MODULE_LOCAL= 2 /* local binding */ 38 | } xmlModuleOption; 39 | 40 | XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename, 41 | int options); 42 | 43 | XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module, 44 | const char* name, 45 | void **result); 46 | 47 | XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module); 48 | 49 | XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif /* LIBXML_MODULES_ENABLED */ 56 | 57 | #endif /*__XML_MODULE_H__ */ 58 | -------------------------------------------------------------------------------- /app/src/main/cpp/libxml2/save.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Summary: Internal Interfaces for saving in libxml2 3 | * Description: this module describes a few interfaces which were 4 | * addded along with the API changes in 2.9.0 5 | * those are private routines at this point 6 | * 7 | * Copy: See Copyright for the status of this software. 8 | * 9 | * Author: Daniel Veillard 10 | */ 11 | 12 | #ifndef __XML_SAVE_H__ 13 | #define __XML_SAVE_H__ 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #ifdef LIBXML_OUTPUT_ENABLED 22 | void xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc, 23 | xmlAttrPtr attr, const xmlChar * string); 24 | void xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table); 25 | void xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem); 26 | void xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr); 27 | void xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent); 28 | xmlChar *xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input); 29 | #endif 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* __XML_SAVE_H__ */ 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/cpp/libxml2/xzlib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * xzlib.h: header for the front end for the transparent suport of lzma 3 | * compression at the I/O layer 4 | * 5 | * See Copyright for the status of this software. 6 | * 7 | * Anders F Bjorklund 8 | */ 9 | 10 | #ifndef LIBXML2_XZLIB_H 11 | #define LIBXML2_XZLIB_H 12 | typedef void *xzFile; /* opaque lzma file descriptor */ 13 | 14 | xzFile __libxml2_xzopen(const char *path, const char *mode); 15 | xzFile __libxml2_xzdopen(int fd, const char *mode); 16 | int __libxml2_xzread(xzFile file, void *buf, unsigned len); 17 | int __libxml2_xzclose(xzFile file); 18 | int __libxml2_xzcompressed(xzFile f); 19 | #endif /* LIBXML2_XZLIB_H */ 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/include/mruby/irep.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** mruby/irep.h - mrb_irep structure 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #ifndef MRUBY_IREP_H 8 | #define MRUBY_IREP_H 9 | 10 | #include "common.h" 11 | #include 12 | 13 | /** 14 | * Compiled mruby scripts. 15 | */ 16 | MRB_BEGIN_DECL 17 | 18 | enum irep_pool_type { 19 | IREP_TT_STRING, 20 | IREP_TT_FIXNUM, 21 | IREP_TT_FLOAT, 22 | }; 23 | 24 | struct mrb_locals { 25 | mrb_sym name; 26 | uint16_t r; 27 | }; 28 | 29 | /* Program data array struct */ 30 | typedef struct mrb_irep { 31 | uint16_t nlocals; /* Number of local variables */ 32 | uint16_t nregs; /* Number of register variables */ 33 | uint8_t flags; 34 | 35 | mrb_code *iseq; 36 | mrb_value *pool; 37 | mrb_sym *syms; 38 | struct mrb_irep **reps; 39 | 40 | struct mrb_locals *lv; 41 | /* debug info */ 42 | const char *filename; 43 | uint16_t *lines; 44 | struct mrb_irep_debug_info* debug_info; 45 | 46 | size_t ilen, plen, slen, rlen, refcnt; 47 | } mrb_irep; 48 | 49 | #define MRB_ISEQ_NO_FREE 1 50 | 51 | MRB_API mrb_irep *mrb_add_irep(mrb_state *mrb); 52 | MRB_API mrb_value mrb_load_irep(mrb_state*, const uint8_t*); 53 | MRB_API mrb_value mrb_load_irep_cxt(mrb_state*, const uint8_t*, mrbc_context*); 54 | void mrb_irep_free(mrb_state*, struct mrb_irep*); 55 | void mrb_irep_incref(mrb_state*, struct mrb_irep*); 56 | void mrb_irep_decref(mrb_state*, struct mrb_irep*); 57 | 58 | MRB_END_DECL 59 | 60 | #endif /* MRUBY_IREP_H */ 61 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/include/mruby/object.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** mruby/object.h - mruby object definition 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #ifndef MRUBY_OBJECT_H 8 | #define MRUBY_OBJECT_H 9 | 10 | #define MRB_OBJECT_HEADER \ 11 | enum mrb_vtype tt:8;\ 12 | uint32_t color:3;\ 13 | uint32_t flags:21;\ 14 | struct RClass *c;\ 15 | struct RBasic *gcnext 16 | 17 | #define MRB_FLAG_TEST(obj, flag) ((obj)->flags & flag) 18 | 19 | 20 | struct RBasic { 21 | MRB_OBJECT_HEADER; 22 | }; 23 | #define mrb_basic_ptr(v) ((struct RBasic*)(mrb_ptr(v))) 24 | 25 | struct RObject { 26 | MRB_OBJECT_HEADER; 27 | struct iv_tbl *iv; 28 | }; 29 | #define mrb_obj_ptr(v) ((struct RObject*)(mrb_ptr(v))) 30 | 31 | #define mrb_immediate_p(x) (mrb_type(x) < MRB_TT_HAS_BASIC) 32 | #define mrb_special_const_p(x) mrb_immediate_p(x) 33 | 34 | struct RFiber { 35 | MRB_OBJECT_HEADER; 36 | struct mrb_context *cxt; 37 | }; 38 | 39 | #endif /* MRUBY_OBJECT_H */ 40 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/include/mruby/range.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** mruby/range.h - Range class 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #ifndef MRUBY_RANGE_H 8 | #define MRUBY_RANGE_H 9 | 10 | #include "common.h" 11 | 12 | /** 13 | * Range class 14 | */ 15 | MRB_BEGIN_DECL 16 | 17 | typedef struct mrb_range_edges { 18 | mrb_value beg; 19 | mrb_value end; 20 | } mrb_range_edges; 21 | 22 | struct RRange { 23 | MRB_OBJECT_HEADER; 24 | mrb_range_edges *edges; 25 | mrb_bool excl : 1; 26 | }; 27 | 28 | #define mrb_range_ptr(v) ((struct RRange*)(mrb_ptr(v))) 29 | #define mrb_range_value(p) mrb_obj_value((void*)(p)) 30 | 31 | /* 32 | * Initializes a Range. 33 | * 34 | * If the third parameter is FALSE then it includes the last value in the range. 35 | * If the third parameter is TRUE then it excludes the last value in the range. 36 | * 37 | * @param start the beginning value. 38 | * @param end the ending value. 39 | * @param exclude represents the inclusion or exclusion of the last value. 40 | */ 41 | MRB_API mrb_value mrb_range_new(mrb_state *mrb, mrb_value start, mrb_value end, mrb_bool exclude); 42 | 43 | MRB_API mrb_bool mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, mrb_int len); 44 | mrb_value mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, const mrb_value *argv, mrb_value (*func)(mrb_state*, mrb_value, mrb_int)); 45 | 46 | MRB_END_DECL 47 | 48 | #endif /* MRUBY_RANGE_H */ 49 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/include/mruby/re.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** mruby/re.h - Regexp class 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #ifndef MRUBY_RE_H 8 | #define MRUBY_RE_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #define REGEXP_CLASS "Regexp" 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif /* RE_H */ 21 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/include/mruby/throw.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** mruby/throw.h - mruby exception throwing handler 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #ifndef MRB_THROW_H 8 | #define MRB_THROW_H 9 | 10 | #ifdef MRB_ENABLE_CXX_EXCEPTION 11 | 12 | #define MRB_TRY(buf) do { try { 13 | #define MRB_CATCH(buf) } catch(mrb_jmpbuf_impl e) { if (e != (buf)->impl) { throw e; } 14 | #define MRB_END_EXC(buf) } } while(0) 15 | 16 | #define MRB_THROW(buf) throw((buf)->impl) 17 | typedef mrb_int mrb_jmpbuf_impl; 18 | 19 | #else 20 | 21 | #include 22 | 23 | #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 24 | #define MRB_SETJMP _setjmp 25 | #define MRB_LONGJMP _longjmp 26 | #else 27 | #define MRB_SETJMP setjmp 28 | #define MRB_LONGJMP longjmp 29 | #endif 30 | 31 | #define MRB_TRY(buf) do { if (MRB_SETJMP((buf)->impl) == 0) { 32 | #define MRB_CATCH(buf) } else { 33 | #define MRB_END_EXC(buf) } } while(0) 34 | 35 | #define MRB_THROW(buf) MRB_LONGJMP((buf)->impl, 1); 36 | #define mrb_jmpbuf_impl jmp_buf 37 | 38 | #endif 39 | 40 | struct mrb_jmpbuf { 41 | mrb_jmpbuf_impl impl; 42 | 43 | #ifdef MRB_ENABLE_CXX_EXCEPTION 44 | static mrb_int jmpbuf_id; 45 | mrb_jmpbuf() : impl(jmpbuf_id++) {} 46 | #endif 47 | }; 48 | 49 | #endif /* MRB_THROW_H */ 50 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/lib/mruby/source.rb: -------------------------------------------------------------------------------- 1 | require "pathname" 2 | 3 | module MRuby 4 | module Source 5 | # MRuby's source root directory 6 | ROOT = Pathname.new(File.expand_path('../../../',__FILE__)) 7 | 8 | # Reads a constant defined at version.h 9 | MRUBY_READ_VERSION_CONSTANT = Proc.new { |name| ROOT.join('include','mruby','version.h').read.match(/^#define #{name} +"?([\w\. ]+)"?$/)[1] } 10 | 11 | MRUBY_RUBY_VERSION = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_VERSION'] 12 | MRUBY_RUBY_ENGINE = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_ENGINE'] 13 | 14 | MRUBY_RELEASE_MAJOR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MAJOR']) 15 | MRUBY_RELEASE_MINOR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MINOR']) 16 | MRUBY_RELEASE_TEENY = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_TEENY']) 17 | 18 | MRUBY_VERSION = [MRUBY_RELEASE_MAJOR,MRUBY_RELEASE_MINOR,MRUBY_RELEASE_TEENY].join('.') 19 | MRUBY_RELEASE_NO = (MRUBY_RELEASE_MAJOR * 100 * 100 + MRUBY_RELEASE_MINOR * 100 + MRUBY_RELEASE_TEENY) 20 | 21 | MRUBY_RELEASE_YEAR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_YEAR']) 22 | MRUBY_RELEASE_MONTH = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MONTH']) 23 | MRUBY_RELEASE_DAY = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_DAY']) 24 | MRUBY_RELEASE_DATE = [MRUBY_RELEASE_YEAR,MRUBY_RELEASE_MONTH,MRUBY_RELEASE_DAY].join('.') 25 | 26 | MRUBY_BIRTH_YEAR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_BIRTH_YEAR']) 27 | 28 | MRUBY_AUTHOR = MRUBY_READ_VERSION_CONSTANT['MRUBY_AUTHOR'] 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-compiler/bintest/mrbc.rb: -------------------------------------------------------------------------------- 1 | require 'tempfile' 2 | 3 | assert('Compiling multiple files without new line in last line. #2361') do 4 | a, b, out = Tempfile.new('a.rb'), Tempfile.new('b.rb'), Tempfile.new('out.mrb') 5 | a.write('module A; end') 6 | a.flush 7 | b.write('module B; end') 8 | b.flush 9 | result = `#{cmd('mrbc')} -c -o #{out.path} #{a.path} #{b.path} 2>&1` 10 | assert_equal "#{cmd('mrbc')}:#{a.path}:Syntax OK", result.chomp 11 | assert_equal 0, $?.exitstatus 12 | end 13 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-enum-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-enum-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Enumerable module extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-enum-lazy/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-enum-lazy') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Enumerable::Lazy class' 5 | spec.add_dependency('mruby-enumerator', :core => 'mruby-enumerator') 6 | spec.add_dependency('mruby-enum-ext', :core => 'mruby-enum-ext') 7 | end 8 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-enum-lazy/test/lazy.rb: -------------------------------------------------------------------------------- 1 | assert("Enumerable::Lazy") do 2 | a = [1, 2] 3 | assert_equal Enumerable::Lazy, a.lazy.class 4 | end 5 | 6 | assert("Enumerable::Lazy laziness") do 7 | a = Object.new 8 | def a.each 9 | return to_enum :each unless block_given? 10 | self.b << 10 11 | yield 1 12 | self.b << 20 13 | yield 2 14 | self.b << 30 15 | yield 3 16 | self.b << 40 17 | yield 4 18 | self.b << 50 19 | yield 5 20 | end 21 | def a.b(b=nil) 22 | @b = b if b 23 | @b 24 | end 25 | 26 | a.b([]) 27 | assert_equal [1,2], a.each.lazy.take(2).force 28 | assert_equal [10,20], a.b 29 | 30 | a.b([]) 31 | assert_equal [2,4], a.each.lazy.select{|x|x%2==0}.take(2).force 32 | assert_equal [10,20,30,40], a.b 33 | 34 | a.b([]) 35 | assert_equal [1], a.each.lazy.take_while{|x|x<2}.take(1).force 36 | assert_equal [10], a.b 37 | 38 | a.b([]) 39 | assert_equal [1], a.each.lazy.take_while{|x|x<2}.take(4).force 40 | assert_equal [10,20], a.b 41 | end 42 | 43 | assert("Enumerable::Lazy#zip with cycle") do 44 | e1 = [1, 2, 3].cycle 45 | e2 = [:a, :b].cycle 46 | assert_equal [[1,:a],[2,:b],[3,:a]], e1.lazy.zip(e2).first(3) 47 | end 48 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-enumerator/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-enumerator') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.add_dependency('mruby-fiber', :core => 'mruby-fiber') 5 | spec.add_dependency 'mruby-enum-ext', :core => 'mruby-enum-ext' 6 | spec.summary = 'Enumerator class' 7 | end 8 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-env/.travis.yml: -------------------------------------------------------------------------------- 1 | script: 2 | - "ruby run_test.rb all test" 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-eval/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include "mruby.h" 10 | void mrb_mruby_eval_gem_init(mrb_state *mrb); 11 | void mrb_mruby_eval_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_eval_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_eval_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_eval_gem_final(mrb_state *mrb) { 20 | mrb_mruby_eval_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-fiber/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include 10 | void mrb_mruby_fiber_gem_init(mrb_state *mrb); 11 | void mrb_mruby_fiber_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_fiber_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_fiber_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_fiber_gem_final(mrb_state *mrb) { 20 | mrb_mruby_fiber_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-fiber/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-fiber') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Fiber class' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-hash-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-hash-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Hash class extension' 5 | spec.add_dependency 'mruby-enum-ext', :core => 'mruby-enum-ext' 6 | spec.add_dependency 'mruby-array-ext', :core => 'mruby-array-ext' 7 | end 8 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** hash.c - Hash class 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | /* 12 | * call-seq: 13 | * hsh.values_at(key, ...) -> array 14 | * 15 | * Return an array containing the values associated with the given keys. 16 | * Also see Hash.select. 17 | * 18 | * h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" } 19 | * h.values_at("cow", "cat") #=> ["bovine", "feline"] 20 | */ 21 | 22 | static mrb_value 23 | hash_values_at(mrb_state *mrb, mrb_value hash) 24 | { 25 | mrb_value *argv, result; 26 | mrb_int argc, i; 27 | int ai; 28 | 29 | mrb_get_args(mrb, "*", &argv, &argc); 30 | result = mrb_ary_new_capa(mrb, argc); 31 | ai = mrb_gc_arena_save(mrb); 32 | for (i = 0; i < argc; i++) { 33 | mrb_ary_push(mrb, result, mrb_hash_get(mrb, hash, argv[i])); 34 | mrb_gc_arena_restore(mrb, ai); 35 | } 36 | return result; 37 | } 38 | 39 | void 40 | mrb_mruby_hash_ext_gem_init(mrb_state *mrb) 41 | { 42 | struct RClass *h; 43 | 44 | h = mrb->hash_class; 45 | mrb_define_method(mrb, h, "values_at", hash_values_at, MRB_ARGS_ANY()); 46 | } 47 | 48 | void 49 | mrb_mruby_hash_ext_gem_final(mrb_state *mrb) 50 | { 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-http/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include "mruby.h" 10 | void mrb_mruby_http_gem_init(mrb_state *mrb); 11 | void mrb_mruby_http_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_http_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_http_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_http_gem_final(mrb_state *mrb) { 20 | mrb_mruby_http_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-http/include/mrb_http.h: -------------------------------------------------------------------------------- 1 | #ifndef MRB_HTTP_H 2 | #define MRB_HTTP_H 3 | 4 | void mrb_mruby_http_gem_init(mrb_state*); 5 | 6 | #endif /* MRB_HTTP_H */ 7 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-io/.travis.yml: -------------------------------------------------------------------------------- 1 | script: 2 | - "ruby run_test.rb all test" 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-io/include/mruby/ext/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** io.h - IO class 3 | */ 4 | 5 | #ifndef MRUBY_IO_H 6 | #define MRUBY_IO_H 7 | 8 | #if defined(__cplusplus) 9 | extern "C" { 10 | #endif 11 | 12 | struct mrb_io { 13 | int fd; /* file descriptor, or -1 */ 14 | int fd2; /* file descriptor to write if it's different from fd, or -1 */ 15 | int pid; /* child's pid (for pipes) */ 16 | unsigned int readable:1, 17 | writable:1, 18 | sync:1; 19 | }; 20 | 21 | #define FMODE_READABLE 0x00000001 22 | #define FMODE_WRITABLE 0x00000002 23 | #define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE) 24 | #define FMODE_BINMODE 0x00000004 25 | #define FMODE_APPEND 0x00000040 26 | #define FMODE_CREATE 0x00000080 27 | #define FMODE_TRUNC 0x00000800 28 | 29 | #define E_IO_ERROR (mrb_class_get(mrb, "IOError")) 30 | #define E_EOF_ERROR (mrb_class_get(mrb, "EOFError")) 31 | 32 | mrb_value mrb_io_fileno(mrb_state *mrb, mrb_value io); 33 | 34 | #if defined(__cplusplus) 35 | } /* extern "C" { */ 36 | #endif 37 | #endif /* MRUBY_IO_H */ 38 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-io/src/mruby_io_gem.c: -------------------------------------------------------------------------------- 1 | #include "mruby.h" 2 | 3 | void mrb_init_io(mrb_state *mrb); 4 | void mrb_init_file(mrb_state *mrb); 5 | void mrb_init_file_test(mrb_state *mrb); 6 | 7 | #define DONE mrb_gc_arena_restore(mrb, 0) 8 | 9 | void 10 | mrb_mruby_io_gem_init(mrb_state* mrb) 11 | { 12 | mrb_init_io(mrb); DONE; 13 | mrb_init_file(mrb); DONE; 14 | mrb_init_file_test(mrb); DONE; 15 | } 16 | 17 | void 18 | mrb_mruby_io_gem_final(mrb_state* mrb) 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-kernel-ext/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include 10 | void mrb_mruby_kernel_ext_gem_init(mrb_state *mrb); 11 | void mrb_mruby_kernel_ext_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_kernel_ext_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_kernel_ext_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_kernel_ext_gem_final(mrb_state *mrb) { 20 | mrb_mruby_kernel_ext_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-kernel-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Kernel module extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-math/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include 10 | void mrb_mruby_math_gem_init(mrb_state *mrb); 11 | void mrb_mruby_math_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_math_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_math_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_math_gem_final(mrb_state *mrb) { 20 | mrb_mruby_math_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-math/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-math') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'standard Math module' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-numeric-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-numeric-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Numeric class extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb: -------------------------------------------------------------------------------- 1 | module Integral 2 | def div(other) 3 | self.divmod(other)[0] 4 | end 5 | 6 | def zero? 7 | self == 0 8 | end 9 | 10 | def nonzero? 11 | if self == 0 12 | nil 13 | else 14 | self 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static mrb_value 5 | mrb_int_chr(mrb_state *mrb, mrb_value x) 6 | { 7 | mrb_int chr; 8 | char c; 9 | 10 | chr = mrb_fixnum(x); 11 | if (chr >= (1 << CHAR_BIT)) { 12 | mrb_raisef(mrb, E_RANGE_ERROR, "%S out of char range", x); 13 | } 14 | c = (char)chr; 15 | 16 | return mrb_str_new(mrb, &c, 1); 17 | } 18 | 19 | void 20 | mrb_mruby_numeric_ext_gem_init(mrb_state* mrb) 21 | { 22 | struct RClass *i = mrb_class_get(mrb, "Integer"); 23 | 24 | mrb_define_method(mrb, i, "chr", mrb_int_chr, MRB_ARGS_NONE()); 25 | } 26 | 27 | void 28 | mrb_mruby_numeric_ext_gem_final(mrb_state* mrb) 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Numeric(Ext) Test 3 | 4 | assert('Integer#chr') do 5 | assert_equal("A", 65.chr) 6 | assert_equal("B", 0x42.chr) 7 | 8 | # multibyte encoding (not support yet) 9 | assert_raise(RangeError) { 256.chr } 10 | end 11 | 12 | assert('Integer#div') do 13 | assert_equal 52, 365.div(7) 14 | end 15 | 16 | assert('Float#div') do 17 | assert_float 52, 365.2425.div(7) 18 | end 19 | 20 | assert('Integer#zero?') do 21 | assert_equal true, 0.zero? 22 | assert_equal false, 1.zero? 23 | end 24 | 25 | assert('Integer#nonzero?') do 26 | assert_equal nil, 0.nonzero? 27 | assert_equal 1000, 1000.nonzero? 28 | end 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-object-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-object-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Object class extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-object-ext/mrblib/object.rb: -------------------------------------------------------------------------------- 1 | class Object 2 | ## 3 | # call-seq: 4 | # obj.tap{|x|...} -> obj 5 | # 6 | # Yields x to the block, and then returns x. 7 | # The primary purpose of this method is to "tap into" a method chain, 8 | # in order to perform operations on intermediate results within the chain. 9 | # 10 | # (1..10) .tap {|x| puts "original: #{x.inspect}"} 11 | # .to_a .tap {|x| puts "array: #{x.inspect}"} 12 | # .select {|x| x%2==0} .tap {|x| puts "evens: #{x.inspect}"} 13 | # .map { |x| x*x } .tap {|x| puts "squares: #{x.inspect}"} 14 | # 15 | def tap 16 | yield self 17 | self 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-object-ext/test/nil.rb: -------------------------------------------------------------------------------- 1 | assert('NilClass#to_a') do 2 | assert_equal [], nil.to_a 3 | end 4 | 5 | assert('NilClass#to_f') do 6 | assert_equal 0.0, nil.to_f 7 | end 8 | 9 | assert('NilClass#to_i') do 10 | assert_equal 0, nil.to_i 11 | end 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-object-ext/test/object.rb: -------------------------------------------------------------------------------- 1 | assert('Object#instance_exec') do 2 | class KlassWithSecret 3 | def initialize 4 | @secret = 99 5 | end 6 | end 7 | k = KlassWithSecret.new 8 | assert_equal 104, k.instance_exec(5) {|x| @secret+x } 9 | end 10 | 11 | assert('Object#tap') do 12 | ret = [] 13 | (1..10) .tap {|x| ret << "original: #{x.inspect}"} 14 | .to_a .tap {|x| ret << "array: #{x.inspect}"} 15 | .select {|x| x%2==0} .tap {|x| ret << "evens: #{x.inspect}"} 16 | .map { |x| x*x } .tap {|x| ret << "squares: #{x.inspect}"} 17 | 18 | assert_equal [ 19 | "original: 1..10", 20 | "array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", 21 | "evens: [2, 4, 6, 8, 10]", 22 | "squares: [4, 16, 36, 64, 100]" 23 | ], ret 24 | assert_equal(:tap_ok, Class.new {def m; tap{return :tap_ok}; end}.new.m) 25 | end 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-objectspace/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include 10 | void mrb_mruby_objectspace_gem_init(mrb_state *mrb); 11 | void mrb_mruby_objectspace_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_objectspace_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_objectspace_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_objectspace_gem_final(mrb_state *mrb) { 20 | mrb_mruby_objectspace_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-objectspace/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-objectspace') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'ObjectSpace class' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-print/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-print') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'standard print/puts/p' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-print/mrblib/print.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Kernel 3 | # 4 | # ISO 15.3.1 5 | module Kernel 6 | ## 7 | # Invoke method +print+ on STDOUT and passing +*args+ 8 | # 9 | # ISO 15.3.1.2.10 10 | def print(*args) 11 | i = 0 12 | len = args.size 13 | while i < len 14 | __printstr__ args[i].to_s 15 | i += 1 16 | end 17 | end 18 | 19 | ## 20 | # Invoke method +puts+ on STDOUT and passing +*args*+ 21 | # 22 | # ISO 15.3.1.2.11 23 | def puts(*args) 24 | i = 0 25 | len = args.size 26 | while i < len 27 | s = args[i].to_s 28 | __printstr__ s 29 | __printstr__ "\n" if (s[-1] != "\n") 30 | i += 1 31 | end 32 | __printstr__ "\n" if len == 0 33 | nil 34 | end 35 | 36 | ## 37 | # Print human readable object description 38 | # 39 | # ISO 15.3.1.3.34 40 | def p(*args) 41 | i = 0 42 | len = args.size 43 | while i < len 44 | __printstr__ args[i].inspect 45 | __printstr__ "\n" 46 | i += 1 47 | end 48 | args[0] 49 | end 50 | 51 | unless Kernel.respond_to?(:sprintf) 52 | def printf(*args) 53 | raise NotImplementedError.new('printf not available') 54 | end 55 | def sprintf(*args) 56 | raise NotImplementedError.new('sprintf not available') 57 | end 58 | else 59 | def printf(*args) 60 | __printstr__(sprintf(*args)) 61 | nil 62 | end 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-proc-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-proc-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Proc class extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-proc-ext/mrblib/proc.rb: -------------------------------------------------------------------------------- 1 | class Proc 2 | 3 | def ===(*args) 4 | call(*args) 5 | end 6 | 7 | def yield(*args) 8 | call(*args) 9 | end 10 | 11 | def to_proc 12 | self 13 | end 14 | 15 | def curry(arity=self.arity) 16 | type = :proc 17 | abs = lambda {|a| a < 0 ? -a - 1 : a} 18 | arity = abs[arity] 19 | if lambda? 20 | type = :lambda 21 | self_arity = self.arity 22 | if (self_arity >= 0 && arity != self_arity) || 23 | (self_arity < 0 && abs[self_arity] > arity) 24 | raise ArgumentError, "wrong number of arguments (#{arity} for #{abs[self_arity]})" 25 | end 26 | end 27 | 28 | pproc = self 29 | make_curry = proc do |given_args=[]| 30 | send(type) do |*args| 31 | new_args = given_args + args 32 | if new_args.size >= arity 33 | pproc[*new_args] 34 | else 35 | make_curry[new_args] 36 | end 37 | end 38 | end 39 | make_curry.call 40 | end 41 | 42 | end 43 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-random/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include 10 | void mrb_mruby_random_gem_init(mrb_state *mrb); 11 | void mrb_mruby_random_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_random_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_random_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_random_gem_final(mrb_state *mrb) { 20 | mrb_mruby_random_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-random/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-random') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Random class' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-random/src/mt19937ar.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** mt19937ar.h - MT Random functions 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #define N 624 8 | 9 | typedef struct { 10 | unsigned long mt[N]; 11 | int mti; 12 | union { 13 | unsigned long int_; 14 | double double_; 15 | } gen; 16 | 17 | mrb_int seed; 18 | mrb_bool has_seed : 1; 19 | } mt_state; 20 | 21 | void mrb_random_init_genrand(mt_state *, unsigned long); 22 | unsigned long mrb_random_genrand_int32(mt_state *); 23 | double mrb_random_genrand_real1(mt_state *t); 24 | 25 | /* initializes mt[N] with a seed */ 26 | void init_genrand(unsigned long s); 27 | 28 | /* initialize by an array with array-length */ 29 | /* init_key is the array for initializing keys */ 30 | /* key_length is its length */ 31 | /* slight change for C++, 2004/2/26 */ 32 | void init_by_array(unsigned long init_key[], int key_length); 33 | 34 | /* generates a random number on [0,0xffffffff]-interval */ 35 | unsigned long genrand_int32(void); 36 | 37 | /* generates a random number on [0,0x7fffffff]-interval */ 38 | long genrand_int31(void); 39 | 40 | /* These real versions are due to Isaku Wada, 2002/01/09 added */ 41 | /* generates a random number on [0,1]-real-interval */ 42 | double genrand_real1(void); 43 | 44 | /* generates a random number on [0,1)-real-interval */ 45 | double genrand_real2(void); 46 | 47 | /* generates a random number on (0,1)-real-interval */ 48 | double genrand_real3(void); 49 | 50 | /* generates a random number on [0,1) with 53-bit resolution*/ 51 | double genrand_res53(void); 52 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-random/src/random.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** random.h - Random module 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #ifndef MRUBY_RANDOM_H 8 | #define MRUBY_RANDOM_H 9 | 10 | void mrb_mruby_random_gem_init(mrb_state *mrb); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-range-ext/gem_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is loading the irep 3 | * Ruby GEM code. 4 | * 5 | * IMPORTANT: 6 | * This file was generated! 7 | * All manual changes will get lost. 8 | */ 9 | #include 10 | void mrb_mruby_range_ext_gem_init(mrb_state *mrb); 11 | void mrb_mruby_range_ext_gem_final(mrb_state *mrb); 12 | 13 | void GENERATED_TMP_mrb_mruby_range_ext_gem_init(mrb_state *mrb) { 14 | int ai = mrb_gc_arena_save(mrb); 15 | mrb_mruby_range_ext_gem_init(mrb); 16 | mrb_gc_arena_restore(mrb, ai); 17 | } 18 | 19 | void GENERATED_TMP_mrb_mruby_range_ext_gem_final(mrb_state *mrb) { 20 | mrb_mruby_range_ext_gem_final(mrb); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-range-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-range-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Range class extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-range-ext/test/range.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Range(Ext) Test 3 | 4 | assert('Range#cover?') do 5 | assert_true ("a".."z").cover?("c") 6 | assert_true !("a".."z").cover?("5") 7 | assert_true ("a".."z").cover?("cc") 8 | end 9 | 10 | assert('Range#first') do 11 | assert_equal 10, (10..20).first 12 | assert_equal [10, 11, 12], (10..20).first(3) 13 | end 14 | 15 | assert('Range#last') do 16 | assert_equal 20, (10..20).last 17 | assert_equal 20, (10...20).last 18 | assert_equal [18, 19, 20], (10..20).last(3) 19 | assert_equal [17, 18, 19], (10...20).last(3) 20 | end 21 | 22 | assert('Range#size') do 23 | assert_equal 42, (1..42).size 24 | assert_equal 41, (1...42).size 25 | assert_equal 6, (1...6.3).size 26 | assert_equal 5, (1...6.0).size 27 | assert_equal 5, (1.1...6).size 28 | assert_nil ('a'..'z').size 29 | end 30 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-require/.travis.yml: -------------------------------------------------------------------------------- 1 | script: 2 | - "ruby run_test.rb all test" 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-require/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-require') do |spec| 2 | spec.license = 'MIT' 3 | spec.authors = 'Internet Initiative Japan Inc.' 4 | 5 | spec.add_dependency 'mruby-array-ext' 6 | spec.add_dependency 'mruby-dir' 7 | spec.add_dependency 'mruby-io' 8 | spec.add_dependency 'mruby-tempfile' 9 | spec.add_dependency 'mruby-time' 10 | spec.add_dependency 'mruby-eval' 11 | 12 | spec.cc.include_paths << "#{build.root}/src" 13 | end 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-sprintf/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-sprintf') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'standard Kernel#sprintf method' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-sprintf/mrblib/string.rb: -------------------------------------------------------------------------------- 1 | class String 2 | def %(args) 3 | if args.is_a? Array 4 | sprintf(self, *args) 5 | else 6 | sprintf(self, args) 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-sprintf/src/kernel.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** kernel.c - Kernel module suppliment 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | 9 | mrb_value mrb_f_sprintf(mrb_state *mrb, mrb_value obj); /* in sprintf.c */ 10 | 11 | void 12 | mrb_mruby_sprintf_gem_init(mrb_state* mrb) 13 | { 14 | struct RClass *krn; 15 | 16 | if (mrb->kernel_module == NULL) { 17 | mrb->kernel_module = mrb_define_module(mrb, "Kernel"); /* Might be PARANOID. */ 18 | } 19 | krn = mrb->kernel_module; 20 | 21 | mrb_define_method(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_ANY()); 22 | mrb_define_method(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_ANY()); 23 | } 24 | 25 | void 26 | mrb_mruby_sprintf_gem_final(mrb_state* mrb) 27 | { 28 | /* nothing to do. */ 29 | } 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-sprintf/test/sprintf.rb: -------------------------------------------------------------------------------- 1 | #assert('Kernel.sprintf') do 2 | #end 3 | 4 | assert('String#%') do 5 | assert_equal "one=1", "one=%d" % 1 6 | assert_equal "1 one 1.0", "%d %s %3.1f" % [ 1, "one", 1.01 ] 7 | assert_equal "123 < 456", "%{num} < %s" % { num: 123, str: "456" } 8 | assert_equal 16, ("%b" % (1<<15)).size 9 | end 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-string-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-string-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'String class extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-struct/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-struct') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'standard Struct class' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-symbol-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-symbol-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'Symbol class extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-symbol-ext/mrblib/symbol.rb: -------------------------------------------------------------------------------- 1 | class Symbol 2 | include Comparable 3 | 4 | alias intern to_sym 5 | 6 | def to_proc 7 | ->(obj,*args,&block) do 8 | obj.__send__(self, *args, &block) 9 | end 10 | end 11 | 12 | ## 13 | # call-seq: 14 | # sym.capitalize -> symbol 15 | # 16 | # Same as sym.to_s.capitalize.intern. 17 | 18 | def capitalize 19 | (self.to_s.capitalize! || self).to_sym 20 | end 21 | 22 | ## 23 | # call-seq: 24 | # sym.downcase -> symbol 25 | # 26 | # Same as sym.to_s.downcase.intern. 27 | 28 | def downcase 29 | (self.to_s.downcase! || self).to_sym 30 | end 31 | 32 | ## 33 | # call-seq: 34 | # sym.upcase -> symbol 35 | # 36 | # Same as sym.to_s.upcase.intern. 37 | 38 | def upcase 39 | (self.to_s.upcase! || self).to_sym 40 | end 41 | 42 | ## 43 | # call-seq: 44 | # sym.casecmp(other) -> -1, 0, +1 or nil 45 | # 46 | # Case-insensitive version of Symbol#<=>. 47 | 48 | def casecmp(other) 49 | return nil unless other.kind_of?(Symbol) 50 | lhs = self.to_s; lhs.upcase! 51 | rhs = other.to_s; rhs.upcase! 52 | lhs <=> rhs 53 | end 54 | 55 | # 56 | # call-seq: 57 | # sym.empty? -> true or false 58 | # 59 | # Returns that _sym_ is :"" or not. 60 | 61 | def empty? 62 | self.length == 0 63 | end 64 | 65 | end 66 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Symbol(Ext) Test 3 | 4 | assert('Symbol#to_proc') do 5 | assert_equal 5, :abs.to_proc[-5] 6 | end 7 | 8 | assert('Symbol.all_symbols') do 9 | foo = [:__symbol_test_1, :__symbol_test_2, :__symbol_test_3].sort 10 | symbols = Symbol.all_symbols.select{|sym|sym.to_s.include? '__symbol_test'}.sort 11 | assert_equal foo, symbols 12 | end 13 | 14 | assert("Symbol#length") do 15 | assert_equal 5, :hello.size 16 | assert_equal 5, :mruby.length 17 | end 18 | 19 | assert("Symbol#capitalize") do 20 | assert_equal :Hello, :hello.capitalize 21 | assert_equal :Hello, :HELLO.capitalize 22 | assert_equal :Hello, :Hello.capitalize 23 | end 24 | 25 | assert("Symbol#downcase") do 26 | assert_equal :hello, :hEllO.downcase 27 | assert_equal :hello, :hello.downcase 28 | end 29 | 30 | assert("Symbol#upcase") do 31 | assert_equal :HELLO, :hEllO.upcase 32 | assert_equal :HELLO, :HELLO.upcase 33 | end 34 | 35 | assert("Symbol#casecmp") do 36 | assert_equal 0, :HELLO.casecmp(:hEllO) 37 | assert_equal 1, :HELLO.casecmp(:hEllN) 38 | assert_equal(-1, :HELLO.casecmp(:hEllP)) 39 | assert_nil :HELLO.casecmp("hEllO") 40 | end 41 | 42 | assert("Symbol#empty?") do 43 | assert_true :''.empty? 44 | end 45 | 46 | assert('Symbol#intern') do 47 | assert_equal :test, :test.intern 48 | end 49 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-tempfile/.travis.yml: -------------------------------------------------------------------------------- 1 | script: 2 | - "ruby run_test.rb all test" 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-time/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-time') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'standard Time class' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-time/mrblib/time.rb: -------------------------------------------------------------------------------- 1 | class Time 2 | def sunday?; wday == 0 end 3 | def monday?; wday == 1 end 4 | def tuesday?; wday == 2 end 5 | def wednesday?; wday == 3 end 6 | def thursday?; wday == 4 end 7 | def friday?; wday == 5 end 8 | def saturday?; wday == 6 end 9 | end 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-toplevel-ext/mrbgem.rake: -------------------------------------------------------------------------------- 1 | MRuby::Gem::Specification.new('mruby-toplevel-ext') do |spec| 2 | spec.license = 'MIT' 3 | spec.author = 'mruby developers' 4 | spec.summary = 'toplevel object (main) methods extension' 5 | end 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-toplevel-ext/mrblib/toplevel.rb: -------------------------------------------------------------------------------- 1 | 2 | def self.include (*modules) 3 | self.class.include(*modules) 4 | end 5 | 6 | def self.private(*methods) 7 | end 8 | def self.protected(*methods) 9 | end 10 | def self.public(*methods) 11 | end 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/mrbgems/mruby-toplevel-ext/test/toplevel.rb: -------------------------------------------------------------------------------- 1 | ## 2 | # Toplevel Self(Ext) Test 3 | 4 | assert('Toplevel#include') do 5 | module ToplevelTestModule1 6 | def method_foo 7 | :foo 8 | end 9 | 10 | CONST_BAR = :bar 11 | end 12 | 13 | module ToplevelTestModule2 14 | CONST_BAR = :bar2 15 | end 16 | 17 | self.include ToplevelTestModule2, ToplevelTestModule1 18 | 19 | assert_true self.class.included_modules.include?( ToplevelTestModule1 ) 20 | assert_true self.class.included_modules.include?( ToplevelTestModule2 ) 21 | assert_equal :foo, method_foo 22 | assert_equal :bar2, CONST_BAR 23 | end 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/compar.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** compar.c - Comparable module 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | 9 | void 10 | mrb_init_comparable(mrb_state *mrb) 11 | { 12 | mrb_define_module(mrb, "Comparable"); /* 15.3.3 */ 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/crc.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** crc.c - calculate CRC 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | /* Calculate CRC (CRC-16-CCITT) 12 | ** 13 | ** 0000_0000_0000_0000_0000_0000_0000_0000 14 | ** ^|------- CRC -------|- work --| 15 | ** carry 16 | */ 17 | #define CRC_16_CCITT 0x11021ul /* x^16+x^12+x^5+1 */ 18 | #define CRC_XOR_PATTERN (CRC_16_CCITT << 8) 19 | #define CRC_CARRY_BIT (0x01000000) 20 | 21 | uint16_t 22 | calc_crc_16_ccitt(const uint8_t *src, size_t nbytes, uint16_t crc) 23 | { 24 | size_t ibyte; 25 | uint32_t ibit; 26 | uint32_t crcwk = crc << 8; 27 | 28 | for (ibyte = 0; ibyte < nbytes; ibyte++) { 29 | crcwk |= *src++; 30 | for (ibit = 0; ibit < CHAR_BIT; ibit++) { 31 | crcwk <<= 1; 32 | if (crcwk & CRC_CARRY_BIT) { 33 | crcwk ^= CRC_XOR_PATTERN; 34 | } 35 | } 36 | } 37 | return (uint16_t)(crcwk >> 8); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/enum.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** enum.c - Enumerable module 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | 9 | void 10 | mrb_init_enumerable(mrb_state *mrb) 11 | { 12 | mrb_define_module(mrb, "Enumerable"); /* 15.3.2 */ 13 | } 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/error.h: -------------------------------------------------------------------------------- 1 | /* this header file is to be removed soon. 2 | added for compatibility purpose (1.0.0) */ 3 | #include 4 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/ext/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/cpp/mruby/src/ext/.gitkeep -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/init.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** init.c - initialize mruby core 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | 9 | void mrb_init_symtbl(mrb_state*); 10 | void mrb_init_class(mrb_state*); 11 | void mrb_init_object(mrb_state*); 12 | void mrb_init_kernel(mrb_state*); 13 | void mrb_init_comparable(mrb_state*); 14 | void mrb_init_enumerable(mrb_state*); 15 | void mrb_init_symbol(mrb_state*); 16 | void mrb_init_exception(mrb_state*); 17 | void mrb_init_proc(mrb_state*); 18 | void mrb_init_string(mrb_state*); 19 | void mrb_init_array(mrb_state*); 20 | void mrb_init_hash(mrb_state*); 21 | void mrb_init_numeric(mrb_state*); 22 | void mrb_init_range(mrb_state*); 23 | void mrb_init_gc(mrb_state*); 24 | void mrb_init_math(mrb_state*); 25 | void mrb_init_version(mrb_state*); 26 | void mrb_init_mrblib(mrb_state*); 27 | 28 | #define DONE mrb_gc_arena_restore(mrb, 0); 29 | void 30 | mrb_init_core(mrb_state *mrb) 31 | { 32 | mrb_init_symtbl(mrb); DONE; 33 | 34 | mrb_init_class(mrb); DONE; 35 | mrb_init_object(mrb); DONE; 36 | mrb_init_kernel(mrb); DONE; 37 | mrb_init_comparable(mrb); DONE; 38 | mrb_init_enumerable(mrb); DONE; 39 | 40 | mrb_init_symbol(mrb); DONE; 41 | mrb_init_exception(mrb); DONE; 42 | mrb_init_proc(mrb); DONE; 43 | mrb_init_string(mrb); DONE; 44 | mrb_init_array(mrb); DONE; 45 | mrb_init_hash(mrb); DONE; 46 | mrb_init_numeric(mrb); DONE; 47 | mrb_init_range(mrb); DONE; 48 | mrb_init_gc(mrb); DONE; 49 | mrb_init_version(mrb); DONE; 50 | mrb_init_mrblib(mrb); DONE; 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/mruby_core.rake: -------------------------------------------------------------------------------- 1 | MRuby.each_target do 2 | current_dir = File.dirname(__FILE__).relative_path_from(Dir.pwd) 3 | relative_from_root = File.dirname(__FILE__).relative_path_from(MRUBY_ROOT) 4 | current_build_dir = "#{build_dir}/#{relative_from_root}" 5 | 6 | objs = Dir.glob("#{current_dir}/*.c").map { |f| 7 | next nil if cxx_abi_enabled? and f =~ /(error|vm).c$/ 8 | objfile(f.pathmap("#{current_build_dir}/%n")) 9 | }.compact 10 | 11 | if cxx_abi_enabled? 12 | objs += %w(vm error).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" } 13 | end 14 | self.libmruby << objs 15 | 16 | file libfile("#{build_dir}/lib/libmruby_core") => objs do |t| 17 | archiver.run t.name, t.prerequisites 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/opcode.h: -------------------------------------------------------------------------------- 1 | /* this header file is to be removed soon. */ 2 | #include 3 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/print.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** print.c - Kernel.#p 3 | ** 4 | ** See Copyright Notice in mruby.h 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #ifdef __ANDROID__ 11 | #include 12 | #endif 13 | 14 | #ifndef MRB_DISABLE_STDIO 15 | static void 16 | printstr(mrb_value obj, FILE *stream) 17 | { 18 | if (mrb_string_p(obj)) { 19 | #ifdef __ANDROID__ 20 | __android_log_print(ANDROID_LOG_INFO, "GRender", "%s", RSTRING_PTR(obj)); 21 | #else 22 | fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stream); 23 | putc('\n', stream); 24 | #endif 25 | } 26 | } 27 | #else 28 | # define printstr(obj, stream) (void)0 29 | #endif 30 | 31 | MRB_API void 32 | mrb_p(mrb_state *mrb, mrb_value obj) 33 | { 34 | printstr(mrb_inspect(mrb, obj), stdout); 35 | } 36 | 37 | MRB_API void 38 | mrb_print_error(mrb_state *mrb) 39 | { 40 | mrb_print_backtrace(mrb); 41 | printstr(mrb_funcall(mrb, mrb_obj_value(mrb->exc), "inspect", 0), stderr); 42 | } 43 | 44 | MRB_API void 45 | mrb_show_version(mrb_state *mrb) 46 | { 47 | printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), mrb_intern_lit(mrb, "MRUBY_DESCRIPTION")), stdout); 48 | } 49 | 50 | MRB_API void 51 | mrb_show_copyright(mrb_state *mrb) 52 | { 53 | printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), mrb_intern_lit(mrb, "MRUBY_COPYRIGHT")), stdout); 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/value_array.h: -------------------------------------------------------------------------------- 1 | #ifndef MRB_VALUE_ARRAY_H__ 2 | #define MRB_VALUE_ARRAY_H__ 3 | 4 | #include 5 | 6 | static inline void 7 | value_move(mrb_value *s1, const mrb_value *s2, size_t n) 8 | { 9 | if (s1 > s2 && s1 < s2 + n) 10 | { 11 | s1 += n; 12 | s2 += n; 13 | while (n-- > 0) { 14 | *--s1 = *--s2; 15 | } 16 | } 17 | else if (s1 != s2) { 18 | while (n-- > 0) { 19 | *s1++ = *s2++; 20 | } 21 | } 22 | else { 23 | /* nothing to do. */ 24 | } 25 | } 26 | 27 | #endif /* MRB_VALUE_ARRAY_H__ */ 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/mruby/src/version.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void 5 | mrb_init_version(mrb_state* mrb) 6 | { 7 | mrb_value mruby_version = mrb_str_new_lit(mrb, MRUBY_VERSION); 8 | 9 | mrb_define_global_const(mrb, "RUBY_VERSION", mrb_str_new_lit(mrb, MRUBY_RUBY_VERSION)); 10 | mrb_define_global_const(mrb, "RUBY_ENGINE", mrb_str_new_lit(mrb, MRUBY_RUBY_ENGINE)); 11 | mrb_define_global_const(mrb, "RUBY_ENGINE_VERSION", mruby_version); 12 | mrb_define_global_const(mrb, "MRUBY_VERSION", mrb_str_new_lit(mrb, MRUBY_VERSION)); 13 | mrb_define_global_const(mrb, "MRUBY_RELEASE_NO", mrb_fixnum_value(MRUBY_RELEASE_NO)); 14 | mrb_define_global_const(mrb, "MRUBY_RELEASE_DATE", mrb_str_new_lit(mrb, MRUBY_RELEASE_DATE)); 15 | mrb_define_global_const(mrb, "MRUBY_DESCRIPTION", mrb_str_new_lit(mrb, MRUBY_DESCRIPTION)); 16 | mrb_define_global_const(mrb, "MRUBY_COPYRIGHT", mrb_str_new_lit(mrb, MRUBY_COPYRIGHT)); 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/cpp/onigmo/enc/iso_8859.h: -------------------------------------------------------------------------------- 1 | #define SHARP_s 0xdf 2 | -------------------------------------------------------------------------------- /app/src/main/cpp/onigmo/enc/jis/props.kwd: -------------------------------------------------------------------------------- 1 | %{/* -*- c -*- */ 2 | #define GPERF_DOWNCASE 1 3 | #define GPERF_CASE_STRNCMP 1 4 | 5 | static inline int 6 | gperf_case_strncmp(const char *s1, const char *s2, unsigned int n) 7 | { 8 | const UChar *str = (const UChar *)s1; 9 | const UChar *s = (const UChar *)s2; 10 | return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n); 11 | } 12 | 13 | enum onigenc_jis_ctype { 14 | onigenc_jis_min = ONIGENC_MAX_STD_CTYPE, 15 | onigenc_jis_hiragana, 16 | onigenc_jis_katakana, 17 | onigenc_jis_han, 18 | onigenc_jis_latin, 19 | onigenc_jis_greek, 20 | onigenc_jis_cyrillic, 21 | onigenc_jis_max 22 | }; 23 | 24 | enum {PropertyListNum = onigenc_jis_max - onigenc_jis_min - 1}; 25 | 26 | static const OnigCodePoint* const PropertyList[PropertyListNum] = { 27 | CR_Hiragana, 28 | CR_Katakana, 29 | CR_Han, 30 | CR_Latin, 31 | CR_Greek, 32 | CR_Cyrillic, 33 | }; 34 | 35 | struct enc_property { 36 | signed char name; 37 | unsigned char ctype; 38 | }; 39 | 40 | static const struct enc_property *onig_jis_property(const char *str, unsigned int len); 41 | %} 42 | 43 | struct enc_property; 44 | 45 | %% 46 | hiragana, onigenc_jis_hiragana 47 | katakana, onigenc_jis_katakana 48 | han, onigenc_jis_han 49 | latin, onigenc_jis_latin 50 | greek, onigenc_jis_greek 51 | cyrillic, onigenc_jis_cyrillic 52 | %% 53 | -------------------------------------------------------------------------------- /app/src/main/cpp/program/boost.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by mac on 2017/5/26. 3 | // 4 | 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "common/Models/DownloadQueue.h" 12 | #include "common/load_classes.h" 13 | 14 | extern "C" { 15 | 16 | JNIEXPORT void JNICALL Java_cn_gen_gsv2_MainActivity_init(JNIEnv * env, jobject jobj, jstring resource_path, jstring storage_path) { 17 | const char *rpath = env->GetStringUTFChars(resource_path, NULL); 18 | gr::FileSystem::getInstance()->setResourcePath(rpath); 19 | env->ReleaseStringUTFChars(resource_path, rpath); 20 | const char *spath = env->GetStringUTFChars(storage_path, NULL); 21 | gr::FileSystem::getInstance()->setStoragePath(spath); 22 | env->ReleaseStringUTFChars(resource_path, spath); 23 | GS_load_classes(); 24 | } 25 | 26 | JNIEXPORT void JNICALL Java_cn_gen_gsv2_MainActivity_update(JNIEnv * env, jobject jobj) { 27 | gr::db::database()->fixedStep(nullptr, 0.01); 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /app/src/main/cpp/sqlite3/msvc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** 2015 January 12 3 | ** 4 | ** The author disclaims copyright to this source code. In place of 5 | ** a legal notice, here is a blessing: 6 | ** 7 | ** May you do good and not evil. 8 | ** May you find forgiveness for yourself and forgive others. 9 | ** May you share freely, never taking more than you give. 10 | ** 11 | ****************************************************************************** 12 | ** 13 | ** This file contains code that is specific to MSVC. 14 | */ 15 | #ifndef SQLITE_MSVC_H 16 | #define SQLITE_MSVC_H 17 | 18 | #if defined(_MSC_VER) 19 | #pragma warning(disable : 4054) 20 | #pragma warning(disable : 4055) 21 | #pragma warning(disable : 4100) 22 | #pragma warning(disable : 4127) 23 | #pragma warning(disable : 4130) 24 | #pragma warning(disable : 4152) 25 | #pragma warning(disable : 4189) 26 | #pragma warning(disable : 4206) 27 | #pragma warning(disable : 4210) 28 | #pragma warning(disable : 4232) 29 | #pragma warning(disable : 4244) 30 | #pragma warning(disable : 4305) 31 | #pragma warning(disable : 4306) 32 | #pragma warning(disable : 4702) 33 | #pragma warning(disable : 4706) 34 | #endif /* defined(_MSC_VER) */ 35 | 36 | #endif /* SQLITE_MSVC_H */ 37 | -------------------------------------------------------------------------------- /app/src/main/cpp/sqlite3/vxworks.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** 2015-03-02 3 | ** 4 | ** The author disclaims copyright to this source code. In place of 5 | ** a legal notice, here is a blessing: 6 | ** 7 | ** May you do good and not evil. 8 | ** May you find forgiveness for yourself and forgive others. 9 | ** May you share freely, never taking more than you give. 10 | ** 11 | ****************************************************************************** 12 | ** 13 | ** This file contains code that is specific to Wind River's VxWorks 14 | */ 15 | #if defined(__RTP__) || defined(_WRS_KERNEL) 16 | /* This is VxWorks. Set up things specially for that OS 17 | */ 18 | #include 19 | #include /* amalgamator: dontcache */ 20 | #define OS_VXWORKS 1 21 | #define SQLITE_OS_OTHER 0 22 | #define SQLITE_HOMEGROWN_RECURSIVE_MUTEX 1 23 | #define SQLITE_OMIT_LOAD_EXTENSION 1 24 | #define SQLITE_ENABLE_LOCKING_STYLE 0 25 | #define HAVE_UTIME 1 26 | #else 27 | /* This is not VxWorks. */ 28 | #define OS_VXWORKS 0 29 | #define HAVE_FCHOWN 1 30 | #define HAVE_READLINK 1 31 | #define HAVE_LSTAT 1 32 | #endif /* defined(_WRS_KERNEL) */ 33 | -------------------------------------------------------------------------------- /app/src/main/java/app/dinus/com/loadingdrawable/DensityUtil.java: -------------------------------------------------------------------------------- 1 | package app.dinus.com.loadingdrawable; 2 | 3 | import android.content.Context; 4 | 5 | public class DensityUtil { 6 | 7 | public static float dip2px(Context context, float dpValue) { 8 | float scale = context.getResources().getDisplayMetrics().density; 9 | return dpValue * scale; 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/HTTPClient.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | 6 | /** 7 | * Created by gen on 13/06/2017. 8 | */ 9 | 10 | @NativeClass("gr::HTTPClient") 11 | public class HTTPClient extends Helper.GInstance { 12 | private static Helper.GClass _class; 13 | static { 14 | _class = Helper.find(HTTPClient.class); 15 | } 16 | public static void register() { 17 | } 18 | 19 | public void start() { 20 | call("start"); 21 | } 22 | public void cancel() { 23 | call("cancel"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/History.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | import com.gr.classes.Array; 6 | 7 | /** 8 | * Created by mac on 2017/8/27. 9 | */ 10 | 11 | 12 | @NativeClass("nl::History") 13 | public class History extends Helper.GInstance { 14 | private static Helper.GClass _class; 15 | static { 16 | _class = Helper.find(History.class); 17 | } 18 | 19 | public static void visit(Book book) { 20 | _class.call("visit", book); 21 | } 22 | 23 | public static Array histories(long from) { 24 | return (Array)_class.call("histories", from); 25 | } 26 | 27 | public static void clear() { 28 | _class.call("clear"); 29 | } 30 | 31 | public Book getBook() { 32 | return (Book) call("getBook"); 33 | } 34 | 35 | public long getDate() { 36 | return (long) call("getDate"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/KeyValue.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | import com.gr.classes.Array; 6 | 7 | /** 8 | * Created by gen on 10/07/2017. 9 | */ 10 | 11 | @NativeClass("nl::KeyValue") 12 | public class KeyValue extends Helper.GInstance { 13 | private static Helper.GClass _class; 14 | static { 15 | _class = Helper.find(KeyValue.class); 16 | } 17 | 18 | public String getKey() { 19 | return (String)call("getKey"); 20 | } 21 | 22 | public void setKey(String key) { 23 | call("setKey", key); 24 | } 25 | 26 | public String getValue() { 27 | return (String)call("getValue"); 28 | } 29 | public void setValue(String value) { 30 | call("setValue", value); 31 | } 32 | 33 | public static String get(String key) { 34 | return (String)_class.call("get", key); 35 | } 36 | 37 | public static void set(String key, String value) { 38 | _class.call("set", key, value); 39 | } 40 | 41 | public static Array search(String key) { return (Array) _class.call("search", key); } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/Library.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | import com.gr.classes.Callback; 6 | 7 | /** 8 | * Created by mac on 2017/6/3. 9 | */ 10 | 11 | @NativeClass("nl::Library") 12 | public class Library extends Helper.GInstance { 13 | private static Helper.GClass _class; 14 | static { 15 | _class = Helper.find(Library.class); 16 | } 17 | 18 | public Library(){} 19 | public Library(boolean init) { 20 | if (init) { 21 | initialize(); 22 | } 23 | } 24 | 25 | public void applyLoad(int page, Callback callback) { 26 | call("applyLoad", page, callback); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/Page.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | import com.gr.classes.Map; 6 | 7 | import java.util.Dictionary; 8 | 9 | /** 10 | * Created by mac on 2017/6/9. 11 | */ 12 | 13 | @NativeClass("nl::Page") 14 | public class Page extends Helper.GInstance { 15 | 16 | private static Helper.GClass _class; 17 | static { 18 | _class = Helper.find(Page.class); 19 | } 20 | 21 | public static void register(){} 22 | 23 | public String getPicture() { 24 | return (String)call("getPicture"); 25 | } 26 | public String getMethod() { 27 | return (String)call("getMethod"); 28 | } 29 | public Map getHeaders() { 30 | return (Map)call("getHeaders"); 31 | } 32 | public Map getParameters() { 33 | return (Map)call("getParameters"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/Reader.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | import com.gr.classes.Callback; 6 | 7 | /** 8 | * Created by gen on 09/06/2017. 9 | */ 10 | 11 | @NativeClass("nl::Reader") 12 | public class Reader extends Helper.GInstance { 13 | private static Helper.GClass _class; 14 | static { 15 | _class = Helper.find(Reader.class); 16 | } 17 | 18 | public Reader(boolean init) { 19 | if (init) { 20 | initialize(); 21 | } 22 | } 23 | 24 | Callback onPageCount; 25 | Callback onPageLoaded; 26 | 27 | public void setOnPageCount(Callback onPageCount) { 28 | this.onPageCount = onPageCount; 29 | call("setOnPageCount", onPageCount); 30 | } 31 | 32 | public Callback getOnPageCount() { 33 | return onPageCount; 34 | } 35 | 36 | public void setOnPageLoaded(Callback onPageLoaded) { 37 | this.onPageLoaded = onPageLoaded; 38 | call("setOnPageLoaded", onPageLoaded); 39 | } 40 | 41 | public Callback getOnPageLoaded() { 42 | return onPageLoaded; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/models/SearchTip.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.models; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | import com.gr.classes.Array; 6 | 7 | /** 8 | * Created by mac on 2017/10/12. 9 | */ 10 | 11 | @NativeClass("nl::SearchTip") 12 | public class SearchTip extends Helper.GInstance { 13 | private static Helper.GClass _class; 14 | static { 15 | _class = Helper.find(SearchTip.class); 16 | } 17 | public static void insert(String key) { 18 | _class.call("insert", key); 19 | } 20 | 21 | public static Array search(String key) { 22 | return (Array)_class.call("search", key); 23 | } 24 | public static void removeKey(String key) { 25 | _class.call("removeKey", key); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/utils/ResourceCache.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.utils; 2 | 3 | import android.content.Context; 4 | import android.graphics.drawable.Drawable; 5 | import android.support.v4.app.ActivityCompat; 6 | 7 | import java.util.HashMap; 8 | 9 | /** 10 | * Created by mac on 2017/8/14. 11 | */ 12 | 13 | public class ResourceCache { 14 | static HashMap map = new HashMap<>(); 15 | 16 | public static Drawable getDrawable(Context context, int resId) { 17 | if (map.containsKey(resId)) { 18 | return map.get(resId); 19 | }else { 20 | if (context != null) { 21 | Drawable d = ActivityCompat.getDrawable(context, resId); 22 | map.put(resId, d); 23 | return d; 24 | } 25 | } 26 | return null; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/views/ButtonCell.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.views; 2 | 3 | import android.content.Context; 4 | 5 | import apps.gen.lib.views.ListCell; 6 | 7 | /** 8 | * Created by gen on 07/07/2017. 9 | */ 10 | 11 | public class ButtonCell extends ListCell { 12 | public ButtonCell(Context context) { 13 | super(context); 14 | } 15 | 16 | public ButtonCell(Context context, String identifier) { 17 | super(context, identifier); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/views/ListViewCell.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.views; 2 | 3 | import android.content.Context; 4 | import android.graphics.Color; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.view.ViewParent; 9 | import android.widget.RelativeLayout; 10 | 11 | /** 12 | * Created by gen on 31/07/2017. 13 | */ 14 | 15 | public class ListViewCell extends RelativeLayout { 16 | View contentView; 17 | 18 | public ListViewCell(Context context) { 19 | super(context); 20 | init(context); 21 | } 22 | 23 | public ListViewCell(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | init(context); 26 | } 27 | 28 | public ListViewCell(Context context, AttributeSet attrs, int defStyleAttr) { 29 | super(context, attrs, defStyleAttr); 30 | init(context); 31 | } 32 | 33 | public void setContentView(View view) { 34 | if (view == contentView) { 35 | return; 36 | } 37 | if (contentView != null) { 38 | removeView(contentView); 39 | } 40 | if (view.getParent() != null) { 41 | ((ViewGroup)view.getParent()).removeView(view); 42 | } 43 | addView(view); 44 | contentView = view; 45 | } 46 | 47 | public View getContentView() { 48 | return contentView; 49 | } 50 | void init(Context context) { 51 | setBackgroundColor(Color.WHITE); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/views/StatusView.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.views; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.Nullable; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.RelativeLayout; 9 | import android.widget.TextView; 10 | 11 | import cn.gen.gsv2.R; 12 | 13 | /** 14 | * Created by mac on 2017/6/13. 15 | */ 16 | 17 | public class StatusView extends RelativeLayout { 18 | TextView labelView; 19 | Button checkButton; 20 | 21 | public StatusView(Context context) { 22 | super(context); 23 | init(context); 24 | } 25 | 26 | public StatusView(Context context, @Nullable AttributeSet attrs) { 27 | super(context, attrs); 28 | init(context); 29 | } 30 | 31 | public StatusView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 32 | super(context, attrs, defStyleAttr); 33 | init(context); 34 | } 35 | 36 | void init(Context context) { 37 | View view = inflate(context, R.layout.view_status, this); 38 | labelView = (TextView)view.findViewById(R.id.label); 39 | checkButton = (Button)view.findViewById(R.id.check_button); 40 | 41 | } 42 | 43 | public Button getCheckButton() { 44 | return checkButton; 45 | } 46 | 47 | public TextView getLabelView() { 48 | return labelView; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/cn/gen/gsv2/views/TouchPanel.java: -------------------------------------------------------------------------------- 1 | package cn.gen.gsv2.views; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.Nullable; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | import android.view.View; 8 | import android.widget.RelativeLayout; 9 | 10 | /** 11 | * Created by gen on 27/07/2017. 12 | */ 13 | 14 | public class TouchPanel extends RelativeLayout { 15 | 16 | OnClickListener listener; 17 | 18 | public TouchPanel(Context context) { 19 | super(context); 20 | } 21 | 22 | public TouchPanel(Context context, @Nullable AttributeSet attrs) { 23 | super(context, attrs); 24 | } 25 | 26 | public TouchPanel(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 27 | super(context, attrs, defStyleAttr); 28 | } 29 | 30 | public void setListener(OnClickListener listener) { 31 | this.listener = listener; 32 | } 33 | 34 | boolean enableListener = false; 35 | 36 | public void setEnableListener(boolean enableListener) { 37 | this.enableListener = enableListener; 38 | } 39 | 40 | @Override 41 | public boolean onTouchEvent(MotionEvent event) { 42 | if (enableListener) { 43 | if (event.getAction() == MotionEvent.ACTION_UP) { 44 | if (this.listener != null) { 45 | listener.onClick(this); 46 | } 47 | } 48 | } 49 | return enableListener; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/gr/Activity.java: -------------------------------------------------------------------------------- 1 | package com.gr; 2 | 3 | import android.os.Bundle; 4 | import android.os.PersistableBundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | 7 | /** 8 | * Created by gen on 16/5/8. 9 | */ 10 | public class Activity extends AppCompatActivity { 11 | static Activity currentActivity; 12 | @Override 13 | public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) { 14 | super.onCreate(savedInstanceState, persistentState); 15 | } 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | } 21 | 22 | @Override 23 | protected void onDestroy() { 24 | super.onDestroy(); 25 | if (currentActivity == this) { 26 | currentActivity = null; 27 | } 28 | } 29 | 30 | @Override 31 | protected void onPause() { 32 | super.onPause(); 33 | } 34 | 35 | @Override 36 | protected void onResume() { 37 | super.onResume(); 38 | currentActivity = this; 39 | } 40 | 41 | public static Activity current() {return currentActivity;} 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/gr/NativeClass.java: -------------------------------------------------------------------------------- 1 | package com.gr; 2 | 3 | import java.lang.annotation.Inherited; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | /** 8 | * Created by gen on 16/9/6. 9 | */ 10 | @Inherited 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface NativeClass { 13 | String value(); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/gr/RequestResultListener.java: -------------------------------------------------------------------------------- 1 | package com.gr; 2 | 3 | /** 4 | * Created by mac on 2017/5/29. 5 | */ 6 | 7 | public class RequestResultListener implements Request.OnStatusListener { 8 | private long nativePtr; 9 | 10 | private native void process(long ptr, float percent); 11 | private native void complete(long ptr, Request request); 12 | private native void failed(long ptr); 13 | private native void cancel(long ptr); 14 | 15 | @Override 16 | public void onProgress(Request request, float percent) { 17 | process(nativePtr, percent); 18 | } 19 | 20 | @Override 21 | public void onComplete(Request request) { 22 | complete(nativePtr, request); 23 | } 24 | 25 | @Override 26 | public void onFailed(Exception e) { 27 | failed(nativePtr); 28 | } 29 | 30 | @Override 31 | public void onCancel(Request request) { 32 | cancel(nativePtr); 33 | } 34 | 35 | public RequestResultListener(long ptr) { 36 | nativePtr = ptr; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/gr/classes/Callback.java: -------------------------------------------------------------------------------- 1 | package com.gr.classes; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | 6 | /** 7 | * Created by gen on 01/06/2017. 8 | */ 9 | 10 | @NativeClass("gcore::Callback") 11 | public class Callback extends Helper.GInstance { 12 | private static Helper.GClass _class; 13 | static { 14 | _class = Helper.find(Callback.class); 15 | } 16 | public static void register() { 17 | } 18 | 19 | public Callback() {} 20 | public Callback(boolean init) { 21 | if (init) initialize(); 22 | } 23 | 24 | @Override 25 | protected void finalize() throws Throwable { 26 | super.finalize(); 27 | } 28 | 29 | public Object _invoke(Array args) { 30 | Object ret = null; 31 | try { 32 | ret = run(args.toArray()); 33 | }catch (Exception e) { 34 | e.printStackTrace(); 35 | } 36 | return ret; 37 | } 38 | public Object run(Object... args) { 39 | return null; 40 | } 41 | public Object invoke(Object... args) { 42 | return call("invoke", new Object[]{args}); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/gr/classes/NotificationCenter.java: -------------------------------------------------------------------------------- 1 | package com.gr.classes; 2 | 3 | import com.gr.Helper; 4 | import com.gr.NativeClass; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | 9 | /** 10 | * Created by gen on 01/06/2017. 11 | */ 12 | 13 | @NativeClass("gr::NotificationCenter") 14 | public class NotificationCenter extends Helper.GInstance { 15 | private static Helper.GClass _class; 16 | 17 | public static Helper.GClass cls() { 18 | if (_class == null) { 19 | _class = Helper.find(NotificationCenter.class); 20 | } 21 | return _class; 22 | } 23 | 24 | public void listen(String name, Callback callback) { 25 | call("listen", name, callback); 26 | } 27 | public void remove(String name, Callback callback) { 28 | call("remove", name, callback); 29 | } 30 | public static NotificationCenter getInstance() { 31 | return (NotificationCenter)cls().call("getInstance"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/gr/classes/Renderer.java: -------------------------------------------------------------------------------- 1 | package com.gr.classes; 2 | 3 | import android.util.Log; 4 | import android.util.SizeF; 5 | 6 | import com.gr.Helper; 7 | import com.gr.NativeClass; 8 | 9 | import java.util.ArrayList; 10 | 11 | /** 12 | * Created by gen on 24/11/2016. 13 | */ 14 | 15 | @NativeClass("gr::Renderer") 16 | public class Renderer extends Helper.GInstance { 17 | private static Helper.GClass _class; 18 | public static void register() { 19 | Helper.registerClass(Renderer.class); 20 | } 21 | 22 | public static Helper.GClass cls() { 23 | if (_class == null) { 24 | _class = Helper.find(Renderer.class); 25 | } 26 | return _class; 27 | } 28 | 29 | public void setSize(SizeF size) { 30 | call("setSize", size); 31 | } 32 | 33 | public void render() { 34 | call("render"); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/white_repple.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/add_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/add_dialog.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/arrow_down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/arrow_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/book.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/cancel2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/cancel2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/clock.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/done.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/download.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/failed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/like.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/liked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/liked.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/list.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/menu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/menu_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/menu_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/no_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/no_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/pause.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/remove.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/setting.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/squares.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable-xhdpi/tri.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/chaptet_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/corner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/launch.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable/launch.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbsGen/GenShelfV3_Android/b121dbab13c6f109c9d0cc00d956a8c528abeced/app/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/white_repple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 27 | 31 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/cell_description.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 21 | 22 | 30 | 31 | 32 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_book.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 17 | 18 | 19 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_history.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_library.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 15 | 16 | 17 | 28 | 29 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_likes.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_local_book.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_main_settings.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_process.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_search.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_settings.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_shelf.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | 24 | 25 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_shops.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_social.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 16 | 17 | 18 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_topics.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 15 | 16 | 17 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_view.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 16 | 20 | 21 | 22 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/controller_web_view.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_header_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_status.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 20 |