Permalink
Browse files

new version

  • Loading branch information...
0 parents commit c03cf86612f9ba50abd91aec53061f59dd5b86b1 @gutenye committed Jan 2, 2011
Showing with 37,356 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 Gemfile
  3. +14 −0 Gemfile.lock
  4. +181 −0 ext/gile/Makefile
  5. +6 −0 ext/gile/extconf.rb
  6. +65 −0 ext/gile/gile.c
  7. BIN ext/gile/gile.o
  8. +49 −0 ext/gile/mkmf.log
  9. +26 −0 ext/gile/test_gile.rb
  10. +181 −0 ext/readline/Makefile
  11. +4 −0 ext/readline/extconf.rb
  12. +20 −0 ext/readline/mkmf.log
  13. +48 −0 ext/readline/readline.c
  14. BIN ext/readline/readline.o
  15. BIN ext/readline/readline.so
  16. +4 −0 ext/readline/readline/.cvsignore
  17. +182 −0 ext/readline/readline/Makefile
  18. +10 −0 ext/readline/readline/README
  19. +422 −0 ext/readline/readline/README.ja
  20. +1 −0 ext/readline/readline/depend
  21. +73 −0 ext/readline/readline/extconf.rb
  22. +504 −0 ext/readline/readline/mkmf.log
  23. +1,333 −0 ext/readline/readline/readline.c
  24. BIN ext/readline/readline/readline.o
  25. BIN ext/readline/readline/readline.so
  26. +5 −0 ext/readline/readline/test_readline.rb
  27. +10 −0 ext/readline/test_readline.rb
  28. +181 −0 ext/term/Makefile
  29. +8 −0 ext/term/extconf.rb
  30. +78 −0 ext/term/mkmf.log
  31. +374 −0 ext/term/term.c
  32. BIN ext/term/term.o
  33. +27 −0 ext/term/test_term.rb
  34. BIN guten-0.0.1.gem
  35. +1 −0 guten-0.0.1/.gitignore
  36. +21 −0 guten-0.0.1/test/a/ZenTest-4.4.1/.autotest
  37. +739 −0 guten-0.0.1/test/a/ZenTest-4.4.1/History.txt
  38. +37 −0 guten-0.0.1/test/a/ZenTest-4.4.1/Manifest.txt
  39. +106 −0 guten-0.0.1/test/a/ZenTest-4.4.1/README.txt
  40. +52 −0 guten-0.0.1/test/a/ZenTest-4.4.1/Rakefile
  41. +721 −0 guten-0.0.1/test/a/ZenTest-4.4.1/articles/Article.css
  42. +533 −0 guten-0.0.1/test/a/ZenTest-4.4.1/articles/getting_started_with_autotest.html
  43. +393 −0 guten-0.0.1/test/a/ZenTest-4.4.1/articles/how_to_use_zentest.txt
  44. +7 −0 guten-0.0.1/test/a/ZenTest-4.4.1/bin/autotest
  45. +4 −0 guten-0.0.1/test/a/ZenTest-4.4.1/bin/multigem
  46. +76 −0 guten-0.0.1/test/a/ZenTest-4.4.1/bin/multiruby
  47. +74 −0 guten-0.0.1/test/a/ZenTest-4.4.1/bin/multiruby_setup
  48. +37 −0 guten-0.0.1/test/a/ZenTest-4.4.1/bin/unit_diff
  49. +23 −0 guten-0.0.1/test/a/ZenTest-4.4.1/bin/zentest
  50. +42 −0 guten-0.0.1/test/a/ZenTest-4.4.1/example.txt
  51. +7 −0 guten-0.0.1/test/a/ZenTest-4.4.1/example1.rb
  52. +15 −0 guten-0.0.1/test/a/ZenTest-4.4.1/example2.rb
  53. +16 −0 guten-0.0.1/test/a/ZenTest-4.4.1/example_dot_autotest.rb
  54. +775 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest.rb
  55. +26 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/autoupdate.rb
  56. +10 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/bundler.rb
  57. +18 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/isolate.rb
  58. +9 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/once.rb
  59. +27 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/rcov.rb
  60. +12 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/restart.rb
  61. +9 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/autotest/timestamp.rb
  62. +25 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/focus.rb
  63. +92 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/functional_test_matrix.rb
  64. +412 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/multiruby.rb
  65. +272 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/unit_diff.rb
  66. +603 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/zentest.rb
  67. +117 −0 guten-0.0.1/test/a/ZenTest-4.4.1/lib/zentest_mapping.rb
  68. +476 −0 guten-0.0.1/test/a/ZenTest-4.4.1/test/test_autotest.rb
  69. +35 −0 guten-0.0.1/test/a/ZenTest-4.4.1/test/test_focus.rb
  70. +343 −0 guten-0.0.1/test/a/ZenTest-4.4.1/test/test_unit_diff.rb
  71. +566 −0 guten-0.0.1/test/a/ZenTest-4.4.1/test/test_zentest.rb
  72. +242 −0 guten-0.0.1/test/a/ZenTest-4.4.1/test/test_zentest_mapping.rb
  73. +55 −0 guten-0.0.1/test/a/a.rb
  74. 0 guten-0.0.1/test/a/test_a.rb
  75. +94 −0 guten-0.0.1/test/kernel/test_formatter.rb
  76. +13 −0 guten-0.0.1/test/kernel/test_gile.rb
  77. +258 −0 guten-0.0.1/test/kernel/test_pa.rb
  78. +17 −0 guten-0.0.1/test/socket/a.rb
  79. +16 −0 guten-0.0.1/test/socket/b.rb
  80. +30 −0 guten-0.0.1/test/socket/moban.rb
  81. +24 −0 guten-0.0.1/test/socket/oserver_client.rb
  82. +22 −0 guten-0.0.1/test/socket/oserver_daemon.rb
  83. +13 −0 guten-0.0.1/test/socket/oserver_server.rb
  84. +4 −0 guten-0.0.1/test/socket/rc.rb
  85. +139 −0 guten-0.0.1/test/test_cairo.rb
  86. +160 −0 guten-0.0.1/test/test_contact.rb
  87. +5 −0 guten-0.0.1/test/test_daemon.rb
  88. +43 −0 guten-0.0.1/test/test_gdate.rb
  89. +92 −0 guten-0.0.1/test/test_getopt.rb
  90. +76 −0 guten-0.0.1/test/test_kernel.rb
  91. +17 −0 guten-0.0.1/test/test_minitest.rb
  92. +63 −0 guten-0.0.1/test/test_template.rb
  93. +70 −0 guten-0.0.1/test/test_term.rb
  94. +24 −0 guten-0.0.1/test/test_test.rb
  95. +23 −0 guten-0.0.1/test/test_tst.rb
  96. +4 −0 guten-0.0.1/test/testdata/a.tst
  97. +7 −0 guten-0.0.1/test/testdata/all.tst
  98. +1 −0 guten-0.0.1/test/testdata/tb.tst
  99. +10 −0 guten.gemspec
  100. +8 −0 lib/guten/audioinfo.rb
  101. +780 −0 lib/guten/cairo.rb
  102. +318 −0 lib/guten/core.rb
  103. +251 −0 lib/guten/core/formatter.rb
  104. +145 −0 lib/guten/core/gile.rb
  105. +70 −0 lib/guten/core/kernel.rb
  106. +606 −0 lib/guten/core/pa.rb
  107. +79 −0 lib/guten/core/process.rb
  108. +148 −0 lib/guten/core/ta.rb
  109. +10 −0 lib/guten/gdk_pixbuf2.rb
  110. +109 −0 lib/guten/gtk2.rb
  111. +72 −0 lib/guten/htree.rb
  112. +7 −0 lib/guten/magick.rb
  113. +226 −0 lib/guten/ncurses.rb
  114. +20 −0 lib/guten/net/http.rb
  115. +25 −0 lib/guten/poppler.rb
  116. +884 −0 lib/guten/rdoc/Array.html
  117. +196 −0 lib/guten/rdoc/Class.html
  118. +310 −0 lib/guten/rdoc/Coord_M.html
  119. +608 −0 lib/guten/rdoc/Enumerable.html
  120. +287 −0 lib/guten/rdoc/Fixnum.html
  121. +477 −0 lib/guten/rdoc/Float.html
  122. +871 −0 lib/guten/rdoc/Gable.html
  123. +193 −0 lib/guten/rdoc/Gable/Error.html
  124. +317 −0 lib/guten/rdoc/Gable_eval.html
  125. +288 −0 lib/guten/rdoc/Gablee.html
  126. +350 −0 lib/guten/rdoc/Gnumber.html
  127. +529 −0 lib/guten/rdoc/Hash.html
  128. +193 −0 lib/guten/rdoc/Hash/Error.html
  129. +196 −0 lib/guten/rdoc/IO.html
  130. +394 −0 lib/guten/rdoc/Integer.html
  131. +604 −0 lib/guten/rdoc/Kernel.html
  132. +196 −0 lib/guten/rdoc/Kernel/FailError.html
  133. +274 −0 lib/guten/rdoc/Marshal.html
  134. +464 −0 lib/guten/rdoc/Module.html
  135. +243 −0 lib/guten/rdoc/NilClass.html
  136. +196 −0 lib/guten/rdoc/Numberic.html
  137. +467 −0 lib/guten/rdoc/Object.html
  138. +437 −0 lib/guten/rdoc/Process.html
  139. +410 −0 lib/guten/rdoc/Process/Daemon.html
  140. +240 −0 lib/guten/rdoc/Process/Ps.html
  141. +196 −0 lib/guten/rdoc/Process/Status.html
  142. +242 −0 lib/guten/rdoc/Rational.html
  143. +1,961 −0 lib/guten/rdoc/String.html
  144. +243 −0 lib/guten/rdoc/Symbol.html
  145. +243 −0 lib/guten/rdoc/Time.html
  146. +2 −0 lib/guten/rdoc/created.rid
  147. BIN lib/guten/rdoc/images/brick.png
  148. BIN lib/guten/rdoc/images/brick_link.png
  149. BIN lib/guten/rdoc/images/bug.png
  150. BIN lib/guten/rdoc/images/bullet_black.png
  151. BIN lib/guten/rdoc/images/bullet_toggle_minus.png
  152. BIN lib/guten/rdoc/images/bullet_toggle_plus.png
  153. BIN lib/guten/rdoc/images/date.png
  154. BIN lib/guten/rdoc/images/find.png
  155. BIN lib/guten/rdoc/images/loadingAnimation.gif
  156. BIN lib/guten/rdoc/images/macFFBgHack.png
  157. BIN lib/guten/rdoc/images/package.png
  158. BIN lib/guten/rdoc/images/page_green.png
  159. BIN lib/guten/rdoc/images/page_white_text.png
  160. BIN lib/guten/rdoc/images/page_white_width.png
  161. BIN lib/guten/rdoc/images/plugin.png
  162. BIN lib/guten/rdoc/images/ruby.png
  163. BIN lib/guten/rdoc/images/tag_green.png
  164. BIN lib/guten/rdoc/images/wrench.png
  165. BIN lib/guten/rdoc/images/wrench_orange.png
  166. BIN lib/guten/rdoc/images/zoom.png
  167. +419 −0 lib/guten/rdoc/index.html
  168. +116 −0 lib/guten/rdoc/js/darkfish.js
  169. +32 −0 lib/guten/rdoc/js/jquery.js
  170. +114 −0 lib/guten/rdoc/js/quicksearch.js
  171. +10 −0 lib/guten/rdoc/js/thickbox-compressed.js
  172. +54 −0 lib/guten/rdoc/kernel_rb.html
  173. +706 −0 lib/guten/rdoc/rdoc.css
  174. +53 −0 lib/guten/socket.rb
  175. +65 −0 lib/guten/socket/oserver.rb
  176. +66 −0 lib/guten/tree.rb
  177. +1 −0 lib/guten/version.rb
  178. +16 −0 lib/guten/vim.rb
  179. +12 −0 lib/guten/xmpp4r/roster.rb
  180. +2 −0 spec/core_spec.rb
  181. +21 −0 test/a/ZenTest-4.4.1/.autotest
  182. +739 −0 test/a/ZenTest-4.4.1/History.txt
  183. +37 −0 test/a/ZenTest-4.4.1/Manifest.txt
  184. +106 −0 test/a/ZenTest-4.4.1/README.txt
  185. +52 −0 test/a/ZenTest-4.4.1/Rakefile
  186. +721 −0 test/a/ZenTest-4.4.1/articles/Article.css
  187. +533 −0 test/a/ZenTest-4.4.1/articles/getting_started_with_autotest.html
  188. +393 −0 test/a/ZenTest-4.4.1/articles/how_to_use_zentest.txt
  189. +7 −0 test/a/ZenTest-4.4.1/bin/autotest
  190. +4 −0 test/a/ZenTest-4.4.1/bin/multigem
  191. +76 −0 test/a/ZenTest-4.4.1/bin/multiruby
  192. +74 −0 test/a/ZenTest-4.4.1/bin/multiruby_setup
  193. +37 −0 test/a/ZenTest-4.4.1/bin/unit_diff
  194. +23 −0 test/a/ZenTest-4.4.1/bin/zentest
  195. +42 −0 test/a/ZenTest-4.4.1/example.txt
  196. +7 −0 test/a/ZenTest-4.4.1/example1.rb
  197. +15 −0 test/a/ZenTest-4.4.1/example2.rb
  198. +16 −0 test/a/ZenTest-4.4.1/example_dot_autotest.rb
  199. +775 −0 test/a/ZenTest-4.4.1/lib/autotest.rb
  200. +26 −0 test/a/ZenTest-4.4.1/lib/autotest/autoupdate.rb
  201. +10 −0 test/a/ZenTest-4.4.1/lib/autotest/bundler.rb
  202. +18 −0 test/a/ZenTest-4.4.1/lib/autotest/isolate.rb
  203. +9 −0 test/a/ZenTest-4.4.1/lib/autotest/once.rb
  204. +27 −0 test/a/ZenTest-4.4.1/lib/autotest/rcov.rb
  205. +12 −0 test/a/ZenTest-4.4.1/lib/autotest/restart.rb
  206. +9 −0 test/a/ZenTest-4.4.1/lib/autotest/timestamp.rb
  207. +25 −0 test/a/ZenTest-4.4.1/lib/focus.rb
  208. +92 −0 test/a/ZenTest-4.4.1/lib/functional_test_matrix.rb
  209. +412 −0 test/a/ZenTest-4.4.1/lib/multiruby.rb
  210. +272 −0 test/a/ZenTest-4.4.1/lib/unit_diff.rb
  211. +603 −0 test/a/ZenTest-4.4.1/lib/zentest.rb
  212. +117 −0 test/a/ZenTest-4.4.1/lib/zentest_mapping.rb
  213. +476 −0 test/a/ZenTest-4.4.1/test/test_autotest.rb
  214. +35 −0 test/a/ZenTest-4.4.1/test/test_focus.rb
  215. +343 −0 test/a/ZenTest-4.4.1/test/test_unit_diff.rb
  216. +566 −0 test/a/ZenTest-4.4.1/test/test_zentest.rb
  217. +242 −0 test/a/ZenTest-4.4.1/test/test_zentest_mapping.rb
  218. +55 −0 test/a/a.rb
  219. 0 test/a/test_a.rb
  220. +94 −0 test/kernel/test_formatter.rb
  221. +13 −0 test/kernel/test_gile.rb
  222. +258 −0 test/kernel/test_pa.rb
  223. +17 −0 test/socket/a.rb
  224. +16 −0 test/socket/b.rb
  225. +30 −0 test/socket/moban.rb
  226. +24 −0 test/socket/oserver_client.rb
  227. +22 −0 test/socket/oserver_daemon.rb
  228. +13 −0 test/socket/oserver_server.rb
  229. +4 −0 test/socket/rc.rb
  230. +139 −0 test/test_cairo.rb
  231. +160 −0 test/test_contact.rb
  232. +5 −0 test/test_daemon.rb
  233. +43 −0 test/test_gdate.rb
  234. +92 −0 test/test_getopt.rb
  235. +76 −0 test/test_kernel.rb
  236. +17 −0 test/test_minitest.rb
  237. +63 −0 test/test_template.rb
  238. +70 −0 test/test_term.rb
  239. +24 −0 test/test_test.rb
  240. +23 −0 test/test_tst.rb
  241. +4 −0 test/testdata/a.tst
  242. +7 −0 test/testdata/all.tst
  243. +1 −0 test/testdata/tb.tst
@@ -0,0 +1 @@
+*~
@@ -0,0 +1,3 @@
+source :rubygems
+
+gemspec
@@ -0,0 +1,14 @@
+PATH
+ remote: .
+ specs:
+ guten (0.0.1)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ guten!
@@ -0,0 +1,181 @@
+
+SHELL = /bin/sh
+
+#### Start of system configuration section. ####
+
+srcdir = .
+topdir = /usr/include/ruby-1.9.1
+hdrdir = /usr/include/ruby-1.9.1
+arch_hdrdir = /usr/include/ruby-1.9.1/$(arch)
+VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
+prefix = $(DESTDIR)/usr
+exec_prefix = $(prefix)
+vendorhdrdir = $(rubyhdrdir)/vendor_ruby
+sitehdrdir = $(rubyhdrdir)/site_ruby
+rubyhdrdir = $(includedir)/$(RUBY_INSTALL_NAME)-$(ruby_version)
+vendordir = $(libdir)/$(RUBY_INSTALL_NAME)/vendor_ruby
+sitedir = $(libdir)/$(RUBY_INSTALL_NAME)/site_ruby
+mandir = $(datarootdir)/man
+localedir = $(datarootdir)/locale
+libdir = $(exec_prefix)/lib
+psdir = $(docdir)
+pdfdir = $(docdir)
+dvidir = $(docdir)
+htmldir = $(docdir)
+infodir = $(datarootdir)/info
+docdir = $(datarootdir)/doc/$(PACKAGE)
+oldincludedir = $(DESTDIR)/usr/include
+includedir = $(prefix)/include
+localstatedir = $(prefix)/var
+sharedstatedir = $(prefix)/com
+sysconfdir = $(prefix)/etc
+datadir = $(datarootdir)
+datarootdir = $(prefix)/share
+libexecdir = $(exec_prefix)/libexec
+sbindir = $(exec_prefix)/sbin
+bindir = $(exec_prefix)/bin
+rubylibdir = $(libdir)/$(ruby_install_name)/$(ruby_version)
+archdir = $(rubylibdir)/$(arch)
+sitelibdir = $(sitedir)/$(ruby_version)
+sitearchdir = $(sitelibdir)/$(sitearch)
+vendorlibdir = $(vendordir)/$(ruby_version)
+vendorarchdir = $(vendorlibdir)/$(sitearch)
+
+CC = gcc
+CXX = g++
+LIBRUBY = $(LIBRUBY_SO)
+LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
+LIBRUBYARG_SHARED = -Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
+LIBRUBYARG_STATIC = -Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
+OUTFLAG = -o
+COUTFLAG = -o
+
+RUBY_EXTCONF_H =
+cflags = $(optflags) $(debugflags) $(warnflags)
+optflags = -O2
+debugflags = -g
+warnflags = -Wall -Wno-parentheses
+CFLAGS = -fPIC -march=i686 -mtune=generic -O2 -pipe $(cflags) -fPIC
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
+DEFS = -D_FILE_OFFSET_BITS=64
+CPPFLAGS = -DHAVE_SYS_STAT_H -DHAVE_MKNOD $(DEFS) $(cppflags)
+CXXFLAGS = $(CFLAGS) -march=i686 -mtune=generic -O2 -pipe $(cxxflags)
+ldflags = -L. -Wl,--hash-style=gnu -Wl,--as-needed -rdynamic -Wl,-export-dynamic
+dldflags =
+archflag =
+DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
+LDSHARED = $(CC) -shared
+LDSHAREDXX = $(CXX) -shared
+AR = ar
+EXEEXT =
+
+RUBY_INSTALL_NAME = ruby
+RUBY_SO_NAME = ruby
+arch = i686-linux
+sitearch = i686-linux
+ruby_version = 1.9.1
+ruby = /usr/bin/ruby
+RUBY = $(ruby)
+RM = rm -f
+RM_RF = $(RUBY) -run -e rm -- -rf
+RMDIRS = $(RUBY) -run -e rmdir -- -p
+MAKEDIRS = mkdir -p
+INSTALL = /bin/install -c
+INSTALL_PROG = $(INSTALL) -m 0755
+INSTALL_DATA = $(INSTALL) -m 644
+COPY = cp
+
+#### End of system configuration section. ####
+
+preload =
+
+libpath = . $(libdir)
+LIBPATH = -L. -L$(libdir) -Wl,-R$(libdir)
+DEFFILE =
+
+CLEANFILES = mkmf.log
+DISTCLEANFILES =
+DISTCLEANDIRS =
+
+extout =
+extout_prefix =
+target_prefix =
+LOCAL_LIBS =
+LIBS = $(LIBRUBYARG_SHARED) -lpthread -lrt -ldl -lcrypt -lm -lc
+SRCS = gile.c
+OBJS = gile.o
+TARGET = gile
+DLLIB = $(TARGET).so
+EXTSTATIC =
+STATIC_LIB =
+
+BINDIR = $(bindir)
+RUBYCOMMONDIR = $(sitedir)$(target_prefix)
+RUBYLIBDIR = $(sitelibdir)$(target_prefix)
+RUBYARCHDIR = $(sitearchdir)$(target_prefix)
+HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
+ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
+
+TARGET_SO = $(DLLIB)
+CLEANLIBS = $(TARGET).so
+CLEANOBJS = *.o *.bak
+
+all: $(DLLIB)
+static: $(STATIC_LIB)
+
+clean-rb-default::
+clean-rb::
+clean-so::
+clean: clean-so clean-rb-default clean-rb
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
+
+distclean-rb-default::
+distclean-rb::
+distclean-so::
+distclean: clean distclean-so distclean-rb-default distclean-rb
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
+ @-$(RMDIRS) $(DISTCLEANDIRS)
+
+realclean: distclean
+install: install-so install-rb
+
+install-so: $(RUBYARCHDIR)
+install-so: $(RUBYARCHDIR)/$(DLLIB)
+$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
+install-rb: pre-install-rb install-rb-default
+install-rb-default: pre-install-rb-default
+pre-install-rb: Makefile
+pre-install-rb-default: Makefile
+$(RUBYARCHDIR):
+ $(MAKEDIRS) $@
+
+site-install: site-install-so site-install-rb
+site-install-so: install-so
+site-install-rb: install-rb
+
+.SUFFIXES: .c .m .cc .cxx .cpp .C .o
+
+.cc.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
+
+.cxx.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
+
+.cpp.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
+
+.C.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
+
+.c.o:
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
+
+$(DLLIB): $(OBJS) Makefile
+ @-$(RM) $(@)
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+
+
+$(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h
@@ -0,0 +1,6 @@
+grequire "mkmf"
+
+have_header("sys/stat.h")
+have_function("mknod")
+
+create_makefile("gile")
@@ -0,0 +1,65 @@
+#include <sys/stat.h>
+#include <gruby.h>
+
+VALUE eError, eExist, eNoEnt, ePerm, eNotSupport, eAccess, eNotDir, eIsDir, \
+ eNotSymlink, eLinkSelf, eDangling;
+
+// type_@ ?c
+// mode_@ 0644
+// dev_@ 0
+VALUE gile_mknod(self, path_, type_, mode_, dev_)
+ VALUE self, path_, type_, mode_, dev_;
+{
+#ifdef HAVE_MKNOD
+
+ // handle args
+ char *path = rb_str_newv(path_);
+ int type = FIX2CHR(type_);
+ int mode = FIX2INT(mode_);
+ int dev = FIX2INT(dev_);
+
+ // begin
+ switch (type) {
+ case 'f': mode |= S_IFREG; break;
+ case 'c': mode |= S_IFCHR; break;
+#ifdef S_IFBLK
+ case 'b': mode |= S_IFBLK; break;
+#endif
+#ifdef S_IFIFO
+ case 'p': mode |= S_IFIFO; break;
+#endif
+ }
+
+ if (mknod(path, mode, dev))
+ rb_sys_fail("mknod");
+
+ return INT2FIX(0);
+#else
+ rb_notimplement();
+#endif
+}
+
+void Init_gile()
+{
+ // class Gile
+ VALUE cGile = rb_define_class("Gile", rb_cFile);
+
+ // Error < Exception
+ eError = rb_define_class_under(cGile, "Error" , rb_eException);
+ eExist = rb_define_class_under(cGile, "EExist" , eError);
+ eNoEnt = rb_define_class_under(cGile, "ENoEnt" , eError);
+ ePerm = rb_define_class_under(cGile, "EPerm" , eError);
+ eNotSupport = rb_define_class_under(cGile, "ENotSupport" , eError);
+ eAccess = rb_define_class_under(cGile, "EAccess" , eError);
+ eNotDir = rb_define_class_under(cGile, "ENotDir" , eError);
+ eIsDir = rb_define_class_under(cGile, "EIsDir" , eError);
+ eNotSymlink = rb_define_class_under(cGile, "ENotSymlink" , eError);
+ eLinkSelf = rb_define_class_under(cGile, "ELinkSelf" , eError);
+ eDangling = rb_define_class_under(cGile, "EDangling" , eError);
+
+ // method
+ rb_define_singleton_method(cGile, "mknod", gile_mknod, 4);
+
+}
+
+
Binary file not shown.
@@ -0,0 +1,49 @@
+have_header: checking for sys/stat.h... -------------------- yes
+
+"gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC conftest.c -L. -L/usr/lib -Wl,-R/usr/lib -L. -Wl,--hash-style=gnu -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
+checked program was:
+/* begin */
+1: #include "ruby.h"
+2:
+3: int main() {return 0;}
+/* end */
+
+"gcc -E -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC conftest.c -o conftest.i"
+checked program was:
+/* begin */
+1: #include "ruby.h"
+2:
+3: #include <sys/stat.h>
+/* end */
+
+--------------------
+
+have_func: checking for mknod()... -------------------- yes
+
+"gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC conftest.c -L. -L/usr/lib -Wl,-R/usr/lib -L. -Wl,--hash-style=gnu -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
+conftest.c: In function ‘t’:
+conftest.c:5:53: error: ‘mknod’ undeclared (first use in this function)
+conftest.c:5:53: note: each undeclared identifier is reported only once for each function it appears in
+checked program was:
+/* begin */
+1: #include "ruby.h"
+2:
+3: /*top*/
+4: int main() {return 0;}
+5: int t() { void ((*volatile p)()); p = (void ((*)()))mknod; return 0; }
+/* end */
+
+"gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC conftest.c -L. -L/usr/lib -Wl,-R/usr/lib -L. -Wl,--hash-style=gnu -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
+conftest.c: In function ‘t’:
+conftest.c:5:1: warning: implicit declaration of function ‘mknod’
+checked program was:
+/* begin */
+1: #include "ruby.h"
+2:
+3: /*top*/
+4: int main() {return 0;}
+5: int t() { mknod(); return 0; }
+/* end */
+
+--------------------
+
@@ -0,0 +1,26 @@
+#!/usr/bin/env ruby
+
+grequire "test"
+rrequire "gile.so"
+
+class Test_Gile < Test
+ def test_mknod
+tmpfile = Gile.mktmpfile
+ Gile.mknod(tmpfile, :chardev, "/dev/console", mode:0777)
+ assert_equal :chardev, Gile.type(tmpfile)
+ assert_equal 0100777, Gile.lstat(tmpfile).mode
+Gile.rm(tmpfile)
+
+tmpfile = Gile.mktmpfile
+ Gile.mknod(tmpfile, :fifo)
+ assert_equal :fifo, Gile.type(tmpfile)
+Gile.rm(tmpfile)
+
+tmpfile = Gile.mktmpfile
+ assert_raise(Gile::Eexist){
+ Gile.touch(tmpfile)
+ Gile.mknod(tmpfile, :fifo)
+ }
+Gile.rm(tmpfile)
+ end if win32?
+end
Oops, something went wrong.

0 comments on commit c03cf86

Please sign in to comment.